You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/02/03 10:22:01 UTC
svn commit: r151140 - in
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src:
./ org/ org/apache/ org/apache/axis/ org/apache/axis/samples/
org/apache/axis/samples/userguide/ org/apache/axis/samples/userguide/client/
org/apache/axis/samples/userguide/server/
Author: chathura
Date: Thu Feb 3 01:21:58 2005
New Revision: 151140
URL: http://svn.apache.org/viewcvs?view=rev&rev=151140
Log:
Restructured packages
Added:
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/InteropTest.wsdl
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoInt.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoString.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/InteropTest_Stub.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/SampleEnvironmentCreator.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/TestServer.java
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/InteropTest.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/InteropTest.wsdl?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/InteropTest.wsdl (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/InteropTest.wsdl Thu Feb 3 01:21:58 2005
@@ -0,0 +1,717 @@
+<?xml version="1.0"?>
+<!-- This WSDL file is a combination of the InteropTest.wsdl -->
+<!-- and InteropTest2.wsdl files from White Mesa -->
+<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:s="http://soapinterop.org/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xml-soap="http://xml.apache.org/xml-soap">
+
+ <!-- These are the types defined for Round 2 A and B -->
+ <!-- These types were copied from white mesa InteropTest.wsdl/InteropTestB.wsdl -->
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
+ <import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="ArrayOfstring">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="ArrayOfint">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="ArrayOffloat">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="ArrayOfSOAPStruct">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="SOAPStruct">
+ <all>
+ <element name="varString" type="string"/>
+ <element name="varInt" type="int"/>
+ <element name="varFloat" type="float"/>
+ </all>
+ </complexType>
+ <complexType name="SOAPStructStruct">
+ <all>
+ <element name="varString" type="string"/>
+ <element name="varInt" type="int"/>
+ <element name="varFloat" type="float"/>
+ <element name="varStruct" type="s:SOAPStruct"/>
+ </all>
+ </complexType>
+ <complexType name="SOAPArrayStruct">
+ <all>
+ <element name="varString" type="string"/>
+ <element name="varInt" type="int"/>
+ <element name="varFloat" type="float"/>
+ <element name="varArray" type="s:ArrayOfstring"/>
+ </all>
+ </complexType>
+ <complexType name="ArrayOfString2D">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[,]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfMap">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xml-soap:Map[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </schema>
+ </types>
+
+ <!-- message, portType and binding for Round 2 tests -->
+ <!-- Copied from white mesa InteropTest.wsdl -->
+ <message name="echoStringRequest">
+ <part name="inputString" type="xsd:string"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="echoStringArrayRequest">
+ <part name="inputStringArray" type="s:ArrayOfstring"/>
+ </message>
+ <message name="echoStringArrayResponse">
+ <part name="return" type="s:ArrayOfstring"/>
+ </message>
+ <message name="echoIntegerRequest">
+ <part name="inputInteger" type="xsd:int"/>
+ </message>
+ <message name="echoIntegerResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="echoIntegerArrayRequest">
+ <part name="inputIntegerArray" type="s:ArrayOfint"/>
+ </message>
+ <message name="echoIntegerArrayResponse">
+ <part name="return" type="s:ArrayOfint"/>
+ </message>
+ <message name="echoFloatRequest">
+ <part name="inputFloat" type="xsd:float"/>
+ </message>
+ <message name="echoFloatResponse">
+ <part name="return" type="xsd:float"/>
+ </message>
+ <message name="echoFloatArrayRequest">
+ <part name="inputFloatArray" type="s:ArrayOffloat"/>
+ </message>
+ <message name="echoFloatArrayResponse">
+ <part name="return" type="s:ArrayOffloat"/>
+ </message>
+ <message name="echoStructRequest">
+ <part name="inputStruct" type="s:SOAPStruct"/>
+ </message>
+ <message name="echoStructResponse">
+ <part name="return" type="s:SOAPStruct"/>
+ </message>
+ <message name="echoStructArrayRequest">
+ <part name="inputStructArray" type="s:ArrayOfSOAPStruct"/>
+ </message>
+ <message name="echoStructArrayResponse">
+ <part name="return" type="s:ArrayOfSOAPStruct"/>
+ </message>
+ <message name="echoVoidRequest"/>
+ <message name="echoVoidResponse"/>
+ <message name="echoBase64Request">
+ <part name="inputBase64" type="xsd:base64Binary"/>
+ </message>
+ <message name="echoBase64Response">
+ <part name="return" type="xsd:base64Binary"/>
+ </message>
+ <message name="echoDateRequest">
+ <part name="inputDate" type="xsd:dateTime"/>
+ </message>
+ <message name="echoDateResponse">
+ <part name="return" type="xsd:dateTime"/>
+ </message>
+ <message name="echoHexBinaryRequest">
+ <part name="inputHexBinary" type="xsd:hexBinary"/>
+ </message>
+ <message name="echoHexBinaryResponse">
+ <part name="return" type="xsd:hexBinary"/>
+ </message>
+ <message name="echoDecimalRequest">
+ <part name="inputDecimal" type="xsd:decimal"/>
+ </message>
+ <message name="echoDecimalResponse">
+ <part name="return" type="xsd:decimal"/>
+ </message>
+ <message name="echoBooleanRequest">
+ <part name="inputBoolean" type="xsd:boolean"/>
+ </message>
+ <message name="echoBooleanResponse">
+ <part name="return" type="xsd:boolean"/>
+ </message>
+
+ <!-- messages for Round 2B tests -->
+ <!-- Copied from white mesa InteropTestB.wsdl -->
+ <message name="echoStructAsSimpleTypesRequest">
+ <part name="inputStruct" type="s:SOAPStruct"/>
+ </message>
+ <message name="echoStructAsSimpleTypesResponse">
+ <part name="outputString" type="xsd:string"/>
+ <part name="outputInteger" type="xsd:int"/>
+ <part name="outputFloat" type="xsd:float"/>
+ </message>
+ <message name="echoSimpleTypesAsStructRequest">
+ <part name="inputString" type="xsd:string"/>
+ <part name="inputInteger" type="xsd:int"/>
+ <part name="inputFloat" type="xsd:float"/>
+ </message>
+ <message name="echoSimpleTypesAsStructResponse">
+ <part name="return" type="s:SOAPStruct"/>
+ </message>
+ <message name="echo2DStringArrayRequest">
+ <part name="input2DStringArray" type="s:ArrayOfString2D"/>
+ </message>
+ <message name="echo2DStringArrayResponse">
+ <part name="return" type="s:ArrayOfString2D"/>
+ </message>
+ <message name="echoNestedStructRequest">
+ <part name="inputStruct" type="s:SOAPStructStruct"/>
+ </message>
+ <message name="echoNestedStructResponse">
+ <part name="return" type="s:SOAPStructStruct"/>
+ </message>
+ <message name="echoNestedArrayRequest">
+ <part name="inputStruct" type="s:SOAPArrayStruct"/>
+ </message>
+ <message name="echoNestedArrayResponse">
+ <part name="return" type="s:SOAPArrayStruct"/>
+ </message>
+
+ <message name="echoMapRequest">
+ <part name="input" type="xml-soap:Map"/>
+ </message>
+ <message name="echoMapResponse">
+ <part name="return" type="xml-soap:Map"/>
+ </message>
+
+ <message name="echoMapArrayRequest">
+ <part name="input" type="s:ArrayOfMap"/>
+ </message>
+ <message name="echoMapArrayResponse">
+ <part name="return" type="s:ArrayOfMap"/>
+ </message>
+
+ <message name="echoTokenRequest">
+ <part name="inputToken" type="xsd:token"/>
+ </message>
+ <message name="echoTokenResponse">
+ <part name="return" type="xsd:token"/>
+ </message>
+
+ <message name="echoNormalizedStringRequest">
+ <part name="inputNormalizedString" type="xsd:normalizedString"/>
+ </message>
+ <message name="echoNormalizedStringResponse">
+ <part name="return" type="xsd:normalizedString"/>
+ </message>
+
+ <message name="echoUnsignedLongRequest">
+ <part name="inputUnsignedLong" type="xsd:unsignedLong"/>
+ </message>
+ <message name="echoUnsignedLongResponse">
+ <part name="return" type="xsd:unsignedLong"/>
+ </message>
+
+ <message name="echoUnsignedIntRequest">
+ <part name="inputUnsignedInt" type="xsd:unsignedInt"/>
+ </message>
+ <message name="echoUnsignedIntResponse">
+ <part name="return" type="xsd:unsignedInt"/>
+ </message>
+
+ <message name="echoUnsignedShortRequest">
+ <part name="inputUnsignedShort" type="xsd:unsignedShort"/>
+ </message>
+ <message name="echoUnsignedShortResponse">
+ <part name="return" type="xsd:unsignedShort"/>
+ </message>
+
+ <message name="echoUnsignedByteRequest">
+ <part name="inputUnsignedByte" type="xsd:unsignedByte"/>
+ </message>
+ <message name="echoUnsignedByteResponse">
+ <part name="return" type="xsd:unsignedByte"/>
+ </message>
+
+ <message name="echoNonNegativeIntegerRequest">
+ <part name="inputNonNegativeInteger" type="xsd:nonNegativeInteger"/>
+ </message>
+ <message name="echoNonNegativeIntegerResponse">
+ <part name="return" type="xsd:nonNegativeInteger"/>
+ </message>
+
+ <message name="echoPositiveIntegerRequest">
+ <part name="inputPositiveInteger" type="xsd:positiveInteger"/>
+ </message>
+ <message name="echoPositiveIntegerResponse">
+ <part name="return" type="xsd:positiveInteger"/>
+ </message>
+
+ <message name="echoNonPositiveIntegerRequest">
+ <part name="inputNonPositiveInteger" type="xsd:nonPositiveInteger"/>
+ </message>
+ <message name="echoNonPositiveIntegerResponse">
+ <part name="return" type="xsd:nonPositiveInteger"/>
+ </message>
+
+ <message name="echoNegativeIntegerRequest">
+ <part name="inputNegativeInteger" type="xsd:negativeInteger"/>
+ </message>
+ <message name="echoNegativeIntegerResponse">
+ <part name="return" type="xsd:negativeInteger"/>
+ </message>
+
+ <portType name="InteropTestPortType">
+ <operation name="echoString" parameterOrder="inputString">
+ <input message="tns:echoStringRequest"/>
+ <output message="tns:echoStringResponse"/>
+ </operation>
+ <operation name="echoStringArray" parameterOrder="inputStringArray">
+ <input message="tns:echoStringArrayRequest"/>
+ <output message="tns:echoStringArrayResponse"/>
+ </operation>
+ <operation name="echoInteger" parameterOrder="inputInteger">
+ <input message="tns:echoIntegerRequest"/>
+ <output message="tns:echoIntegerResponse"/>
+ </operation>
+ <operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
+ <input message="tns:echoIntegerArrayRequest"/>
+ <output message="tns:echoIntegerArrayResponse"/>
+ </operation>
+ <operation name="echoFloat" parameterOrder="inputFloat">
+ <input message="tns:echoFloatRequest"/>
+ <output message="tns:echoFloatResponse"/>
+ </operation>
+ <operation name="echoFloatArray" parameterOrder="inputFloatArray">
+ <input message="tns:echoFloatArrayRequest"/>
+ <output message="tns:echoFloatArrayResponse"/>
+ </operation>
+ <operation name="echoStruct" parameterOrder="inputStruct">
+ <input message="tns:echoStructRequest"/>
+ <output message="tns:echoStructResponse"/>
+ </operation>
+ <operation name="echoStructArray" parameterOrder="inputStructArray">
+ <input message="tns:echoStructArrayRequest"/>
+ <output message="tns:echoStructArrayResponse"/>
+ </operation>
+ <operation name="echoVoid">
+ <input message="tns:echoVoidRequest"/>
+ <output message="tns:echoVoidResponse"/>
+ </operation>
+ <operation name="echoBase64" parameterOrder="inputBase64">
+ <input message="tns:echoBase64Request"/>
+ <output message="tns:echoBase64Response"/>
+ </operation>
+ <operation name="echoDate" parameterOrder="inputDate">
+ <input message="tns:echoDateRequest"/>
+ <output message="tns:echoDateResponse"/>
+ </operation>
+ <operation name="echoHexBinary" parameterOrder="inputHexBinary">
+ <input message="tns:echoHexBinaryRequest"/>
+ <output message="tns:echoHexBinaryResponse"/>
+ </operation>
+ <operation name="echoDecimal" parameterOrder="inputDecimal">
+ <input message="tns:echoDecimalRequest"/>
+ <output message="tns:echoDecimalResponse"/>
+ </operation>
+ <operation name="echoBoolean" parameterOrder="inputBoolean">
+ <input message="tns:echoBooleanRequest"/>
+ <output message="tns:echoBooleanResponse"/>
+ </operation>
+
+ <!-- Round2B operations -->
+ <operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat">
+ <input message="tns:echoStructAsSimpleTypesRequest"/>
+ <output message="tns:echoStructAsSimpleTypesResponse"/>
+ </operation>
+ <operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat">
+ <input message="tns:echoSimpleTypesAsStructRequest"/>
+ <output message="tns:echoSimpleTypesAsStructResponse"/>
+ </operation>
+ <operation name="echo2DStringArray" parameterOrder="input2DStringArray">
+ <input message="tns:echo2DStringArrayRequest"/>
+ <output message="tns:echo2DStringArrayResponse"/>
+ </operation>
+ <operation name="echoNestedStruct" parameterOrder="inputStruct">
+ <input message="tns:echoNestedStructRequest"/>
+ <output message="tns:echoNestedStructResponse"/>
+ </operation>
+ <operation name="echoNestedArray" parameterOrder="inputStruct">
+ <input message="tns:echoNestedArrayRequest"/>
+ <output message="tns:echoNestedArrayResponse"/>
+ </operation>
+
+
+ <operation name="echoMap" parameterOrder="input">
+ <input message="tns:echoMapRequest"/>
+ <output message="tns:echoMapResponse"/>
+ </operation>
+ <operation name="echoMapArray" parameterOrder="input">
+ <input message="tns:echoMapArrayRequest"/>
+ <output message="tns:echoMapArrayResponse"/>
+ </operation>
+
+ <operation name="echoToken">
+ <input message="tns:echoTokenRequest"/>
+ <output message="tns:echoTokenResponse"/>
+ </operation>
+
+ <operation name="echoNormalizedString">
+ <input message="tns:echoNormalizedStringRequest"/>
+ <output message="tns:echoNormalizedStringResponse"/>
+ </operation>
+
+ <operation name="echoUnsignedLong">
+ <input message="tns:echoUnsignedLongRequest"/>
+ <output message="tns:echoUnsignedLongResponse"/>
+ </operation>
+ <operation name="echoUnsignedInt">
+ <input message="tns:echoUnsignedIntRequest"/>
+ <output message="tns:echoUnsignedIntResponse"/>
+ </operation>
+ <operation name="echoUnsignedShort">
+ <input message="tns:echoUnsignedShortRequest"/>
+ <output message="tns:echoUnsignedShortResponse"/>
+ </operation>
+ <operation name="echoUnsignedByte">
+ <input message="tns:echoUnsignedByteRequest"/>
+ <output message="tns:echoUnsignedByteResponse"/>
+ </operation>
+ <operation name="echoNonNegativeInteger">
+ <input message="tns:echoNonNegativeIntegerRequest"/>
+ <output message="tns:echoNonNegativeIntegerResponse"/>
+ </operation>
+ <operation name="echoPositiveInteger">
+ <input message="tns:echoPositiveIntegerRequest"/>
+ <output message="tns:echoPositiveIntegerResponse"/>
+ </operation>
+ <operation name="echoNonPositiveInteger">
+ <input message="tns:echoNonPositiveIntegerRequest"/>
+ <output message="tns:echoNonPositiveIntegerResponse"/>
+ </operation>
+ <operation name="echoNegativeInteger">
+ <input message="tns:echoNegativeIntegerRequest"/>
+ <output message="tns:echoNegativeIntegerResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="InteropTestSoapBinding" type="tns:InteropTestPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoStringArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoInteger">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoIntegerArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoFloat">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoFloatArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoStruct">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" 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.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoVoid">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoBase64">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoDate">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoHexBinary">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoDecimal">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoBoolean">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <!-- Round2B Binding operations -->
+ <operation name="echoStructAsSimpleTypes">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoSimpleTypesAsStruct">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echo2DStringArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoNestedStruct">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoNestedArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="echoMap">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoMapArray">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="echoToken">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="echoNormalizedString">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="echoUnsignedLong">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoUnsignedInt">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoUnsignedShort">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoUnsignedByte">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoNonNegativeInteger">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoPositiveInteger">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoNonPositiveInteger">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="echoNegativeInteger">
+ <soap:operation soapAction="http://soapinterop.org/"/>
+ <input>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+
+ <!-- Service Description for Axis -->
+ <service name="InteropTestService">
+
+ <port binding="tns:InteropTestSoapBinding" name="echo">
+
+ <soap:address location="http://nagoya.apache.org:5049/axis/services/echo"/>
+
+ </port>
+ </service>
+
+</definitions>
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoInt.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoInt.java?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoInt.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoInt.java Thu Feb 3 01:21:58 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.samples.userguide.client;
+
+import java.net.URL;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.engine.EngineUtils;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class EchoInt {
+
+ public static void main(String[] args) throws Exception {
+ InteropTest_Stub clientStub = new InteropTest_Stub();
+ URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis/services/EchoXMLService");
+ clientStub.setEnePointReference(new EndpointReference(AddressingConstants.WSA_TO, url.toString()));
+ Integer echoInt = clientStub.echoInt(new Integer(794));
+ System.out.println(echoInt);
+
+ }
+
+}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoString.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoString.java?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoString.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/EchoString.java Thu Feb 3 01:21:58 2005
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.samples.userguide.client;
+
+import java.net.URL;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.engine.EngineUtils;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class EchoString {
+
+ public static void main(String[] args) throws Exception{
+ InteropTest_Stub stub =new InteropTest_Stub();
+ URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis/services/EchoXMLService");
+ stub.setEnePointReference(new EndpointReference(AddressingConstants.WSA_TO, url.toString()));
+ System.out.println(stub.echoString("does this damn think work"));
+
+
+ }
+
+
+}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/InteropTest_Stub.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/InteropTest_Stub.java?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/InteropTest_Stub.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/client/InteropTest_Stub.java Thu Feb 3 01:21:58 2005
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.samples.userguide.client;
+
+import java.util.Iterator;
+
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.clientapi.Call;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This file is hand written for the M1 demp purposes and will be
+ * auto generated fron WSDLx4Java tool.
+ *
+ */
+public class InteropTest_Stub {
+
+ private OMFactory omFactory = OMFactory.newInstance();
+ private Call call = new Call();
+ protected Log log = LogFactory.getLog(this.getClass());
+
+
+
+ /////////////////////////////////////////////////////////////
+ /// User setter methods ///
+ /////////////////////////////////////////////////////////////
+
+ public void setEnePointReference(EndpointReference epr){
+ this.call.setTo(epr);
+ }
+
+
+
+ ///////////////////////////////////////////////////////////////
+ /// Webservice Operations ///
+ ///////////////////////////////////////////////////////////////
+
+ public java.lang.String echoString(java.lang.String inputValue)throws AxisFault{
+ this.validate();
+ SOAPEnvelope responceEnvelop = call.sendReceive(this.getSOAPEnvelopForEchoString(inputValue));
+ return this.getEchoStringFromSOAPEnvelop(responceEnvelop);
+ }
+
+ public Integer echoInt(Integer inputValue) throws AxisFault{
+ this.validate();
+ SOAPEnvelope responceEnvelop = call.sendReceive(this.getSOAPEnvelopForEchoInt(inputValue));
+ return this.getEchoIntFromSOAPEnvelop(responceEnvelop);
+ }
+
+
+
+ ////////////////////////////////////////////////////////////////
+ // Util Methods //
+ ////////////////////////////////////////////////////////////////
+
+
+ protected SOAPEnvelope getSOAPEnvelopForEchoString(String value){
+ SOAPEnvelope envelop = OMFactory.newInstance().getDefaultEnvelope();
+ OMNamespace interopNamespace = envelop.declareNamespace("http://soapinterop.org/", "interop");
+ OMElement echoStringMessage = omFactory.createOMElement("echoString", interopNamespace);
+ OMElement text = omFactory.createOMElement("Text", interopNamespace);
+ text.addChild(omFactory.createText(value));
+ echoStringMessage.addChild(text);
+ envelop.getBody().addChild(echoStringMessage);
+ return envelop;
+ }
+
+ protected SOAPEnvelope getSOAPEnvelopForEchoInt(Integer value){
+ SOAPEnvelope envelope = OMFactory.newInstance().getDefaultEnvelope();
+ OMNamespace namespace = envelope.declareNamespace("http://soapinterop.org/", "interop");
+ OMElement echoIntMessage = omFactory.createOMElement("echoInt", namespace);
+ OMElement text = omFactory.createOMElement("Text", namespace);
+ text.addChild(omFactory.createText(value.toString()));
+ echoIntMessage.addChild(text);
+ envelope.getBody().addChild(echoIntMessage);
+ return envelope;
+ }
+
+
+ protected String getEchoStringFromSOAPEnvelop(SOAPEnvelope envelop) throws AxisFault{
+ OMElement body = envelop.getBody();
+ OMElement response = null;
+ Iterator childrenIter = body.getChildren();
+ while(childrenIter.hasNext()){
+ OMNode child = (OMNode) childrenIter.next();
+ if(child instanceof OMElement && "echoStringResponse".equalsIgnoreCase(((OMElement)child).getLocalName())){
+ response = (OMElement)child;
+ }
+ }
+ Iterator textChild = response.getChildren();
+ while(textChild.hasNext()){
+ OMNode child = (OMNode) textChild.next();
+ if(child instanceof OMElement && "echoStringReturn".equalsIgnoreCase(((OMElement)child).getLocalName())){
+
+ OMNode val =((OMElement)child).getFirstChild();
+ if(val instanceof OMText)
+ return new String(((OMText)val).getValue());
+
+ }
+ }
+
+ this.log.info("Invalid data Binding");
+ throw new AxisFault("Invalid data Binding");
+ }
+
+ protected Integer getEchoIntFromSOAPEnvelop(SOAPEnvelope envelop) throws AxisFault{
+ OMElement body = envelop.getBody();
+ OMElement response = null;
+ Iterator childrenIter = body.getChildren();
+ while(childrenIter.hasNext()){
+ OMNode child = (OMNode) childrenIter.next();
+ if(child instanceof OMElement && "echoIntResponse".equalsIgnoreCase(((OMElement)child).getLocalName())){
+ response = (OMElement)child;
+ }
+ }
+
+ Iterator textChild = response.getChildren();
+ while(textChild.hasNext()){
+ OMNode child = (OMNode) textChild.next();
+ if(child instanceof OMElement && "echoIntReturn".equalsIgnoreCase(((OMElement)child).getLocalName())){
+
+ OMNode val =((OMElement)child).getFirstChild();
+ if(val instanceof OMText)
+ return new Integer(((OMText)val).getValue());
+
+ }
+ }
+
+ this.log.info("Invalid data Binding");
+ throw new AxisFault("Invalid data Binding");
+ }
+
+
+ protected void validate() throws AxisFault{
+ String errorMessage = null;
+ if(null == this.call.getTO())
+ errorMessage = "End Point reference is not set: ";
+
+ if(null != errorMessage){
+ errorMessage = "One or more Errors occured :: "+ errorMessage;
+ throw new AxisFault(errorMessage);
+ }
+ }
+
+}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/SampleEnvironmentCreator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/SampleEnvironmentCreator.java?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/SampleEnvironmentCreator.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/SampleEnvironmentCreator.java Thu Feb 3 01:21:58 2005
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.samples.userguide.server;
+
+import java.io.FileReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.clientapi.Call;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.engine.Echo;
+import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineUtils;
+import org.apache.axis.impl.description.AxisService;
+import org.apache.axis.impl.description.SimpleAxisOperationImpl;
+import org.apache.axis.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.axis.impl.providers.SimpleJavaProvider;
+import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class SampleEnvironmentCreator extends AbstractTestCase{
+
+ private Log log = LogFactory.getLog(getClass());
+ private QName serviceName = new QName("","EchoXMLService");
+ private QName operationName1 = new QName("http://localhost/my","echoInt");
+ private QName operationName2 = new QName("http://localhost/my","echoString");
+ private QName transportName = new QName("http://localhost/my","NullTransport");
+
+ private EngineRegistry engineRegistry;
+ private MessageContext mc;
+ private Thread thisThread = null;
+ private SimpleHTTPReceiver sas;
+
+ public SampleEnvironmentCreator(){
+ super(SampleEnvironmentCreator.class.getName());
+// try {
+// this.setUp();
+// this.testInt();
+// this.tearDown();
+// } catch (Exception e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+
+ }
+
+ public SampleEnvironmentCreator(String testName) {
+ super(testName);
+ }
+
+ protected void setUp() throws Exception {
+ AxisGlobal global = new AxisGlobal();
+ engineRegistry = new org.apache.axis.impl.engine.EngineRegistryImpl(global);
+
+ AxisService service = new AxisService(serviceName);
+ service.setClassLoader(Thread.currentThread().getContextClassLoader());
+ service.setServiceClass(Echo.class);
+ service.setProvider(new SimpleJavaProvider());
+
+ AxisOperation operation1 = new SimpleAxisOperationImpl(operationName1);
+ service.addOperation(operation1);
+
+ AxisOperation operation2 = new SimpleAxisOperationImpl(operationName2);
+ service.addOperation(operation2);
+
+ EngineUtils.createExecutionChains(service);
+ engineRegistry.addService(service);
+
+ sas = EngineUtils.startServer(engineRegistry);
+ }
+
+
+ protected void tearDown() throws Exception {
+ EngineUtils.stopServer();
+ Thread.sleep(1000);
+}
+
+
+public void testInt() throws Exception{
+ try{
+
+ Call call = new Call();
+ URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis/services/EchoXMLService");
+ EndpointReference epr = new EndpointReference(AddressingConstants.WSA_TO, url.toString());
+ call.setTo(epr);
+ SOAPEnvelope reply = call.sendReceive(this.getechoIntEnvelope());
+ reply.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out), false);
+
+ }catch(Exception e){
+ e.printStackTrace();
+ tearDown();
+ throw e;
+ }
+}
+public void testString() throws Exception{
+// try{
+// OMFactory fac = OMFactory.newInstance();
+//
+// OMNamespace omNs = fac.createOMNamespace("http://localhost/my","my");
+// OMElement method = fac.createOMElement("echoOMElement",omNs) ;
+// OMElement value = fac.createOMElement("myValue",omNs) ;
+// value.setValue("Isaac Assimov, the foundation Sega");
+// method.addChild(value);
+//
+// Call call = new Call();
+// URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis/services/EchoXMLService");
+//
+// CallBack callback = new CallBack() {
+// public void doWork(OMElement ele) {
+// System.out.print("got the result = " + ele +" :)");
+//
+// }
+// public void reportError(Exception e) {
+// log.info("reporting error from callback !");
+// e.printStackTrace();
+// }
+// };
+//
+// call.asyncCall(method,url,callback);
+// log.info("send the reqest");
+//
+// Thread.sleep(1000);
+// }catch(Exception e){
+// e.printStackTrace();
+// tearDown();
+// throw e;
+// }
+}
+
+ public static void main(String[] args) {
+ new SampleEnvironmentCreator();
+
+}
+
+private SOAPEnvelope getechoIntEnvelope() throws Exception {
+
+ SOAPEnvelope envelope = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(
+ new FileReader(getTestResourceFile("echo/echoInt.xml")))).getSOAPEnvelope();
+ envelope.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out), false);
+ return envelope;
+}
+
+
+}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/TestServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/TestServer.java?view=auto&rev=151140
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/TestServer.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/org/apache/axis/samples/userguide/server/TestServer.java Thu Feb 3 01:21:58 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.samples.userguide.server;
+
+import org.apache.axis.engine.EngineUtils;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class TestServer {
+
+ public static void main(String[] args) throws Exception {
+
+ new SampleEnvironmentCreator().setUp();
+ Thread.sleep(300000);
+ }
+
+ protected void tearDown() throws Exception {
+ EngineUtils.stopServer();
+ Thread.sleep(1000);
+ System.out.println("Server shuting down......");
+ }
+}