Author: kstam
Date: Fri May 13 15:03:55 2011
New Revision: 1102781

URL: http://svn.apache.org/viewvc?rev=1102781&view=rev
Log:
JUDDI-377 adding unittest

Added:
    juddi/trunk/juddi-client/src/test/resources/wsdl/
    juddi/trunk/juddi-client/src/test/resources/wsdl/HelloWorld.wsdl
Modified:
    
juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java

Modified: 
juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java?rev=1102781&r1=1102780&r2=1102781&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
 (original)
+++ 
juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
 Fri May 13 15:03:55 2011
@@ -43,7 +43,7 @@ public class WSDL2UDDITest {
        public void testUDDIBindingModel() throws WSDLException, JAXBException {
 
                // Reading the WSDL
-               Definition wsdlDefinition = 
rw.readWSDL("uddi_api_v3_portType.wsdl");
+               Definition wsdlDefinition = rw.readWSDL("wsdl/HelloWorld.wsdl");
                String wsdlURL = wsdlDefinition.getDocumentBaseURI();
                
                Properties properties = new Properties();
@@ -59,14 +59,14 @@ public class WSDL2UDDITest {
                        System.out.println("UDDI PortType TModel " + 
tModel.getName().getValue());
                        System.out.println(pTModel.print(tModel));
                }
-               Assert.assertEquals(3,tModels.size());
+               Assert.assertEquals(1,tModels.size());
        }
        
        @Test
        public void testWSDLBindingModel() throws WSDLException, JAXBException {
 
                // Reading the WSDL
-               Definition wsdlDefinition = 
rw.readWSDL("uddi_api_v3_binding.wsd");
+               Definition wsdlDefinition = rw.readWSDL("wsdl/HelloWorld.wsdl");
                String wsdlURL = wsdlDefinition.getDocumentBaseURI();
                
                Properties properties = new Properties();
@@ -82,7 +82,7 @@ public class WSDL2UDDITest {
                        System.out.println("UDDI Binding TModel " + 
tModel.getName().getValue());
                        System.out.println(pTModel.print(tModel));
                }
-               Assert.assertEquals(3,tModels.size());
+               Assert.assertEquals(1,tModels.size());
        }
        
 }

Added: juddi/trunk/juddi-client/src/test/resources/wsdl/HelloWorld.wsdl
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/test/resources/wsdl/HelloWorld.wsdl?rev=1102781&view=auto
==============================================================================
--- juddi/trunk/juddi-client/src/test/resources/wsdl/HelloWorld.wsdl (added)
+++ juddi/trunk/juddi-client/src/test/resources/wsdl/HelloWorld.wsdl Fri May 13 
15:03:55 2011
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+<wsdl:definitions
+        targetNamespace="http://www.jboss.org/bpel/examples/wsdl";
+        xmlns="http://schemas.xmlsoap.org/wsdl/";
+        xmlns:tns="http://www.jboss.org/bpel/examples/wsdl";
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";>
+
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <soap:operation soapAction="" style="rpc"/>
+            <wsdl:input>
+                <soap:body
+                        namespace="http://www.jboss.org/bpel/examples/wsdl";
+                        use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body
+                        namespace="http://www.jboss.org/bpel/examples/wsdl";
+                        use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloService">
+        <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+            <soap:address 
location="http://localhost:8080/Quickstart_bpel_hello_worldWS"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <plnk:partnerLinkType name="HelloPartnerLinkType">
+        <plnk:role name="me" portType="tns:HelloPortType"/>
+        <plnk:role name="you" portType="tns:HelloPortType"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>
+



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to