spring-ws

How to set timeout in Spring WebServiceTemplate

妖精的绣舞 提交于 2019-12-28 05:35:19
问题 I am using org.springframework.ws.client.core.WebServiceTemplate for making Web Service calls. How can i configure timeout for the call. 回答1: If you are using Spring Webservices 2.1.0 version, You can set timeout using HttpComponentsMessageSender. CommonsHttpMessageSender are deprecated and not recommended by Spring anymore. The way I have it implemented, I define my WebServiceTemplate to use HttpComponentsMessageSender. Values are in Milliseconds <bean id="webServiceTemplate" class="org

ID Attribute missing while marshaling during webservicetemplate.convertandsend(…)

女生的网名这么多〃 提交于 2019-12-25 12:46:38
问题 I am using jaxb2Marshaller for consuming a SOAP service. I am using it inside Spring webServiceTemplate. The marhsalling works fine on windows but not on linux. The issue only comes for attribute named "ID". Changing the attribute name to "id" or something else works fine. Is there any difference between marshaling done on windows and linux? Spring WebserviceTemplate configuration: <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"> <property name=

Is it possible to rename th response namespace-prefix in a Spring WS webservice?

陌路散爱 提交于 2019-12-25 02:53:58
问题 I've build a Spring WS webservice based on the example at http://spring.io/guides/gs/producing-web-service/. The response contains my namespace with the prefix "ns2". xmlns:ns2="http://www.mycompany.com/somewhere" Soap-Response <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:mitteilungResponse xmlns:ns2="http://www.mycompany.com/somewhere"> <ns2:responseContent> <ns2:message>Hello World!</ns2:message> </ns2:responseContent

Spring-Core-WS isn't compatible with Spring 4.3.0 is it?

本小妞迷上赌 提交于 2019-12-24 07:09:08
问题 I always try to use the latest jars/apis in my Spring project. We had a Spring 4.2.4.RELEASE and then I upgraded to 4.3.0. Everything builds and compiles just fine ... however, when I try to run my unit tests, I was getting an error message. I did trace it down to Spring-WS-Core and Spring-WS-Core-Test 2.3.0 pulls in: Spring-core, web, webmvc, beans 4.0.9. Has anyone else seen this before? Do I have to go back to Spring 4.2? Thanks! 回答1: I downgraded my app to 4.2.7.RELEASE which was the

How can I handle Castor unmarshaling of SOAP messages when the namespace is defined inside the operation tag?

旧巷老猫 提交于 2019-12-24 01:19:16
问题 I am developing a contract-first web service based on Spring-WS. I'm relying on Castor marshaling, and I have run into the following issue. Requests are being accepted when the "xmlns" namespace is defined in the Envelope tag, such as: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.mycompany.com/MyService/schemas"> <soap:Header/> <soap:Body> <doPlaceHoldRequest> <hold> <accountInfo> <accountNumber>123456789</accountNumber> </accountInfo> <extended

Spring WS WebServicesTemplate/Jaxb2Marshaller client view raw xml?

陌路散爱 提交于 2019-12-23 21:00:33
问题 Is it possible to view the request and the response for a Spring WS client using WebServicesTemplate and Jxb2Marshaller as the marshaling engine? I simply wan to to log the xml, not perform any actions upon the raw xml. 回答1: See the spring-ws documentation: http://static.springsource.org/spring-ws/sites/2.0/reference/html/common.html#logging You can log messages via the standard Commons Logging interface: To log all server-side messages, simply set the org.springframework.ws.server

Camel route using spring-ws client occasionally throws javax.xml.transform.stax.StAXSource exception

南楼画角 提交于 2019-12-23 15:53:47
问题 I have a camel 'seda' route that contains code roughly: JaxbDataFormat jaxb = new JaxbDataFormat(false); jaxb.setContextPath("com.example.data.api"); from("seda:validate") .marshal(jaxb) .to("spring-ws:" + getDataServiceURL()) .unmarshal(jaxb) I send an object from com.example.data.api, the JaxbDataFormat formatter sets it up as a SOAP request and passes it along wo spring-ws to actually send to my service. This works like a charm most of the time. I say "most" because every now and then,

java.lang.NoClassDefFoundError: org/springframework/security/authentication/AuthenticationManager

核能气质少年 提交于 2019-12-23 10:49:28
问题 I am trying to implement authentication on Spring web service by referring the following link: http://docs.spring.io/spring-ws/site/reference/html/security.html Following is the configuration I have added: <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="interceptors"> <list> <ref local="wsServerSecurityInterceptor" /> <ref local="payloadValidatingIterceptor" /> </list> </property> </bean> <bean id=

Producing SOAP webservices with spring-ws with Soap v1.2 instead of the default v1.1

空扰寡人 提交于 2019-12-23 07:29:33
问题 I am currently working on Spring soap server project. I started off with the Getting Started guide from Spring here http://spring.io/guides/gs/producing-web-service/ to build a basic SOAP service. The default SOAP protocol is SOAP v1.1. Is there a way I could set the protocol to v1.2, possibly via annotations? I tried @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) annotation on the @Endpoint class but it doesnt seem to work. I also tried @Endpoint(value = SOAPBinding

Spring boot Spring ws security for soap based web service

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 05:01:59
问题 I have the following implementation in place for SOAP based web service and its security. package com.hcentive.webservice.soap; import org.apache.log4j.Logger; import org.springframework.boot.context.embedded.ServletRegistrationBean; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; import org.springframework.core