You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2007/06/28 06:31:11 UTC

svn commit: r551441 - in /webservices/axis2/trunk/java/modules/kernel: pom.xml test-resources/wsdl/Version.wsdl test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java

Author: dims
Date: Wed Jun 27 21:31:08 2007
New Revision: 551441

URL: http://svn.apache.org/viewvc?view=rev&rev=551441
Log:
AXIS2-2871 - WSDL11ToAllAxisServicesBuilder - roundtrip problem(s)

Added:
    webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/Version.wsdl
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
Modified:
    webservices/axis2/trunk/java/modules/kernel/pom.xml

Modified: webservices/axis2/trunk/java/modules/kernel/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/pom.xml?view=diff&rev=551441&r1=551440&r2=551441
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/pom.xml Wed Jun 27 21:31:08 2007
@@ -110,6 +110,11 @@
 			<groupId>commons-logging</groupId>
 			<artifactId>commons-logging</artifactId>
 		</dependency>
+        <dependency>
+            <groupId>xmlunit</groupId>
+            <artifactId>xmlunit</artifactId>
+            <scope>test</scope>
+        </dependency>
 	</dependencies>
 	<profiles>
 		<profile>

Added: webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/Version.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/Version.wsdl?view=auto&rev=551441
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/Version.wsdl (added)
+++ webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/Version.wsdl Wed Jun 27 21:31:08 2007
@@ -0,0 +1,94 @@
+<wsdl:definitions xmlns:axis2="http://axisversion.sample" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+                  xmlns:ns0="http://axisversion.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://axisversion.sample">
+    <wsdl:documentation>Version</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema xmlns:ns="http://axisversion.sample/xsd" attributeFormDefault="qualified"
+                   elementFormDefault="qualified" targetNamespace="http://axisversion.sample/xsd">
+            <xs:element name="ExceptionFault">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getVersionResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="getVersionRequest"/>
+    <wsdl:message name="getVersionResponse">
+        <wsdl:part name="parameters" element="ns0:getVersionResponse"/>
+    </wsdl:message>
+    <wsdl:message name="getVersionFault">
+        <wsdl:part name="parameters" element="ns0:ExceptionFault"/>
+    </wsdl:message>
+    <wsdl:portType name="VersionPortType">
+        <wsdl:operation name="getVersion">
+            <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getVersionRequest"
+                        wsaw:Action="urn:getVersion"/>
+            <wsdl:output message="axis2:getVersionResponse"/>
+            <wsdl:fault message="axis2:getVersionFault" name="getVersionFault"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="VersionSOAP11Binding" type="axis2:VersionPortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="getVersion">
+            <soap:operation soapAction="urn:getVersion" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="getVersionFault">
+                <soap:fault use="literal" name="getVersionFault"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="VersionSOAP12Binding" type="axis2:VersionPortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="getVersion">
+            <soap12:operation soapAction="urn:getVersion" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="getVersionFault">
+                <soap12:fault use="literal" name="getVersionFault"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="VersionHttpBinding" type="axis2:VersionPortType">
+        <http:binding verb="POST"/>
+        <wsdl:operation name="getVersion">
+            <http:operation location="Version/getVersion"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="getVersion"/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="getVersion"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="Version">
+        <wsdl:port name="VersionSOAP11port_http" binding="axis2:VersionSOAP11Binding">
+            <soap:address location="http://192.168.2.105:8081/axis2/services/Version"/>
+        </wsdl:port>
+        <wsdl:port name="VersionSOAP12port_http" binding="axis2:VersionSOAP12Binding">
+            <soap12:address location="http://192.168.2.105:8081/axis2/services/Version"/>
+        </wsdl:port>
+        <wsdl:port name="VersionHttpport" binding="axis2:VersionHttpBinding">
+            <http:address location="http://192.168.2.105:8081/axis2/services/Version"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java?view=auto&rev=551441
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java Wed Jun 27 21:31:08 2007
@@ -0,0 +1,43 @@
+package org.apache.axis2.description;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.StringWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.FileReader;
+import java.io.StringReader;
+
+import org.custommonkey.xmlunit.XMLTestCase;
+import org.custommonkey.xmlunit.XMLUnit;
+
+/**
+ *
+ */
+public class WSDL11ToAxisServiceBuilderTest extends XMLTestCase {
+
+    public void testVersion() {
+        File testResourceFile = new File("test-resources/wsdl/Version.wsdl");
+        System.out.println("testResourceFile: " + testResourceFile);
+        try {
+            WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
+                    new FileInputStream(testResourceFile));
+            AxisService axisService = builder.populateService();
+            System.out.println("WSDL file: " + testResourceFile.getName());
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            axisService.printWSDL(baos);
+            XMLUnit.setIgnoreWhitespace(true);
+            //TODO: FIXME
+            //this.assertXMLEqual(new FileReader(testResourceFile), new StringReader(new String(baos.toByteArray())));
+            XMLUnit.setIgnoreWhitespace(false);
+        } catch (Exception e) {
+            System.out.println("Error in WSDL : " + testResourceFile.getName());
+            System.out.println("Exception: " + e.toString());
+            e.printStackTrace();
+            fail("Caught exception " + e.toString());
+        }
+        return;
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org