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/main/" xmlns:wsdlns1="http://soapinterop.org/definitions/" xmlns:wsdlns="http://soapinterop.org/main/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <import location="imported/import2B.wsdl" namespace="http://soapinterop.org/definitions/" /> <binding name="SoapInteropImport2Binding" type="wsdlns1:SoapInteropImport2PortType"> <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> </binding> <service name="Import2"> <port name="SoapInteropImport2Port" binding="wsdlns:SoapInteropImport2Binding"> <soap:address location="http://soapineterop.novell.com/interop/round3/groupd/import2"/> </port> </service> </definitions>
If you invoke wsdl2java on the above WSDL document, you can run this client to interact with the service:
package groupd.import2; import javax.naming.InitialContext; import javax.xml.rpc.Stub; public class Client { public static void main(String[] args) throws Exception { | InitialContext ctx = new InitialContext(); | Import2 service = (Import2) | ctx.lookup("xmlrpc:soap:groupd.import2.Import2"); | SoapInteropImport2PortType stub = service.getSoapInteropImport2Port(); | | // set the end point address | if (args.length > 0) | ((Stub)stub)._setProperty("javax.xml.rpc.service.endpoint.address", | args[0]); | | echoStruct(stub); } public static void echoStruct(SoapInteropImport2PortType 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 groupd.import2; import groupd.import2.holders.*; import javax.servlet.ServletException; public class ServerImpl extends SoapInteropImport2PortType_ServiceSkeleton { public void init() throws ServletException { | super.init(); | | // Set the WSDL file property | _setProperty("xmlrpc.wsdl", "import2.wsdl"); } public groupd.import2.SOAPStruct echoStruct(groupd.import2.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.