Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Spring Web Services 1.5

  1. #11
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Quote Originally Posted by vinay563 View Post
    1.How can i publish the jms details like defaulturi(jms:RequestQueue)and the connectionurl (tcp://localhost:61616) in the wsdl using the DynamicWsdl11Definition
    You can set the locationUri in the XsdBasedSoap11Wsdl4jDefinitionBuilder. Just change it from a HTTP location to a jms location. Note that this could mean that you need to have multiple WSDLs, one for HTTP and one for JMS. You can't specify the connection url in there, because I think that is ActiveMQ-specific.

    Quote Originally Posted by vinay563 View Post
    2.Can i access the jms message before sending it over the detination similarly on the service side can i access the jmsmessage before the endpoint is invoked.
    You currently can't. That might be a nice feature to add.

    Quote Originally Posted by vinay563 View Post
    3.how can i set the jms replyto property
    You can define a replyToName in the jsm uri, i.e. jms:requestQueue?replyToName=responseQueue

    Quote Originally Posted by vinay563 View Post
    4.how to provide the jms jndi related properties.
    You mean the connection factory name and others? These properties are not supported, since in spring you either don't use JNDI for getting a connectionfactory, or use <jee:jndi-lookup/> to inject a connectionfactory into the messagesender.

    I hope you like the JMS support .
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  2. #12

    Default

    Is the current 1.5 snapshot supposed to be Spring 2.5 compatible?

    I am not able to use Spring 2.5 with any version of Spring Web Services because the class MessageDispatcherServlet extends org.springframework.web.servlet.FrameworkServlet, which is not in Spring 2.5

  3. #13
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Yes it is in spring, just not in spring.jar. It's a separate jar: spring-webmvc.jar
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  4. #14
    Join Date
    May 2007
    Location
    Les Boscailles - Eghezée - Belgium
    Posts
    54

    Default

    Is this means that it's actually not possible to use Spring-ws 1.0.2 with Spring 2.5 ?

    Thanks

  5. #15
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    No, it does not mean that. Spring-WS 1.0.2 and Spring 2.5 work together, but you have to put the spring-webmvc.jar on the classpath explicitly. The classes in this jar used to be part of spring.jar (the uberjar), but since 2.5, that's not the case any more.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  6. #16
    Join Date
    May 2007
    Location
    Les Boscailles - Eghezée - Belgium
    Posts
    54

    Default

    Quote Originally Posted by Arjen Poutsma View Post
    No, it does not mean that. Spring-WS 1.0.2 and Spring 2.5 work together, but you have to put the spring-webmvc.jar on the classpath explicitly. The classes in this jar used to be part of spring.jar (the uberjar), but since 2.5, that's not the case any more.

    Ok thanks.

    I'm fighting with my maven 2 dependencies configuration excluding some to avoid conflict ... but now it seems to work.

    Thanks again

  7. #17
    Join Date
    Nov 2007
    Posts
    8

    Default

    Quote Originally Posted by Arjen Poutsma View Post
    You can set the locationUri in the XsdBasedSoap11Wsdl4jDefinitionBuilder. Just change it from a HTTP location to a jms location. Note that this could mean that you need to have multiple WSDLs, one for HTTP and one for JMS. You can't specify the connection url in there, because I think that is ActiveMQ-specific.



    You currently can't. That might be a nice feature to add.



    You can define a replyToName in the jsm uri, i.e. jms:requestQueue?replyToName=responseQueue



    You mean the connection factory name and others? These properties are not supported, since in spring you either don't use JNDI for getting a connectionfactory, or use <jee:jndi-lookup/> to inject a connectionfactory into the messagesender.

    I hope you like the JMS support .


    Thanks for your great support Arjen,

    while iam using the jms uri by specifying the replyToName i got the following exception.

    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is java.lang.ClassCastException: org.apache.activemq.command.ActiveMQTextMessage
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:488)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:441)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)

    root cause

    java.lang.ClassCastException: org.apache.activemq.command.ActiveMQTextMessage
    org.springframework.ws.transport.jms.JmsSenderConn ection.onReceiveBeforeRead(JmsSenderConnection.jav a:195)
    org.springframework.ws.transport.AbstractWebServic eConnection.receive(AbstractWebServiceConnection.j ava:46)
    org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:412)
    org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 266)
    org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 254)
    org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 246)
    com.wsgc.services.atp.client.integration.wsclient. jms.impl.FindATPClientJMSImpl.sendMessage(FindATPC lientJMSImpl.java:92)
    com.wsgc.services.atp.client.integration.wsclient. jms.impl.FindATPClientJMSImpl.findATP(FindATPClien tJMSImpl.java:55)
    com.wsgc.services.atp.client.services.impl.ATPMana gerImpl.findATPByJmsCall(ATPManagerImpl.java:18)
    com.wsgc.services.atp.client.web.controller.FindAT PFormController.onSubmit(FindATPFormController.jav a:62)
    org.springframework.web.servlet.mvc.SimpleFormCont roller.processFormSubmission(SimpleFormController. java:267)
    org.springframework.web.servlet.mvc.AbstractFormCo ntroller.handleRequestInternal(AbstractFormControl ler.java:265)
    org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:153)
    org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:48)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:858)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:792)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:476)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:441)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)


    Can i use the soap over jms over the Spring 1.0.2 version by adding the jars necessary or i should change all my spring WS dependencies to 1.5.

  8. #18
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    The error you get is from receiving a JMS TextMessage response to the BytesMessage you sent as a request. Spring-WS uses BytesMessages at both server and client-side. I've improved the code in svn, now it throws an more illustrative exception in this case.

    Are you using Spring-WS at the server side here as well?
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  9. #19
    Join Date
    Nov 2007
    Posts
    8

    Default

    Quote Originally Posted by Arjen Poutsma View Post
    The error you get is from receiving a JMS TextMessage response to the BytesMessage you sent as a request. Spring-WS uses BytesMessages at both server and client-side. I've improved the code in svn, now it throws an more illustrative exception in this case.

    Are you using Spring-WS at the server side here as well?
    I am using Spring-WS for both client and service.I didnt write any code for handling jms.i just used the WebServiceTemplate(with JmsMessageSender ) at the client side and WebServiceMessageListener on the server side.

    It worked fine if i did not give any replyTo property when i mentioned the replyTo property i am getting the above error.

  10. #20

    Default XStreamMarshaller and XSL

    I would like to use XStream combined with XSL to do marshalling/unmashalling. Would it be possible to have the xstream object in XStreamMarshaller made protected instead of private so that it could be use in sub-classes?

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •