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 de...@apache.org on 2005/06/21 07:42:09 UTC

svn commit: r191626 - in /webservices/axis/trunk/java/modules/samples: test-resources/service.wsdl test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java

Author: deepal
Date: Mon Jun 20 22:42:08 2005
New Revision: 191626

URL: http://svn.apache.org/viewcvs?rev=191626&view=rev
Log:
test case will be faild due to bug in generated wsdl 

Added:
    webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java

Added: webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl?rev=191626&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl (added)
+++ webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl Mon Jun 20 22:42:08 2005
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://services.axis.apache.org" xmlns:impl="http://services.axis.apache.org-impl" xmlns:intf="http://services.axis.apache.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<!--WSDL created by Apache Axis version: 1.2.1
+Built on Jun 14, 2005 (09:15:57 EDT)-->
+
+   <wsdl:message name="runRequest">
+
+   </wsdl:message>
+
+   <wsdl:message name="runResponse">
+
+   </wsdl:message>
+
+   <wsdl:portType name="OutService">
+
+      <wsdl:operation name="run">
+
+         <wsdl:input name="runRequest" message="intf:runRequest"/>
+
+         <wsdl:output name="runResponse" message="intf:runResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="localhost:8080SoapBinding" type="intf:OutService">
+
+      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="run">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="runRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="runResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+</wsdl:definitions>

Added: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java?rev=191626&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java (added)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/ServiceDescriptionBuilderTest.java Mon Jun 20 22:42:08 2005
@@ -0,0 +1,64 @@
+package org.apache.axis.engine;
+
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.File;
+import java.util.Iterator;
+
+import org.apache.axis.description.ServiceDescription;
+import org.apache.axis.description.AxisDescWSDLComponentFactory;
+import org.apache.axis.wsdl.builder.WOMBuilderFactory;
+import org.apache.wsdl.WSDLDescription;
+import junit.framework.TestCase;
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author : Deepal Jayasinghe
+ * Date: Jun 20, 2005
+ * Time: 4:48:22 PM
+ */
+public class ServiceDescriptionBuilderTest extends TestCase {
+    private ServiceDescription service = null;
+
+    private void initialize() throws Exception {
+
+        if (null == this.service) {
+           InputStream in = new FileInputStream(new File("./test-resources/service.wsdl")) ;
+            if(in == null){
+                throw new Exception("Input Stream is null , fileNot Found") ;
+            }
+            WSDLDescription womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11).build(in, new AxisDescWSDLComponentFactory());
+            Iterator iterator = womDescription.getServices().keySet().iterator();
+            if(iterator.hasNext()){
+                this.service = (ServiceDescription)iterator.next();
+            }
+            assertNotNull(this.service);
+        }
+
+    }
+
+    public void test(){
+        try {
+            this.initialize();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}
+