spring-ws

Consuming SOAP WS returns Error 401 unauthorized

拥有回忆 提交于 2019-12-12 03:37:46
问题 I am trying to consume a SOAP webservice using spring-ws. I am able to successfully consume this web service from SOAP UI. However I receive an unauthorized exception: org.springframework.ws.client.WebServiceTransportException: Unauthorized [401] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:699) How do I successfully authenticate? My code is as follows: WebServiceTemplate configuration: @Bean public WebServiceTemplate webServiceTemplate

spring-ws get username & password

空扰寡人 提交于 2019-12-12 03:30:54
问题 I've been learning spring-ws for little over a week and I've set up a simple web service. I'm testing it using soapui and specifying a username and password in the request properties. My web service has no security layer nor do I want to add one. I just need to pull the username and password out of the request to make requests to another service. I don't want to have to specify a username or password in my request body itself. All I want to do is retrieve the username and password from the

PropertyAccessException in Apache camel Spring Ws Configuration

狂风中的少年 提交于 2019-12-12 02:52:04
问题 I want to configure Spring-ws Connection Manager to use PoolingHttpClientConnectionManager . here is my configuration camel-context.xml <camel-context> <route> <from uri="direct:sampleCall"/> <to uri="bean:sampleCommand"/> <to uri="spring-ws:http://{{sample.uri}}?timeout={{sample.timeout}}&messageSender=#messageSender&soapAction=urn:MidwareWebServiceIntf-MidwareWebService#sampleCommand"/> <to uri="bean:xmlProcessor"/> <to uri="bean:validateResponse"/> </route> <route> <from uri="direct

How to implement multiple SFDC Outbound Message receivers in the same Spring service?

为君一笑 提交于 2019-12-12 02:38:58
问题 For each Outbound Message, Salesforce provides a full self-contained WSDL. Implementing a Spring service for a single one is easy, using jaxws-maven-plugin to generate the classes and @Endpoint , @PayloadRoot , etc to bind the endpoint. However, multiple Outbound Messages all share the same QNs (for example http://soap.sforce.com/2005/09/outbound:notifications or urn:sobject.enterprise.soap.sforce.com:sObject ) for different structures and type hierarchies. I know how to map the same XML

Spring webservicetemplate jar conflict issue with Axis2

心已入冬 提交于 2019-12-11 15:24:35
问题 I use Spring web services and Axis2 both in my app. They are completely independent and it works great, except that Spring WebServiceTemplate started throwing the exception below.. I suspect it's happening because Spring requires saaj.jar (which has javax.xml.soap.SOAPElement) and Axis2 requires axiom-dom.jar (which has org.apache.axiom.om.impl.dom.ElementImpl) Both the interfaces extend org.w3c.dom.Element and somehow Spring in picking up the one from axiom-dom.jar Any ideas as to what i can

PayloadRootQNameEndpointMapping with Wss4jSecurityInterceptor causing SOAPProcessingException

孤者浪人 提交于 2019-12-11 13:04:22
问题 I am using below configuration, for PayloadRootQNameEndpointMapping with Wss4jSecurityInterceptor <bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping"> <property name="mappings"> <props> <prop key="{http://com/clickandbuy/mywebservice/}employeeById_Request">serviceEndPoint</prop> <prop key="{http://com/clickandbuy/mywebservice/}employeeByFile_Request">serviceEndPoint</prop> <prop key="{http://com/clickandbuy/mywebservice/

Spring-WS : Soap fault not identified as Fault

て烟熏妆下的殇ゞ 提交于 2019-12-11 12:58:46
问题 I am using Spring-WS, and I am getting a SOAP Fault with error code 500 when calling the web service via marshalSendAndReceive from the webServiceTemplate. Unfortunately, the response is not being recognized as a SOAP fault (it is throwing a WebServiceTransportException). In theory, when there is an error response, WebServiceTemplate throws a WebServiceTransportException if the error code is different to 2xx, unless the http error is 500 and the content is a soap fault. Here is an example

X509 WS-Security using spring-ws, XWS interceptor in WebSphere

痞子三分冷 提交于 2019-12-11 09:44:49
问题 I am having a hard time with X509 certificate-based WS-Security in WebSphere v7. Here's a little background: We are using spring-ws in our application, and we allow for UsernameToken profile security or X509 security. The two are implemented using the Xws Security interceptor, which runs off of the Xws Security Framework: http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.6/tutorial/doc/XWS-SecurityIntro4.html We implement the security on both the client-side & the server-side

Spring WS + Wss4jSecurityInterceptor + MTOM memory issues

╄→гoц情女王★ 提交于 2019-12-11 06:58:36
问题 This seems to be somewhat a longstanding question, and no definitive solution so far: situations where your incoming MTOM messages get inlined to the SOAP message, crashing the application due to memory usage. I'm creating a file upload webservice with Spring WS (2.1) using Apache Axiom (1.2.13) because the files I receive are big: <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"> <property name="payloadCaching" value="true"/> <property name=

How to get ip adress and port in web service

荒凉一梦 提交于 2019-12-11 03:45:23
问题 I have spring-ws deployed in my server. There is some task every day which should write ip adress and the port of server where this application run. How I can get this information ? I try InetAddress but with no success. There is no port. 回答1: Getting a hold of the servletRequest should be enough to put you on track to get the IP address. TransportContext ctx = TransportContextHolder.getTransportContext(); HttpServletConnection conn = (HttpServletConnection )ctx.getConnection();