spring-ws

How to set timeout in Spring WebServiceTemplate

这一生的挚爱 提交于 2019-11-27 13:26:22
I am using org.springframework.ws.client.core.WebServiceTemplate for making Web Service calls. How can i configure timeout for the call. Sathish Murugesan 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.springframework.ws.client.core.WebServiceTemplate"> <property name="defaultUri" value="$

Return Type for jdbcTemplate.queryForList(sql, object, classType)

佐手、 提交于 2019-11-27 12:57:25
问题 I'm executing a named query using jdbcTemplate.queryForList in the following manner: List<Conversation> conversations = jdbcTemplate.queryForList( SELECT_ALL_CONVERSATIONS_SQL_FULL, new Object[] {userId, dateFrom, dateTo}); The SQL query is: private final String SELECT_ALL_CONVERSATIONS_SQL_FULL = "select conversation.conversationID, conversation.room, " + "conversation.isExternal, conversation.startDate, " + "conversation.lastActivity, conversation.messageCount " + "from openfire

Add SoapHeader to org.springframework.ws.WebServiceMessage

社会主义新天地 提交于 2019-11-27 12:29:09
问题 How can I add an object into the soap header of a org.springframework.ws.WebServiceMessage This is the structure I'm looking to end up with: <soap:Header> <credentials xmlns="http://example.com/auth"> <username>username</username> <password>password</password> </credentials> </soap:Header> 回答1: Basically, you need to use a WebServiceMessageCallback in your client to modify the message after its creation but before it is sent. To rest of the code has been described pretty accurately by

Can I use Spring MVC and Spring WS in one single application?

耗尽温柔 提交于 2019-11-27 12:20:18
问题 Basically there is a back-end application that is exposing both SOAP as well as RESTful services. I have decided to use Spring WS 1.5.8 for SOAP services, and Spring MVC 3.0 for RESTful services as this is a new feature. upon reading a bit about Spring WS (I am new to this!) we got to declare a "MessageDispatcherServlet" which is a front controller, in web.xml for Spring WS. For Spring MVC we should declare a "DispatcherServlet" which is also a front controller, in web.xml. for both servlets

Spring-WS client not setting SOAPAction header

天涯浪子 提交于 2019-11-27 11:19:44
问题 I'm sending a SOAP request and the server is complaining that the SOAPAction header is empty. I think I'm setting it right, but obviously I'm not. Wireshark shows it's not set. @Test public void testLogin() throws Exception { StringBuffer loginXml = new StringBuffer(); loginXml.append("<soapenv:Envelope xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:ns=\"http://example.com/xyz/2010/08\">"); loginXml.append(" <soapenv:Header>"); loginXml.append(" <ns:loginOperationDetails>");

How to create spring-based executable jar with maven?

人盡茶涼 提交于 2019-11-27 03:43:35
I have a Maven based Spring-WS client project that I want to package as a single jar. In eclipse, everything runs properly. When I try to package it as an executable jar, I get ClassNotFound exceptions since the Spring jars are not included in my application jar. So I added the maven-shade-plugin to include all my dependencies in my application jar. When I look at my app jar, I see all the class files from all the dependencies included (all the library jar's are exploded). <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6

Which framework is better CXF or Spring-WS? [closed]

旧时模样 提交于 2019-11-26 18:47:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am in the process of researching/comparing CXF and Spring-WS for web services? I need to function both as a provider and a consumer of WS. In a nutshell, I have been told that Spring-WS is more configurable, but CXF is easier to get up and running. This question is subjective, but will help direct me in my

How to create spring-based executable jar with maven?

纵饮孤独 提交于 2019-11-26 10:50:53
问题 I have a Maven based Spring-WS client project that I want to package as a single jar. In eclipse, everything runs properly. When I try to package it as an executable jar, I get ClassNotFound exceptions since the Spring jars are not included in my application jar. So I added the maven-shade-plugin to include all my dependencies in my application jar. When I look at my app jar, I see all the class files from all the dependencies included (all the library jar\'s are exploded). <build> <plugins>

JAXB :Need Namespace Prefix to all the elements

不打扰是莪最后的温柔 提交于 2019-11-26 09:25:00
问题 I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namespace prefix (there is only a single namespace) in the SOAP request. Ex : <ns1:Login xmlns:ns1=\"www.example.com/a\"> <ns1:username>abc</ns1:username> <ns1:password>abc</ns1:password> </ns1:Login> But i am getting <Login xmlns=\"www.example.com/a\"> <username>abc<username> <password>abc<password> </Login> xsd : <?xml version