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 na...@apache.org on 2008/07/13 06:24:18 UTC

svn commit: r676260 - in /webservices/axis/trunk/c/tests/auto_build/testcases: client/cpp/NoInputParamsClient.cpp output/NoInputParams.cpp.out output/NoInputParams_ServerResponse.expected tests/NoInputParams.xml unitTest.list wsdls/NoInputParams.wsdl

Author: nadiramra
Date: Sat Jul 12 21:24:16 2008
New Revision: 676260

URL: http://svn.apache.org/viewvc?rev=676260&view=rev
Log:
Test for no input parameters.

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NoInputParamsClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams.cpp.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/NoInputParams.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/NoInputParams.wsdl
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NoInputParamsClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NoInputParamsClient.cpp?rev=676260&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NoInputParamsClient.cpp (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NoInputParamsClient.cpp Sat Jul 12 21:24:16 2008
@@ -0,0 +1,70 @@
+// Copyright 2003-2004 The Apache Software Foundation.
+// (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
+// 
+// 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.
+
+#include <iostream>
+#include "NoInputParamsServicePortType.hpp"
+
+int main( int argc, char * argv[])
+{
+    const char *    pszURL = "http://localhost:9090/axis/services/NoInputParamsService";
+    xsd__string result;
+    
+    if (argc > 1)
+        pszURL = argv[1];
+     
+    NoInputParamsServicePortType pWS( pszURL, APTHTTP1_1);
+        
+    try
+    {
+    	result = pWS.getVersion(); 
+    	
+    	if (result)
+          cout << "Result: " << result << endl;
+    	else
+          cout << "FAILED-null result" << endl;
+    }
+    catch( SoapFaultException& e)
+    {
+        char *faultCode   = (char *)e.getFaultCode();
+        char *faultString = (char *)e.getFaultString();
+        char *faultActor  = (char *)e.getFaultActor();
+        
+        if (!faultCode)  faultCode = "NULL";
+        if (!faultString) faultString = "NULL";
+        if (!faultActor) faultActor = "NULL";
+        
+        cout << "  FaultCode = " << faultCode << endl;
+        cout << "  FaultString = " << faultString << endl;
+        cout << "  FaultActor = " << faultActor << endl;
+        cout << "  SoapFaultException: " << e.what() << endl;
+    }    
+    catch( AxisException& e)
+    {
+        cout <<  e.what() << endl;
+    }
+    catch( exception& e)
+    {
+        cout << "Unknown exception has occured : " << e.what() << endl;
+    }
+    catch(...)
+    {
+        cout << "Unknown exception has occured" << endl;
+    }
+
+
+    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
+
+    return 0;
+}
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams.cpp.out?rev=676260&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams.cpp.out Sat Jul 12 21:24:16 2008
@@ -0,0 +1,2 @@
+Result: 1.6
+---------------------- TEST COMPLETE -----------------------------
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams_ServerResponse.expected?rev=676260&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/NoInputParams_ServerResponse.expected Sat Jul 12 21:24:16 2008
@@ -0,0 +1,20 @@
+HTTP/1.1 200 OK
+Server: WebSphere Application Server/5.1
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-GB
+Transfer-Encoding: chunked
+
+###
+<?xml version="1.0" encoding="utf-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
+    xmlns:xsd="http://webservice.example.apache.org/xsd">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <xsd:getVersionResponse>
+         <xsd:return>1.6</xsd:return>
+      </xsd:getVersionResponse>
+   </soapenv:Body>
+</soapenv:Envelope>
+0
+
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/NoInputParams.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/NoInputParams.xml?rev=676260&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/NoInputParams.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/NoInputParams.xml Sat Jul 12 21:24:16 2008
@@ -0,0 +1,16 @@
+<test>
+    <name>NoInputParams</name>
+    <description>NoInputParams</description>
+    <clientLang>cpp</clientLang>
+    <clientCode>NoInputParamsClient.cpp</clientCode>
+    <wsdl>NoInputParams.wsdl</wsdl>
+    <expected>
+        <serverResponse>
+            NoInputParams_ServerResponse.expected
+        </serverResponse>
+        <output>
+            NoInputParams.cpp.out
+        </output>
+    </expected>
+	<endpoint>http://localhost:80/axis/NoInputParams</endpoint>
+</test>

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?rev=676260&r1=676259&r2=676260&view=diff
==============================================================================
Binary files - no diff available.

Added: webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/NoInputParams.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/NoInputParams.wsdl?rev=676260&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/NoInputParams.wsdl (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/NoInputParams.wsdl Sat Jul 12 21:24:16 2008
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions  
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"  
+	xmlns:axis2="http://webservice.example.apache.org" 
+	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
+	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+	xmlns:ns1="http://org.apache.axis2/xsd" 
+	xmlns:ns0="http://webservice.example.apache.org/xsd" 
+	targetNamespace="http://webservice.example.apache.org" 
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <xs:schema 
+		xmlns:ns="http://webservice.example.apache.org/xsd" 
+		attributeFormDefault="qualified" 
+		elementFormDefault="qualified" 
+		targetNamespace="http://webservice.example.apache.org/xsd">
+      <xs:element name="getVersionResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" nillable="true" type="xs:string" />
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      
+      <xs:element name="getVersion">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="getVersionMessage">
+      <wsdl:part name="part1" element="ns0:getVersion" />
+  </wsdl:message>
+  
+  <wsdl:message name="getVersionResponse">
+    <wsdl:part name="part1" element="ns0:getVersionResponse" />
+  </wsdl:message>
+  <wsdl:portType name="NoInputParamsServicePortType">
+    <wsdl:operation name="getVersion">
+      <wsdl:input wsaw:Action="urn:getVersion" message="axis2:getVersionMessage" />
+      <wsdl:output wsaw:Action="http://webservice.example.apache.org /NoInputParamsServicePortType/getVersionResponse" message="axis2:getVersionResponse" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="NoInputParamsServiceSOAP11Binding" type="axis2:NoInputParamsServicePortType">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <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:operation>
+  </wsdl:binding>
+  <wsdl:service name="NoInputParamsService">
+    <wsdl:port name="NoInputParamsServiceSOAP11port_http" binding="axis2:NoInputParamsServiceSOAP11Binding">
+      <soap:address location="http://localhost/axis/NoInputParamsService" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file