Round4/GroupH/SimpleDoc

The standard WSDL description listed below can be found here. You can find additional information at the SOAP Builders round 4 site.

WSDL Interface

<?xml version="1.0" encoding="UTF-8"?>
<definitions
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:tns="http://soapinterop.org/wsdl"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:ns2="http://soapinterop.org/types"
        xmlns:ns3="http://soapinterop.org/types/part"
        xmlns:ns4="http://soapinterop.org/types/requestresponse"
        targetNamespace="http://soapinterop.org/wsdl">
        <types>
                <schema
                        xmlns="http://www.w3.org/2001/XMLSchema"
                        xmlns:tns="http://soapinterop.org/types"
                        targetNamespace="http://soapinterop.org/types">
                                                                           
                        <complexType name="ArrayOfString">
                                <sequence>
                                        <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
                                </sequence>
                        </complexType>
                                                                           
                        <complexType name="ArrayOfInt">
                                <sequence>
                                        <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:int"/>
                                </sequence>
                        </complexType>
                                                                           
                        <complexType name="ArrayOfFloat">
                                <sequence>
                                        <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:float"/>
                                </sequence>
                        </complexType>
                                                                           
                        <simpleType name="Enum">
                                <restriction base="xsd:int">
                                        <enumeration value="1"/>
                                        <enumeration value="2"/>
                                </restriction>
                        </simpleType>
                                                                           
                </schema>
                                                                           
                <schema
                        xmlns="http://www.w3.org/2001/XMLSchema"
                        xmlns:tns="http://soapinterop.org/types/part"
                        targetNamespace="http://soapinterop.org/types/part">
                                                                           
                        <element name="EmptyPart">
                                <complexType/>
                        </element>
                                                                           
                        <element name="StringPart" type="xsd:string"/>
                        <element name="IntPart" type="xsd:int"/>
                        <element name="FloatPart" type="xsd:float"/>
                        <element name="ArrayOfStringPart" type="ns2:ArrayOfString"/>
                        <element name="ArrayOfIntPart" type="ns2:ArrayOfInt"/>
                        <element name="ArrayOfFloatPart" type="ns2:ArrayOfFloat"/>
                        <element name="String2Part" type="xsd:string"/>
                        <element name="EnumPart" type="ns2:Enum"/>
                                                                           
                </schema>
                                                                           
                <schema
                        xmlns="http://www.w3.org/2001/XMLSchema"
                        xmlns:tns="http://soapinterop.org/types/requestresponse"
                        targetNamespace="http://soapinterop.org/types/requestresponse">
                                                                           
                        <element name="echoEmptyFaultRequest">
                                <complexType/>
                        </element>
                        <element name="echoEmptyFaultResponse">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoStringFaultRequest" type="xsd:string"/>
                        <element name="echoStringFaultResponse">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoIntArrayFaultRequest" type="ns2:ArrayOfInt"/>
                        <element name="echoIntArrayFaultResponse">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoMultipleFaults1Request">
                                <complexType>
                                        <sequence>
                                                <element name="whichFault" type="xsd:int"/>
                                                <element name="param1" type="xsd:string"/>
                                                <element name="param2" type="ns2:ArrayOfFloat"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="echoMultipleFaults1Response">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoMultipleFaults2Request">
                                <complexType>
                                        <sequence>
                                                <element name="whichFault" type="xsd:int"/>
                                                <element name="param1" type="xsd:string"/>
                                                <element name="param2" type="xsd:float"/>
                                                <element name="param3" type="ns2:ArrayOfString"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="echoMultipleFaults2Response">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoMultipleFaults3Request">
                                <complexType>
                                        <sequence>
                                                <element name="whichFault" type="xsd:int"/>
                                                <element name="param1" type="xsd:string"/>
                                                <element name="param2" type="xsd:string"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="echoMultipleFaults3Response">
                                <complexType/>
                        </element>
                                                                           
                        <element name="echoMultipleFaults4Request">
                                <complexType>
                                        <sequence>
                                                <element name="whichFault" type="xsd:int"/>
                                                <element name="param1" type="xsd:int"/>
                                                <element name="param2" type="ns2:Enum"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="echoMultipleFaults4Response">
                                <complexType/>
                        </element>
                                                                           
                </schema>
        </types>
                                                                           
        <message name="echoEmptyFaultRequest">
                <part name="param" element="ns4:echoEmptyFaultRequest"/>
        </message>
        <message name="echoEmptyFaultResponse">
                <part name="param" element="ns4:echoEmptyFaultResponse"/>
        </message>
                                                                           
        <message name="echoStringFaultRequest">
                <part name="param" element="ns4:echoStringFaultRequest"/>
        </message>
        <message name="echoStringFaultResponse">
                <part name="param" element="ns4:echoStringFaultResponse"/>
        </message>
                                                                           
        <message name="echoIntArrayFaultRequest">
                <part name="param" element="ns4:echoIntArrayFaultRequest"/>
        </message>
        <message name="echoIntArrayFaultResponse">
                <part name="param" element="ns4:echoIntArrayFaultResponse"/>
        </message>
                                                                           
        <message name="echoMultipleFaults1Request">
                <part name="param" element="ns4:echoMultipleFaults1Request"/>
        </message>
        <message name="echoMultipleFaults1Response">
                <part name="param" element="ns4:echoMultipleFaults1Response"/>
        </message>
                                                                           
        <message name="echoMultipleFaults2Request">
                <part name="param" element="ns4:echoMultipleFaults2Request"/>
        </message>
        <message name="echoMultipleFaults2Response">
                <part name="param" element="ns4:echoMultipleFaults2Response"/>
        </message>
                                                                           
        <message name="echoMultipleFaults3Request">
                <part name="param" element="ns4:echoMultipleFaults3Request"/>
        </message>
        <message name="echoMultipleFaults3Response">
                <part name="param" element="ns4:echoMultipleFaults3Response"/>
        </message>
                                                                           
        <message name="echoMultipleFaults4Request">
                <part name="param" element="ns4:echoMultipleFaults4Request"/>
        </message>
        <message name="echoMultipleFaults4Response">
                <part name="param" element="ns4:echoMultipleFaults4Response"/>
        </message>
                                                                           
        <!-- Fault messages -->
        <message name="EmptyFault">
                <part name="part1" element="ns3:EmptyPart"/>
        </message>
        <message name="StringFault">
                <part name="part2" element="ns3:StringPart"/>
        </message>
        <message name="IntFault">
                <part name="part3" element="ns3:IntPart"/>
        </message>
        <message name="FloatFault">
                <part name="part4" element="ns3:FloatPart"/>
        </message>
        <message name="StringArrayFault">
                <part name="part5" element="ns3:ArrayOfStringPart"/>
        </message>
        <message name="IntArrayFault">
                <part name="part6" element="ns3:ArrayOfIntPart"/>
        </message>
        <message name="FloatArrayFault">
                <part name="part7" element="ns3:ArrayOfFloatPart"/>
        </message>
        <!--
                Part name same as in Fault2 message
        -->
        <message name="String2Fault">
                <part name="part2" element="ns3:String2Part"/>
        </message>
        <message name="EnumFault">
                <part name="part9" element="ns3:EnumPart"/>
        </message>
                                                                           
        <portType name="SimpleDocLitPortType">
                <!--
                        Throws an empty fault
                -->
                <operation name="echoEmptyFault" parameterOrder="">
                        <input message="tns:echoEmptyFaultRequest"/>
                        <output message="tns:echoEmptyFaultResponse"/>
                        <fault name="SimpleFault" message="tns:EmptyFault"/>
                </operation>
                                                                           
                <!--
                        Throws fault with xsd:string parameter
                -->
                <operation name="echoStringFault" parameterOrder="param">
                        <input message="tns:echoStringFaultRequest"/>
                        <output message="tns:echoStringFaultResponse"/>
                        <fault name="SimpleFault" message="tns:StringFault"/>
                </operation>
                                                                           
                <!--
                        Throws fault with xsd:int[] parameter
                -->
                <operation name="echoIntArrayFault" parameterOrder="param">
                        <input message="tns:echoIntArrayFaultRequest"/>
                        <output message="tns:echoIntArrayFaultResponse"/>
                        <fault name="SimpleFault" message="tns:IntArrayFault"/>
                </operation>
                                                                           
                <!--
                        Throws empty fault, fault with a xsd:string
                        parameter and fault with xsd:float[] parameter
                -->
                <operation name="echoMultipleFaults1" parameterOrder="param">
                        <input message="tns:echoMultipleFaults1Request"/>
                        <output message="tns:echoMultipleFaults1Response"/>
                        <fault name="SimpleFault1" message="tns:EmptyFault"/>
                        <fault name="SimpleFault2" message="tns:StringFault"/>
                        <fault name="SimpleFault3" message="tns:FloatArrayFault"/>
                </operation>
                                                                           
                <!--
                        Throws fault with xsd:string parameter, fault with
                        xsd:float parameter and fault with xsd:string[]
                        parameters
                -->
                <operation name="echoMultipleFaults2" parameterOrder="param">
                        <input message="tns:echoMultipleFaults2Request"/>
                        <output message="tns:echoMultipleFaults2Response"/>
                        <fault name="SimpleFault1" message="tns:StringFault"/>
                        <fault name="SimpleFault2" message="tns:FloatFault"/>
                        <fault name="SimpleFault3" message="tns:StringArrayFault"/>
                </operation>
                                                                           
                <!--
                        Throws two faults, each with xsd:string parameters
                        and same part names
                -->
                <operation name="echoMultipleFaults3" parameterOrder="param">
                        <input message="tns:echoMultipleFaults3Request"/>
                        <output message="tns:echoMultipleFaults3Response"/>
                        <fault name="SimpleFault1" message="tns:StringFault"/>
                        <fault name="SimpleFault2" message="tns:String2Fault"/>
                </operation>
                                                                           
                <!--
                        Throws fault with xsd:int parameter and fault with an
                        int enumeration parameter
                -->
                <operation name="echoMultipleFaults4" parameterOrder="param">
                        <input message="tns:echoMultipleFaults4Request"/>
                        <output message="tns:echoMultipleFaults4Response"/>
                        <fault name="SimpleFault1" message="tns:IntFault"/>
                        <fault name="SimpleFault2" message="tns:EnumFault"/>
                </operation>
        </portType>
                                                                           
        <binding name="SimpleDocLitBinding" type="tns:SimpleDocLitPortType">
                <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
                                                                           
                <operation name="echoEmptyFault">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoStringFault">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoIntArrayFault">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoMultipleFaults1">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault1">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault2">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault3">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoMultipleFaults2">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault1">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault2">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault3">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoMultipleFaults3">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault1">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault2">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
                <operation name="echoMultipleFaults4">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                        <fault name="SimpleFault1">
                                <soap:fault use="literal"/>
                        </fault>
                        <fault name="SimpleFault2">
                                <soap:fault use="literal"/>
                        </fault>
                        <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/>
                </operation>
                                                                           
        </binding>
                                                                           
        <service name="SimpleDocLitService">
                <port name="SimpleDocLitPort" binding="tns:SimpleDocLitBinding">
                        <soap:address
                                location="http://soapinterop.novell.com/round4/grouph/simpledoc"/>
                </port>
        </service>
