summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/ws
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-06-29 16:10:12 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-06-29 16:10:12 +0000
commit2756a41fb6b91c004ebb488d11cbfbcd171d4973 (patch)
treef32f0f7ef5ee615abe703d73c133ebfc46cac806 /sca-java-2.x/trunk/itest/ws
parent4a3c533e339e6613e83ee0c5ea379b171baeddc4 (diff)
Updates to test different mechanisms for specifying wrapper namespace
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959016 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/ws')
-rw-r--r--sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/README244
-rw-r--r--sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java2
-rw-r--r--sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl8
-rw-r--r--sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite22
4 files changed, 259 insertions, 17 deletions
diff --git a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/README b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/README
index 7bb4f699c8..fe73646e78 100644
--- a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/README
+++ b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/README
@@ -4,27 +4,251 @@ RPC Literal WSDL Style
Interface
---------
+@Remotable
+public interface HelloWorld {
+ String getGreetings(String s);
+ String getGreetingsException(String s) throws ServiceRuntimeException;
+ Foo getGreetingsComplex(Foo foo);
+}
WSDL
----
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://ws.binding.sca.tuscany.apache.org/rpclit"
+ schemaLocation="HelloWorldImplService-rpclit.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="getGreetings">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsException">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsExceptionResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <message name="getGreetingsComplex">
+ <part name="foo" type="tns:foo"/>
+ </message>
+ <message name="getGreetingsComplexResponse">
+ <part name="foo" type="tns:foo"/>
+ </message>
+ <portType name="HelloWorldImpl">
+ <operation name="getGreetings">
+ <input message="tns:getGreetings"/>
+ <output message="tns:getGreetingsResponse"/>
+ </operation>
+ <operation name="getGreetingsException">
+ <input message="tns:getGreetingsException"/>
+ <output message="tns:getGreetingsExceptionResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ <operation name="getGreetingsComplex">
+ <input message="tns:getGreetingsComplex"/>
+ <output message="tns:getGreetingsComplexResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloWorldImplPortBinding" type="tns:HelloWorldImpl">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="getGreetings">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsException">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getGreetingsComplex">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
-SOAP
-----
+getGreetings SOAP Request/Response
+----------------------------------
-POST /HelloWorldService/HelloWorld-rpclit HTTP/1.1
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: localhost:8088
-Content-Length: 364
+Content-Length: 480
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns1:getGreetings
+ xmlns:axis2ns1="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Fred
+ </s>
+ </axis2ns1:getGreetings>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+1FE
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns4:getGreetingsResponse
+ xmlns:axis2ns4="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsResponseNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Hello Fred</s>
+ </axis2ns4:getGreetingsResponse>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+
+getGreetingsException SOAP Request/Response
+-------------------------------------------
+
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8088
+Content-Length: 507
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns5:getGreetingsException
+ xmlns:axis2ns5="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Fred
+ </s>
+ </axis2ns5:getGreetingsException>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 500 Internal Server Error
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+133C
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <soapenv:Fault>
+ <faultcode>soapenv:Server</faultcode>
+ <faultstring>org.apache.tuscany.sca.interfacedef.util.FaultE
+ xception cannot be cast to org.apache.axiom.om.OMElement</faultstring>
+ <detail>
+ ...
+ </Exception>
+ </detail>
+ </soapenv:Fault>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+TODO - exception is wrong
+
+getGreetingsComplex SOAP Request/Response
+-----------------------------------------
+
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8088
+Content-Length: 570
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns7:getGreetingsComplex
+ xmlns:axis2ns7="http://ws.binding.sca.tuscany.apache.org/rpclit">
+ <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns3="http://ws.binding.sca.tuscany.apache.org/"
+ xmlns:ns2="http://helloworld/external"
+ xsi:type="ns2:foo">
+ <bars>
+ <b>true</b>
+ <s>petra</s>
+ <x>1</x>
+ <y>2</y>
+ </bars>
+ <bars>
+ <b>false</b>
+ <s>beate</s>
+ <x>3</x>
+ <y>4</y>
+ </bars>
+ </foo>
+ </axis2ns7:getGreetingsComplex>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+281
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Body>
- <parameters xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
- xsi:type="xs:string">Fred</parameters>
- </soapenv:Body>
+ <soape nv:Body>
+ <axis2ns10:getGreetingsComplexResponse
+ xmlns:axis2ns10="http://ws.binding.sca.tuscany.apache.org/rpclit">
+ <foo xm lns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns3="http://ws.binding.sca.tuscany.apache.org/"
+ xmlns:ns2="http://helloworld/external"
+ xsi:type="ns2:foo">
+ <bars>
+ <b>true</b>
+ <s>petra</s>
+ <x>1</x>
+ <y>2</y>
+ </bars>
+ <bars>
+ <b>false</b>
+ <s>bea
+ te</s>
+ <x>3</x>
+ <y>4</y>
+ </bars>
+ <bars>
+ <b>true</b>
+ <s>simon</s>
+ <x>7</x>
+ <y>8</y>
+ </bars>
+ </foo>
+ </axis2ns10:getGreetingsComplexResponse>
+ </soapenv:Body>
</soapenv:Envelope> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
index 27471f87c6..9ee8373468 100644
--- a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
+++ b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
@@ -40,7 +40,7 @@ public class HelloWorld1Impl implements HelloWorld {
public String getGreetingsException(String s) throws ServiceRuntimeException {
System.out.println("Entering SCA HelloWorld1.getGreetingsException: " + s);
- String response = helloWorld2.getGreetings(s);
+ String response = helloWorld2.getGreetingsException(s);
System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
throw new ServiceRuntimeException(response);
}
diff --git a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl
index 61a852f7c9..d3806b24f4 100644
--- a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl
+++ b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl
@@ -70,19 +70,19 @@
<operation name="getGreetings">
<soap:operation soapAction=""/>
<input>
- <soap:body use="literal"/>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace" />
</input>
<output>
- <soap:body use="literal"/>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsResponseNamespace"/>
</output>
</operation>
<operation name="getGreetingsException">
<soap:operation soapAction=""/>
<input>
- <soap:body use="literal"/>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
</input>
<output>
- <soap:body use="literal"/>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionResponseNamespace"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
diff --git a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite
index ccad2481a6..28dedef44c 100644
--- a/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite
+++ b/sca-java-2.x/trunk/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite
@@ -28,11 +28,29 @@
<binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
</service>
<reference name="helloWorld2">
- <!--binding.ws uri="http://localhost:8088/HelloWorldService/HelloWorld-rpclit" wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/-->
- <binding.ws uri="http://localhost:8088/HelloWorldService/HelloWorld-rpclit" wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ <interface.wsdl interface="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.porttype(HelloWorldImpl)"/>
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit-porttype"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ <!--
+ note that it's not necessary to have interface.wsdl here but I left it in after
+ I added the wsdlElement on the binding in order to configure the binding with the
+ wrapper element namespace that appears in the binding configuration
+ -->
</reference>
</component>
+ <component name="HelloWorldService1a">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit-porttype"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </service>
+ <reference name="helloWorld2">
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </reference>
+ </component>
+
<component name="HelloWorldService2">
<implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld2Impl"/>
<service name="HelloWorld">