The standard WSDL description listed below can be found here. You can find additional information at the SOAP Builders round 3 site.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/main2/"
xmlns:wsdlns="http://soapinterop.org/main2/"
xmlns:impns="http://soapinterop.org/definitions/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:typens2="http://soapinterop.org/xsd2"
xmlns:typens="http://soapinterop.org/xsd"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<import namespace = "http://soapinterop.org/xsd" location = "import2.wsdl"/>
<import namespace = "http://soapinterop.org/definitions/" location = "import2.wsdl"/>
<types>
<schema targetNamespace='http://soapinterop.org/xsd2'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
elementFormDefault='unqualified'>
<import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/>
<import namespace = "http://soapinterop.org/xsd"/>
<complexType name ='ArrayOfSOAPStruct'>
<complexContent>
<restriction base='SOAP-ENC:Array'>
<attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='typens:SOAPStruct[]'/>
</restriction>
</complexContent>
</complexType>
</schema>
</types>
<message name='Server.echoStructArray'>
<part name='inputArray' type='typens2:ArrayOfSOAPStruct'/>
</message>
<message name='Server.echoStructArrayResponse'>
<part name='Result' type='typens2:ArrayOfSOAPStruct'/>
</message>
<portType name="SoapInteropImport3PortType">
<operation name='echoStruct' parameterOrder='inputStruct'>
<input message='impns:Server.echoStruct' />
<output message='impns:Server.echoStructResponse' />
</operation>
<operation name='echoStructArray' parameterOrder='inputArray'>
<input message='wsdlns:Server.echoStructArray' />
<output message='wsdlns:Server.echoStructArrayResponse' />
</operation>
</portType>
<binding name="SoapInteropImport3Binding" type="wsdlns:SoapInteropImport3PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="echoStruct">
<soap:operation soapAction="http://soapinterop.org/"/>
<input>
<soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="echoStructArray">
<soap:operation soapAction="http://soapinterop.org/"/>
<input>
<soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="Import3">
<port name="SoapInteropImport3Port" binding="wsdlns:SoapInteropImport3Binding">
<soap:address location="http://soapinterop.novell.com/interop/round3/groupd/import3"/>
</port>
</service>
</definitions>
If you invoke wsdl2java on the above WSDL document, you can run this client to interact with the service:
package groupd.import3;
import javax.naming.InitialContext;
import javax.xml.rpc.Stub;
public class Client
{
public static void main(String[] args) throws Exception
{
| InitialContext ctx = new InitialContext();
| Import3 service = (Import3)
| ctx.lookup("xmlrpc:soap:groupd.import3.Import3");
| SoapInteropImport3PortType stub = service.getSoapInteropImport3Port();
|
| // set the end point address
| if (args.length > 0)
| ((Stub)stub)._setProperty("javax.xml.rpc.service.endpoint.address",
| args[0]);
|
| echoStruct(stub);
| echoStructArray(stub);
}
public static void echoStruct(SoapInteropImport3PortType stub)
{
| try
| {
| | System.out.print("echoStruct: ");
| | boolean result = Tests.echoStruct(stub);
| | System.out.println(result ? "OK" : "failed");
| }
| catch (java.lang.Exception ex)
| {
| | System.out.println("error invoking echoStruct:" + ex.getMessage());
| | if (java.lang.System.getProperty("DEBUG") != null)
| | ex.printStackTrace();
| }
}
public static void echoStructArray(SoapInteropImport3PortType stub)
{
| try
| {
| | System.out.print("echoStructArray: ");
| | boolean result = Tests.echoStructArray(stub);
| | System.out.println(result ? "OK" : "failed");
| }
| catch (java.lang.Exception ex)
| {
| | System.out.println("error invoking echoStructArray:" +
| | ex.getMessage());
| | if (java.lang.System.getProperty("DEBUG") != null)
| | ex.printStackTrace();
| }
}
}
An implementation of the service endpoint from the above WSDL is listed below:
// Thu Oct 03 12:38:40 PDT 2002
package groupd.import3;
import groupd.import3.holders.*;
import javax.servlet.ServletException;
public class ServerImpl extends SoapInteropImport3PortType_ServiceSkeleton
{
public void init()
throws ServletException
{
| super.init();
|
| // Set the WSDL file property
| _setProperty("xmlrpc.wsdl", "import3.wsdl");
}
public SOAPStruct echoStruct(SOAPStruct i0)
throws java.rmi.RemoteException
{
| return i0;
}
public SOAPStruct[] echoStructArray(SOAPStruct[] i0)
throws java.rmi.RemoteException
{
| return i0;
}
}
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.