</definitions>
                                                                           

Client

If you invoke wsdl2java on the above WSDL document, you can run this client to interact with the service:

package grouph.simpledoc;
                                                                           
import javax.naming.InitialContext;
import javax.xml.rpc.Stub;
                                                                           
public class Client
{
    public static void main(String[] args) throws Exception
    {
    |   InitialContext ctx = new InitialContext();
    |   SimpleDocLitService service = (SimpleDocLitService)
    |           ctx.lookup("xmlrpc:soap:grouph.simpledoc.SimpleDocLitService");
    |   SimpleDocLitPortType stub = service.getSimpleDocLitPort();
    |                                                                      
    |   // set the end point address
    |   if (args.length > 0) 
    |       ((Stub)stub)._setProperty("javax.xml.rpc.service.endpoint.address",
    |           args[0]);
    |                                                                      
    |   echoEmptyFault(stub);
    |   echoStringFault(stub);
    |   echoIntArrayFault(stub);
    |   echoMultipleFaults1(stub);
    |   echoMultipleFaults2(stub);
    |   echoMultipleFaults3(stub);
    |   echoMultipleFaults4(stub);
    }
                                                                           
    public static void echoEmptyFault(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoEmptyFault: ");
    |   |   boolean result = Tests.echoEmptyFault(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoEmptyFault:" + 
    |   |       ex.getMessage());
    |   |   if (java.lang.System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoStringFault(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoStringFault: ");
    |   |   boolean result = Tests.echoStringFault(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoStringFault:" +
    |   |       ex.getMessage());
    |   |   if (java.lang.System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoIntArrayFault(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoIntArrayFault: ");
    |   |   boolean result = Tests.echoIntArrayFault(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoIntArrayFault:" + 
    |   |       ex.getMessage());
    |   |   if (System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoMultipleFaults1(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoMultipleFaults1: ");
    |   |   boolean result = Tests.echoMultipleFaults1(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoMultipleFaults1:" +  
    |   |       ex.getMessage());
    |   |   if (System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoMultipleFaults2(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoMultipleFaults2: ");
    |   |   boolean result = Tests.echoMultipleFaults2(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoMultipleFaults2:" +
    |   |       ex.getMessage());
    |   |   if (System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoMultipleFaults3(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoMultipleFaults3: ");
    |   |   boolean result = Tests.echoMultipleFaults3(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoMultipleFaults3:" +
    |   |       ex.getMessage());
    |   |   if (System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
                                                                           
    public static void echoMultipleFaults4(SimpleDocLitPortType stub)
    {
    |   try
    |   {
    |   |   System.out.print("echoMultipleFaults4: ");
    |   |   boolean result = Tests.echoMultipleFaults4(stub);
    |   |   System.out.println(result ? "OK" : "failed");
    |   }
    |   catch (java.lang.Exception ex)
    |   {
    |   |   System.out.println("error invoking echoMultipleFaults4:" +
    |   |       ex.getMessage());
    |   |   if (System.getProperty("DEBUG") != null)
    |   |       ex.printStackTrace();
    |   }
    }
}

Server

An implementation of the service endpoint from the above WSDL is listed below:

// Thu Oct 03 12:38:40 PDT 2002
                                                                           
package grouph.simpledoc;
                                                                           
import javax.servlet.ServletException;
                                                                           
public class ServerImpl extends SimpleDocLitPortType_ServiceSkeleton
{
    public void init()
        throws ServletException
    {
    |   super.init();
    |                                                                      
    |   // Set the WSDL file property
    |   _setProperty("xmlrpc.wsdl", "simple-doc-literal.wsdl");
    }
                                                                           
    public EchoEmptyFaultResponse echoEmptyFault(EchoEmptyFaultRequest i0)
        throws EmptyPart, java.rmi.RemoteException
    {
    |   throw new EmptyPart();
    }
                                                                           
    public EchoStringFaultResponse echoStringFault(String i0)
        throws StringFault, java.rmi.RemoteException
    {
    |   throw new StringFault(i0);
    }
                                                                           
    public grouph.simpledoc.EchoIntArrayFaultResponse echoIntArrayFault(int[] value1)
        throws ArrayOfInt, java.rmi.RemoteException
    {
    |   throw new ArrayOfInt(value1);
    }
                                                                           
    public EchoMultipleFaults1Response echoMultipleFaults1(int i0,
        java.lang.String i1, grouph.simpledoc.ArrayOfFloat i2)
        throws ArrayOfFloat, StringFault, 
        EmptyPart, java.rmi.RemoteException
    {
    |   if (i0 == 2) {
    |   |   throw new StringFault(i1);
    |   } else if (i0 == 3) {
    |   |   throw new ArrayOfFloat(i2.getValue());
    |   } else {
    |   |   throw new EmptyPart();
    |   }
    }
                                                                           
    public EchoMultipleFaults2Response echoMultipleFaults2(int i0,
        String i1, float i2, grouph.simpledoc.ArrayOfString i3)
        throws ArrayOfString, FloatFault, 
            StringFault, java.rmi.RemoteException
    {
    |   if (i0 == 2) {
    |   |   throw new StringFault(i1);
    |   } else if (i0 == 3) {
    |   |   throw new ArrayOfString(i3.getValue());
    |   } else {
    |   |   throw new FloatFault(i2);
    |   }
    }
                                                                           
    public EchoMultipleFaults3Response echoMultipleFaults3(int i0,
        java.lang.String i1, java.lang.String i2)
        throws String2Fault, StringFault, 
            java.rmi.RemoteException
    {
    |   if (i0 == 2) {
    |   |   throw new String2Fault(i2);
    |   } else {
    |   |   throw new StringFault(i1);
    |   }
    }
                                                                           
    public EchoMultipleFaults4Response echoMultipleFaults4(int i0,
        int i1, grouph.simpledoc.Enum i2)
        throws EnumFault, IntFault, java.rmi.RemoteException
    {
    |   if (i0 == 2) {
    |   |   throw new EnumFault(i2);
    |   } else {
    |   |   throw new IntFault(i1);
    |   }
    }
}
                                                                           


Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.