Results 1 to 2 of 2

Thread: Web Service Client - from WSDL

  1. #1
    Join Date
    Jul 2007
    Location
    Mauritius
    Posts
    127

    Default 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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