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 du...@apache.org on 2005/05/13 06:51:17 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/wsdls CombinedChoice.wsdl UnboundedStringChoice.wsdl
dushshantha 2005/05/12 21:51:17
Added: c/tests/auto_build/testcases/client/cpp
CombinedChoiceClient.cpp
UnboundedStringChoiceClient.cpp
c/tests/auto_build/testcases/output CombinedChoice.expected
UnboundedStringChoice.expected
c/tests/auto_build/testcases/tests CombinedChoice.xml
UnboundedStringChoice.xml
c/tests/auto_build/testcases/tests/server CombinedChoice.xml
UnboundedStringChoice.xml
c/tests/auto_build/testcases/wsdls CombinedChoice.wsdl
UnboundedStringChoice.wsdl
Log:
added new tests for unbounded String choice element and a test for choice and non-choice elements together.
Revision Changes Path
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/CombinedChoiceClient.cpp
Index: CombinedChoiceClient.cpp
===================================================================
#include <iostream.h>
#include "ChoiceTestSoap.hpp"
using namespace std;
void main(int argc, char *argv[])
{
try
{
const char* url="http://localhost:80/axis/CombinedChoice";
ChoiceComplexType* Value0=new ChoiceComplexType();
ChoiceComplexType* Value1;
Value0->NonChoiceIntValue = 5;
Value0->IntValue = new int;
*(Value0->IntValue) = 5;
Value0->StringValue = NULL;
Value0->NonChoiceStringValue = "NonChoiceStringValue";
if ( argc > 1 )
url = argv[1];
ChoiceTestSoap ws(url);
cout<< "Calling the Service..."<<endl;
Value1=ws.echoChoice(Value0);
cout<<"Value1->NonChoiceIntValue = "<<Value1->NonChoiceIntValue<<endl;
cout<<"Value1->IntValue = "<<*(Value1->IntValue)<<endl;
cout<<"Value1->NonChoiceStringValue = "<<Value1->NonChoiceStringValue<<endl;
}catch (AxisException & e)
{
printf ("Exception : %s\n", e.what ());
}
catch (exception & e)
{
printf ("Unknown exception has occured\n");
}
catch (...)
{
printf ("Unknown exception has occured\n");
}
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp
Index: UnboundedStringChoiceClient.cpp
===================================================================
#include <iostream.h>
#include "ChoiceTestSoap.hpp"
#include "ChoiceComplexType.hpp"
using namespace std;
void main(int argc, char *argv[])
{
try
{
const char* url="http://localhost:80/axis/UnboundedStringChoice";
ChoiceComplexType* Value0;
ChoiceComplexType* Value1;
Value0 = new ChoiceComplexType();
cout<< "Calling the Service..."<<endl;
Value0->StringValue->m_Array = new xsd__string[5];
xsd__string * StringArray = new xsd__string[5];
Value0->StringValue->m_Size = 5;
StringArray[0] = "a";
Value0->StringValue->m_Array[0] = StringArray[0];
StringArray[1] = "b";
Value0->StringValue->m_Array[1] = StringArray[1];
StringArray[2] = "c";
Value0->StringValue->m_Array[2] = StringArray[2];
StringArray[3] = "d";
Value0->StringValue->m_Array[3] = StringArray[3];
StringArray[4] = "e";
Value0->StringValue->m_Array[4] = StringArray[4];
if ( argc > 1 )
url = argv[1];
ChoiceTestSoap ws(url);
Value1 = ws.echoChoice(Value0);
for (int i=0;i<5;i++)
cout<<"Value1->StringValue->m_Array["<<i<<"] = "<<*(Value1->StringValue->m_Array[i])<<endl;
// cout<<"Value1->IntValue = "<<(Value1->StringValue)<<endl;
}catch (AxisException & e)
{
printf ("Exception : %s\n", e.what ());
}
catch (exception & e)
{
printf ("Unknown exception has occured\n");
}
catch (...)
{
printf ("Unknown exception has occured\n");
}
}
1.1 ws-axis/c/tests/auto_build/testcases/output/CombinedChoice.expected
Index: CombinedChoice.expected
===================================================================
Calling the Service...
Value1->NonChoiceIntValue = 5
Value1->IntValue = 5
Value1->NonChoiceStringValue = NonChoiceStringValue
1.1 ws-axis/c/tests/auto_build/testcases/output/UnboundedStringChoice.expected
Index: UnboundedStringChoice.expected
===================================================================
Calling the Service...
Value1->StringValue->m_Array[0] = a
Value1->StringValue->m_Array[1] = b
Value1->StringValue->m_Array[2] = c
Value1->StringValue->m_Array[3] = d
Value1->StringValue->m_Array[4] = e
1.1 ws-axis/c/tests/auto_build/testcases/tests/CombinedChoice.xml
Index: CombinedChoice.xml
===================================================================
<test>
<name>CombinedChoice</name>
<description>CombinedChoice</description>
<clientLang>cpp</clientLang>
<clientCode>CombinedChoiceClient.cpp</clientCode>
<wsdl>CombinedChoice.wsdl</wsdl>
<expected>
<output>
CombinedChoice.expected
</output>
</expected>
<endpoint>http://localhost:80/axis/CombinedChoice</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/UnboundedStringChoice.xml
Index: UnboundedStringChoice.xml
===================================================================
<test>
<name>UnboundedStringChoice</name>
<description>UnboundedStringChoice</description>
<clientLang>cpp</clientLang>
<clientCode>UnboundedStringChoiceClient.cpp</clientCode>
<wsdl>UnboundedStringChoice.wsdl</wsdl>
<expected>
<output>
UnboundedStringChoice.expected
</output>
</expected>
<endpoint>http://localhost:80/axis/UnboundedStringChoice</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/server/CombinedChoice.xml
Index: CombinedChoice.xml
===================================================================
<service>
<name>CombinedChoice</name>
<description>CombinedChoice</description>
<serviceLang>cpp</serviceLang>
<serviceCode>ChoiceTestSoap.cpp</serviceCode>
<wsdl>CombinedChoice.wsdl</wsdl>
<servicename></servicename>
</service>
1.1 ws-axis/c/tests/auto_build/testcases/tests/server/UnboundedStringChoice.xml
Index: UnboundedStringChoice.xml
===================================================================
<service>
<name>UnboundedStringChoice</name>
<description>UnboundedStringChoice</description>
<serviceLang>cpp</serviceLang>
<serviceCode>ChoiceTestSoap.cpp</serviceCode>
<wsdl>UnboundedStringChoice.wsdl</wsdl>
<servicename></servicename>
</service>
1.1 ws-axis/c/tests/auto_build/testcases/wsdls/CombinedChoice.wsdl
Index: CombinedChoice.wsdl
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:s1="http://soapinterop.org/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://soapinterop.org/" xmlns:s3="http://soapinterop.org/echoheader/" xmlns:soap12enc="http://www.w3.org/2002/06/soap-envelope" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s2="http://soapinterop.org" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/">
<s:import namespace="http://soapinterop.org/xsd" />
<s:import namespace="http://soapinterop.org/echoheader/" />
<s:element name="echoChoice">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="inputChoice" type="s1:ChoiceComplexType" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="echoChoiceResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="return" type="s1:ChoiceComplexType" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
<s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/xsd">
<s:import namespace="http://soapinterop.org/" />
<s:complexType name="ChoiceComplexType">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="NonChoiceIntValue" type="s:int" />
<s:choice minOccurs="1" maxOccurs="1">
<s:element minOccurs="0" maxOccurs="1" name="IntValue" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="StringValue" type="s:string" />
</s:choice>
<s:element minOccurs="1" maxOccurs="1" name="NonChoiceStringValue" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</types>
<message name="echoChoiceSoapIn">
<part name="parameters" element="s0:echoChoice" />
</message>
<message name="echoChoiceSoapOut">
<part name="parameters" element="s0:echoChoiceResponse" />
</message>
<portType name="ChoiceTestSoap">
<operation name="echoChoice">
<input message="s0:echoChoiceSoapIn" />
<output message="s0:echoChoiceSoapOut" />
</operation>
</portType>
<binding name="ChoiceTestSoap" type="s0:ChoiceTestSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="echoChoice">
<soap:operation soapAction="SimpleChoiceTest#echoChoice" style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<binding name="ChoiceTestSoap12" type="s0:ChoiceTestSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="echoChoice">
<soap12:operation soapAction="Choice#echoChoice" style="document" />
<input>
<soap12:body use="literal" />
</input>
<output>
<soap12:body use="literal" />
</output>
</operation>
</binding>
<service name="ChoiceTest">
<documentation>These operations implement DOC/LIT SOAP operations, for interop testing. Please email johnko@microsoft.com with any questions/coments.</documentation>
<port name="ChoiceTestSoap" binding="s0:ChoiceTestSoap">
<soap:address location="http://localhost:90/axis/Choice" />
</port>
<port name="ChoiceTestSoap12" binding="s0:ChoiceTestSoap12">
<soap12:address location="http://localhost:90/axis/Choice" />
</port>
</service>
</definitions>
1.1 ws-axis/c/tests/auto_build/testcases/wsdls/UnboundedStringChoice.wsdl
Index: UnboundedStringChoice.wsdl
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:s1="http://soapinterop.org/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://soapinterop.org/" xmlns:s3="http://soapinterop.org/echoheader/" xmlns:soap12enc="http://www.w3.org/2002/06/soap-envelope" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s2="http://soapinterop.org" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/">
<s:import namespace="http://soapinterop.org/xsd" />
<s:import namespace="http://soapinterop.org/echoheader/" />
<s:element name="echoChoice">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="inputChoice" type="s1:ChoiceComplexType" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="echoChoiceResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="return" type="s1:ChoiceComplexType" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
<s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/xsd">
<s:import namespace="http://soapinterop.org/" />
<s:complexType name="ChoiceComplexType">
<s:sequence>
<s:choice minOccurs="1" maxOccurs="1">
<s:element minOccurs="0" maxOccurs="1" name="IntValue" type="s:int" />
<s:element minOccurs="0" maxOccurs="5" name="StringValue" type="s:string" />
</s:choice>
</s:sequence>
</s:complexType>
</s:schema>
</types>
<message name="echoChoiceSoapIn">
<part name="parameters" element="s0:echoChoice" />
</message>
<message name="echoChoiceSoapOut">
<part name="parameters" element="s0:echoChoiceResponse" />
</message>
<portType name="ChoiceTestSoap">
<operation name="echoChoice">
<input message="s0:echoChoiceSoapIn" />
<output message="s0:echoChoiceSoapOut" />
</operation>
</portType>
<binding name="ChoiceTestSoap" type="s0:ChoiceTestSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="echoChoice">
<soap:operation soapAction="SimpleChoiceTest#echoChoice" style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<binding name="ChoiceTestSoap12" type="s0:ChoiceTestSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="echoChoice">
<soap12:operation soapAction="Choice#echoChoice" style="document" />
<input>
<soap12:body use="literal" />
</input>
<output>
<soap12:body use="literal" />
</output>
</operation>
</binding>
<service name="ChoiceTest">
<documentation>These operations implement DOC/LIT SOAP operations, for interop testing. Please email johnko@microsoft.com with any questions/coments.</documentation>
<port name="ChoiceTestSoap" binding="s0:ChoiceTestSoap">
<soap:address location="http://localhost:90/axis/Choice" />
</port>
<port name="ChoiceTestSoap12" binding="s0:ChoiceTestSoap12">
<soap12:address location="http://localhost:90/axis/Choice" />
</port>
</service>
</definitions>