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="WSDLInteropTestRpcEncService" targetNamespace="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <types> <schema targetNamespace="http://soapinterop.org/xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOfstring"> <complexContent> <restriction base="SOAP-ENC:Array"> <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/> </restriction> </complexContent> </complexType> <complexType name="SOAPStruct"> <all> <element name="varFloat" type="xsd:float"/> <element name="varInt" type="xsd:int"/> <element name="varString" type="xsd:string"/> </all> </complexType> </schema> </types> <message name="echoString"> <part name="param0" type="xsd:string"/> </message> <message name="echoStringResponse"> <part name="return" type="xsd:string"/> </message> <message name="echoStringArray"> <part name="param0" type="xsd1:ArrayOfstring"/> </message> <message name="echoStringArrayResponse"> <part name="return" type="xsd1:ArrayOfstring"/> </message> <message name="echoStruct"> <part name="param0" type="xsd1:SOAPStruct"/> </message> <message name="echoStructResponse"> <part name="return" type="xsd1:SOAPStruct"/> </message> <message name="echoVoid"/> <message name="echoVoidResponse"/> <portType name="WSDLInteropTestRpcEncPortType"> <operation name="echoString"> <input message="tns:echoString" name="echoString"/> <output message="tns:echoStringResponse" name="echoStringResponse"/> </operation> <operation name="echoStringArray"> <input message="tns:echoStringArray" name="echoStringArray"/> <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> </operation> <operation name="echoStruct"> <input message="tns:echoStruct" name="echoStruct"/> <output message="tns:echoStructResponse" name="echoStructResponse"/> </operation> <operation name="echoVoid"> <input message="tns:echoVoid" name="echoVoid"/> <output message="tns:echoVoidResponse" name="echoVoidResponse"/> </operation> </portType> <binding name="WSDLInteropTestRpcEncPortBinding" type="tns:WSDLInteropTestRpcEncPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="echoString"> <soap:operation soapAction="" style="rpc"/> <input name="echoString"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </input> <output name="echoStringResponse"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </output> </operation> <operation name="echoStringArray"> <soap:operation soapAction="" style="rpc"/> <input name="echoStringArray"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </input> <output name="echoStringArrayResponse"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </output> </operation> <operation name="echoStruct"> <soap:operation soapAction="" style="rpc"/> <input name="echoStruct"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </input> <output name="echoStructResponse"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </output> </operation> <operation name="echoVoid"> <soap:operation soapAction="" style="rpc"/> <input name="echoVoid"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </input> <output name="echoVoidResponse"> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> </output> </operation> </binding> <service name="WSDLInteropTestRpcEncService"> <port binding="tns:WSDLInteropTestRpcEncPortBinding" name="WSDLInteropTestRpcEncPort"> <soap:address location="http://soapinterop.novell.com/interop/round3/groupe/rpcencoded"/> </port> </service> </definitions>
If you invoke wsdl2java on the above WSDL document, you can run this client to interact with the service:
package groupe.rpcencoded; import javax.naming.InitialContext; import javax.xml.rpc.Stub; public class Client { public static void main(String[] args) throws Exception { | InitialContext ctx = new InitialContext(); | WSDLInteropTestRpcEncService service = (WSDLInteropTestRpcEncService) | ctx.lookup("xmlrpc:soap:groupe.rpcencoded.WSDLInteropTestRpcEncService"); | WSDLInteropTestRpcEncPortType stub = service.getWSDLInteropTestRpcEncPort(); | | // set the end point address | if (args.length > 0) | ((Stub)stub)._setProperty("javax.xml.rpc.service.endpoint.address", | args[0]); | | echoVoid(stub); | echoString(stub); | echoStringArray(stub); | echoStruct(stub); } public static void echoVoid(WSDLInteropTestRpcEncPortType stub) { | try | { | | System.out.print("echoVoid: "); | | boolean result = Tests.echoVoid(stub); | | System.out.println(result ? "OK" : "failed"); | } | catch (java.lang.Exception ex) | { | | System.out.println("error invoking echoVoid:" + ex.getMessage()); | | if (java.lang.System.getProperty("DEBUG") != null) | | ex.printStackTrace(); | } } public static void echoString(WSDLInteropTestRpcEncPortType stub) { | try | { | | System.out.print("echoString: "); | | boolean result = Tests.echoString(stub); | | System.out.println(result ? "OK" : "failed"); | } | catch (java.lang.Exception ex) | { | | System.out.println("error invoking echoString:" + ex.getMessage()); | | if (java.lang.System.getProperty("DEBUG") != null) | | ex.printStackTrace(); | } } public static void echoStringArray(WSDLInteropTestRpcEncPortType stub) { | try | { | | System.out.print("echoStringArray: "); | | boolean result = Tests.echoStringArray(stub); | | System.out.println(result ? "OK" : "failed"); | } | catch (java.lang.Exception ex) | { | | System.out.println("error invoking echoStringArray:" + | | ex.getMessage()); | | if (java.lang.System.getProperty("DEBUG") != null) | | ex.printStackTrace(); | } } public static void echoStruct(WSDLInteropTestRpcEncPortType 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(); | } } }
An implementation of the service endpoint from the above WSDL is listed below:
// Thu Oct 03 12:38:40 PDT 2002 package groupe.rpcencoded; import groupe.rpcencoded.holders.*; import javax.servlet.ServletException; public class ServerImpl extends WSDLInteropTestRpcEncPortType_ServiceSkeleton { public void init() throws ServletException { | super.init(); | | // Set the WSDL file property | _setProperty("xmlrpc.wsdl", "InteropTestRpcEnc.wsdl"); } public void echoVoid() throws java.rmi.RemoteException { } public java.lang.String echoString(java.lang.String i0) throws java.rmi.RemoteException { | return i0; } public java.lang.String[] echoStringArray(java.lang.String[] i0) throws java.rmi.RemoteException { | return i0; } public groupe.rpcencoded.SOAPStruct echoStruct(groupe.rpcencoded.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.