Announcement Announcement Module
Collapse
No announcement yet.
Web Service Client - from WSDL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web Service Client - from WSDL

    Hi guys,

    a colleague of mine wanted to create a simple Client from a WSDL. Having worked on the server side and SOAP UI as client, it was relatively simple.

    But I could not find the right documentation for setting up a WS client.

    Does he need to generate the subs?

    I could not find where in the config should we set the WSDL location.

    Code:
    <beans>
    
        <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
    
        <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
            <constructor-arg ref="messageFactory"/>
            <property name="defaultUri" value="http://example.com/WebService"/>
        </bean>
    
    </beans>


    Cheers
    Kris

  • #2
    I suggest the reference guide... YOu don't generate stubs etc. when using Spring-WS... You only need the JAXB classed and that is it. YOur webservice should be document oriented (prerably) so sending the correct document should be all you need. If it is more (soap action or ws-addressing) you need some additinal work, but that is also explained in the reference guide.

    Comment

    Working...
    X