Reputation: 103
So a guy send me a xsd and xpdl and told me to make requests to a SOAP gateway using this in Java.
What am I supposed to do with this? Load it or something? Can someone explain?
Any advice?
Upvotes: 0
Views: 349
Reputation: 26
You should receive a WSDL as well. Using WSDL then you can generate soap client in java.
Soap client is like a library which act as local set of classes and methods. You can use those to call operations to execute on SOAP gateway. Its like you are calling a function locally but when executed, it will run on the SOAP gateway (remote server) where this function logic is implemented and hosted.
Upvotes: 1
Reputation: 1175
wsdl contains SOAP endpoints and xsd for data validation and description. Suppose you have a SOAP request like this
<message name = "SayHelloRequest">
<part name = "firstName" type = "xsd:string"/>
</message>
<message name = "SayHelloResponse">
<part name = "greeting" type = "xsd:string"/>
</message>
<portType name = "Hello_PortType">
<operation name = "sayHello">
<input message = "tns:SayHelloRequest"/>
<output message = "tns:SayHelloResponse"/>
</operation>
</portType>
here SayHelloRequest is request definition and SayHelloResponse is response defination. and Now suppose you have an Java Plain Object and then you need to define this on XSD like below code
<xs:element name="Person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
you can define in XSD datatypes and its validation.
For simplicity xsd validate document and metadata anotherway WSDL is to describe the webservice location and operations. you can generate java classes from wsdl and yu can follow this link https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jst.ws.cxf.doc.user%2Ftasks%2Fcreate_client.html
Upvotes: 0