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 pe...@apache.org on 2005/02/02 17:26:53 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/tests IAttributeTest1.xml IAttributeTest2.xml IAttributeTest3.xml IAttributeTest4.xml IHeaderBlockTest1.xml IHeaderBlockTest2.xml IHeaderBlockTest3.xml IHeaderBlockTest4.xml IHeaderBlockTest5.xml IHeaderBlockTest6.xml INamespaceTest1.xml
perryan 2005/02/02 08:26:53
Added: c/tests/auto_build/testcases/client/cpp
IAttributeTest1Client.cpp IAttributeTest2Client.cpp
IAttributeTest3Client.cpp IAttributeTest4Client.cpp
IHeaderBlockTest1Client.cpp
IHeaderBlockTest2Client.cpp
IHeaderBlockTest3Client.cpp
IHeaderBlockTest4Client.cpp
IHeaderBlockTest5Client.cpp
IHeaderBlockTest6Client.cpp
INamespaceTest1Client.cpp
c/tests/auto_build/testcases/output IAttributeTest1.expected
IAttributeTest1Request.out IAttributeTest2.expected
IAttributeTest2Request.out IAttributeTest3.expected
IAttributeTest3Request.out IAttributeTest4.expected
IAttributeTest4Request.out
IHeaderBlockTest1.expected
IHeaderBlockTest1Request.out
IHeaderBlockTest2.expected
IHeaderBlockTest2Request.out
IHeaderBlockTest3.expected
IHeaderBlockTest3Request.out
IHeaderBlockTest4.expected
IHeaderBlockTest4Request.out
IHeaderBlockTest5.expected
IHeaderBlockTest5Request.out
IHeaderBlockTest6.expected
IHeaderBlockTest6Request.out
INamespaceTest1.expected INamespaceTest1request.out
c/tests/auto_build/testcases/tests IAttributeTest1.xml
IAttributeTest2.xml IAttributeTest3.xml
IAttributeTest4.xml IHeaderBlockTest1.xml
IHeaderBlockTest2.xml IHeaderBlockTest3.xml
IHeaderBlockTest4.xml IHeaderBlockTest5.xml
IHeaderBlockTest6.xml INamespaceTest1.xml
Log:
New Axis C++ testcases added for James Jose. He is a voted in committer, but is still awaiting his karma to be granted.
Revision Changes Path
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IAttributeTest1Client.cpp
Index: IAttributeTest1Client.cpp
===================================================================
/* Tests setLocalName() and getLocalName()in IAttribute class
@Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const char *name="Name";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
IAttribute *attr=phb->createAttribute("NAME","ns","AXIS");
attr->setLocalName(name);
BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
IAttribute *attr1=bn->createAttribute("TYPE","Open Source");
attr1->setLocalName("Type");
cout << endl << "Header Attribute Name = " << attr->getLocalName();
cout << endl << "Child Node Attribute Name = " << attr1->getLocalName();
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------" << endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IAttributeTest2Client.cpp
Index: IAttributeTest2Client.cpp
===================================================================
/* Tests setPrefix() and getPrefix()in IAttribute class
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const char *prefix="nsp";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","nsp");
IAttribute *attr1=phb->createAttribute("Name","ns","AXIS");
attr1->setPrefix(prefix);
BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
IAttribute *attr2=bn->createAttribute("TYPE","Open Source");
attr2->setPrefix(prefix);
cout << endl << "Header Attribute Prefix = " << attr1->getPrefix();
cout << endl << "Child Node Attribute Prefix = " << attr2->getPrefix();
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IAttributeTest3Client.cpp
Index: IAttributeTest3Client.cpp
===================================================================
/* Tests setValue() and getValue()in IAttribute class
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const char *Value="AXIS";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
IAttribute *attr1=phb->createAttribute("Name","ns","axis");
attr1->setValue(Value);
BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
IAttribute *attr2=bn->createAttribute("TYPE","OPEN SOURCE");
attr2->setValue("Open Source");
cout << endl << "Header Attribute Value = " << attr1->getValue();
cout << endl << "Child Node Attribute Value = " << attr2->getValue();
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IAttributeTest4Client.cpp
Index: IAttributeTest4Client.cpp
===================================================================
/* Tests setUri() and getUri()in IAttribute Class
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const char *uri="http://axis.apache.com";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
INamespace *nsp=phb->createNamespaceDecl("nsp","http://apache.com");
IAttribute *attr1=phb->createAttribute("Name","nsp","axis");
attr1->setUri(uri);
BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
IAttribute *attr2=bn->createAttribute("TYPE","OPEN SOURCE");
attr2->setUri(uri);
cout << endl << "Header Attribute Uri = " << attr1->getUri();
cout << endl << "Child Node Attribute Uri = " << attr2->getUri();
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest1Client.cpp
Index: IHeaderBlockTest1Client.cpp
===================================================================
/* Tests setLocalName() and getLocalName() APIs in IHeaderBlock
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/IHeaderBlock.hpp>
#include <axis/AxisException.hpp>
#include <stdio.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const AxisChar *localname="TestHeader";
op = "add";
i1 = 2;
i2 = 3;
IHeaderBlock *phb = ws.createSOAPHeaderBlock("Test","http://ws.apache.org/axisCppTest/");
phb->setLocalName(localname);
IHeaderBlock *fhb=ws.getFirstSOAPHeaderBlock();
localname=fhb->getLocalName();
cout << endl << "Local Name is " << localname;
if (strcmp(op, "add") == 0)
{
iResult=ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest2Client.cpp
Index: IHeaderBlockTest2Client.cpp
===================================================================
/* Tests setPrefix() and setUri() APIs in IHeaderBlock
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/IHeaderBlock.hpp>
#include <axis/AxisException.hpp>
#include <stdio.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
op = "add";
i1 = 2;
i2 = 3;
const AxisChar *prefix="np";
const AxisChar *uri="http://axis.apache.com";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://apache.org/");
phb->setPrefix(prefix);
phb->setUri(uri);
if (strcmp(op, "add") == 0)
{
iResult=ws.add(i1, i2);
cout << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest3Client.cpp
Index: IHeaderBlockTest3Client.cpp
===================================================================
/* Tests createNamespaceDecl(),createAttribute() and getAttributeValue() APIs in IHeaderBlock
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/IHeaderBlock.hpp>
#include <axis/IAttribute.hpp>
#include <axis/AxisException.hpp>
#include <stdio.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
op = "add";
i1 = 2;
i2 = 3;
const AxisChar *prefix="np";
const AxisChar *uri="http://ws.apache.org/";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/");
INamespace *Insp1=phb->createNamespaceDecl(prefix,uri);
INamespace *Insp2=phb->createNamespaceDecl("np1","http://axis.apache.org/");
const AxisChar *temp="apache";
const AxisChar *localname="name";
IAttribute *Iattr1=phb->createAttribute(localname,prefix,temp);
IAttribute *Iattr2=phb->createAttribute(localname,"np1","","Axis");
IAttribute *Iattr3=phb->createAttribute(localname,"","","");
cout << endl << "name=" << phb->getAttributeValue("name","");
cout << endl << "np:name=" << phb->getAttributeValue(localname,prefix);
cout << endl << "np1:name=" << phb->getAttributeValue("name","np1");
if (strcmp(op, "add") == 0)
{
iResult=ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest4Client.cpp
Index: IHeaderBlockTest4Client.cpp
===================================================================
/* Tests createChild(),addChild(),getNoOfChildren() and getchild() APIs
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/IHeaderBlock.hpp>
#include <axis/IAttribute.hpp>
#include <axis/AxisException.hpp>
#include <stdio.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
op = "add";
i1 = 2;
i2 = 3;
AxisChar *localname="Name";
AxisChar *prefix="np";
AxisChar *uri="http://ws.apache.org/";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/");
BasicNode * Bnode1=phb->createChild(ELEMENT_NODE,localname,prefix,uri, NULL);
BasicNode * Bnode2=phb->createChild(CHARACTER_NODE,NULL,NULL,NULL,"APACHE");
BasicNode * Bnode3=phb->createChild(ELEMENT_NODE,"FirstPart","np1","http://ws.apache.org/", NULL);
BasicNode * Bnode4=phb->createChild(ELEMENT_NODE,"LastPart","","http://ws.apache.org/", NULL);
BasicNode * Bnode5=phb->createChild(CHARACTER_NODE,"","","","APACHE");
BasicNode * Bnode6=phb->createChild(ELEMENT_NODE);
Bnode6->setLocalName("Project");
IAttribute *a=Bnode6->createAttribute("Type","Open Source");
cout << "Project Type=" << a->getValue();
BasicNode * Bnode7=phb->createChild(CHARACTER_NODE);
Bnode7->setValue("AXISCPP");
Bnode6->addChild(Bnode7);
Bnode3->addChild(Bnode2);
Bnode4->addChild(Bnode5);
Bnode1->addChild(Bnode3);
Bnode1->addChild(Bnode4);
phb->addChild(Bnode1);
phb->addChild(Bnode6);
BasicNode * Bnode8=phb->createChild(CHARACTER_NODE,"","","","This is a test message");
phb->addChild(Bnode8);
cout << endl << "No Of Children = " << phb->getNoOfChildren();
BasicNode * firstnode=phb->getFirstChild();
cout << endl << "First Node Name = " << firstnode->getLocalName();
BasicNode * secondnode=phb->getChild(2);
BasicNode *childnode=secondnode->getFirstChild();
cout << endl << "Second Node Name=" << secondnode->getLocalName() << " Value = " << childnode->getValue();
BasicNode * lastnode=phb->getLastChild();
cout << endl << "Last Node Value = " << lastnode->getValue();
if (strcmp(op, "add") == 0)
{
iResult=ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest5Client.cpp
Index: IHeaderBlockTest5Client.cpp
===================================================================
/* Tests createImmdediateChild() APIs and getChild() API
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/IHeaderBlock.hpp>
#include <axis/IAttribute.hpp>
#include <axis/AxisException.hpp>
#include <stdio.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
op = "add";
i1 = 2;
i2 = 3;
AxisChar *localname="Name";
AxisChar *prefix="np";
AxisChar *uri="http://ws.apache.org/";
IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/");
BasicNode * Bnode1=phb->createImmediateChild(ELEMENT_NODE,localname,prefix,uri, NULL);
BasicNode * Bnode2=phb->createChild(CHARACTER_NODE,NULL,NULL,NULL,"AXIS");
BasicNode * Bnode3=phb->createChild(ELEMENT_NODE,"FirstPart","np1","http://ws.apache.org/", NULL);
BasicNode * Bnode4=phb->createImmediateChild(ELEMENT_NODE,"Location","","http://ws.apache.org/", NULL);
BasicNode * Bnode5=phb->createChild(CHARACTER_NODE,"","","","Sri Lanka");
BasicNode * Bnode6=phb->createImmediateChild(ELEMENT_NODE);
Bnode6->setLocalName("Project");
IAttribute *a=Bnode6->createAttribute("Type","Open Source");
cout << endl << "Project Type=" << a->getValue();
BasicNode * Bnode7=phb->createChild(CHARACTER_NODE);
Bnode7->setValue("AXISCPP");
Bnode6->addChild(Bnode7);
Bnode3->addChild(Bnode2);
Bnode4->addChild(Bnode5);
Bnode1->addChild(Bnode3);
BasicNode * Bnode8=phb->createImmediateChild(CHARACTER_NODE,"","","","This is a test ");
BasicNode *Bnode9=phb->createImmediateChild(CHARACTER_NODE);
Bnode9->setValue("message");
cout << endl << "No Of Children=" << phb->getNoOfChildren();
BasicNode * firstnode=phb->getFirstChild();
cout << endl << "First Node Name = " << firstnode->getLocalName();
BasicNode * secondnode=phb->getChild(2);
BasicNode * childnode=secondnode->getFirstChild();
cout << endl << "Second Node Name = " << secondnode->getLocalName();
cout << " Value =" << childnode->getValue();
BasicNode * lastnode=phb->getLastChild();
cout << endl << "Last Child Value=" << lastnode->getValue();
BasicNode *nullNode=phb->getChild(phb->getNoOfChildren()+1);
if(nullNode==NULL)
cout << endl << "NULL is returned for non existing node";
if (strcmp(op, "add") == 0)
{
iResult=ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/IHeaderBlockTest6Client.cpp
Index: IHeaderBlockTest6Client.cpp
===================================================================
/*This program tests clone() API in the IHeaderBlock class
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
IHeaderBlock *phb=ws.createSOAPHeaderBlock("TestHeader","http://apache.com","np");
phb->createImmediateChild(CHARACTER_NODE,"","","","Test Message");
IHeaderBlock *cl=phb->clone();
cl->createImmediateChild(ELEMENT_NODE,"Name","","","");
cout << "No of Child in clone=" << cl->getNoOfChildren();
cout << endl << "No of Child in original=" << phb->getNoOfChildren();
BasicNode * bn=phb->getFirstChild();
bn->setValue("Axis");
cout << endl << "First Child Value=" << bn->getValue();
BasicNode *bn1=cl->getFirstChild();
BasicNode *bn2=cl->getLastChild();
cout << endl << "First Child Value in clone=" << bn1->getValue();
cout << endl << "Last Child Name in clone=" << bn2->getLocalName();
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/client/cpp/INamespaceTest1Client.cpp
Index: INamespaceTest1Client.cpp
===================================================================
/* Tests setPrefix(),getPrefix(),setURI() and getURI() APIs in INamespace class
@ Author : James Jose
*/
#include "Calculator.hpp"
#include <axis/AxisException.hpp>
#include <ctype.h>
#include <iostream>
int main(int argc, char* argv[])
{
char endpoint[256];
const char* url="http://localhost:80/axis/Calculator";
const char* op = 0;
int i1=0, i2=0;
int iResult;
url = argv[1];
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
const AxisChar *pf="nsp";
const AxisChar *uri="http://axis.apache.org";
IHeaderBlock *phb=ws.createSOAPHeaderBlock("TestHeader","http://apache.org","ns");
INamespace *nsp=phb->createNamespaceDecl("ns1","http://axis.org");
nsp->setURI(uri);
nsp->setPrefix(pf);
const AxisChar *p=nsp->getPrefix();
const AxisChar *u=nsp->getURI();
cout << "Prefix = " << p;
cout << endl << "Uri = " << u;
op = "add";
i1 = 2;
i2 = 3;
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
cout << endl << iResult << endl;
}
}
catch(AxisException& e)
{
cout << "Exception : " << e.what() << endl;
}
catch(exception& e)
{
cout << "Unknown exception has occured" << endl;
}
catch(...)
{
cout << "Unspecified exception has occured" << endl;
}
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest1.expected
Index: IAttributeTest1.expected
===================================================================
Header Attribute Name = Name
Child Node Attribute Name = Type
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest1Request.out
Index: IAttributeTest1Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 550
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns:TestHeader xmlns:ns="http://ws.apache.org/" ns:Name="AXIS"><Project Type="Open Source"></Project></ns:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest2.expected
Index: IAttributeTest2.expected
===================================================================
Header Attribute Prefix = nsp
Child Node Attribute Prefix = nsp
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest2Request.out
Index: IAttributeTest2Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 558
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><nsp:TestHeader xmlns:nsp="http://ws.apache.org/" nsp:Name="AXIS"><Project nsp:TYPE="Open Source"></Project></nsp:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest3.expected
Index: IAttributeTest3.expected
===================================================================
Header Attribute Value = AXIS
Child Node Attribute Value = Open Source
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest3Request.out
Index: IAttributeTest3Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 550
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns:TestHeader xmlns:ns="http://ws.apache.org/" ns:Name="AXIS"><Project TYPE="Open Source"></Project></ns:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest4.expected
Index: IAttributeTest4.expected
===================================================================
Header Attribute Uri = http://axis.apache.com
Child Node Attribute Uri = http://axis.apache.com
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IAttributeTest4Request.out
Index: IAttributeTest4Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 620
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns:TestHeader xmlns:ns="http://ws.apache.org/" nsp:Name="axis" xmlns:nsp="http://apache.com"><Project xmlns:ns2="http://axis.apache.com" ns2:TYPE="OPEN SOURCE"></Project></ns:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest1.expected
Index: IHeaderBlockTest1.expected
===================================================================
Local Name is TestHeader
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest1Request.out
Index: IHeaderBlockTest1Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 512
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://ws.apache.org/axisCppTest/"></ns2:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest2.expected
Index: IHeaderBlockTest2.expected
===================================================================
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest2Request.out
Index: IHeaderBlockTest2Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 498
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><np:TestHeader xmlns:np="http://axis.apache.com"></np:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest3.expected
Index: IHeaderBlockTest3.expected
===================================================================
name=
np:name=apache
np1:name=Axis
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest3Request.out
Index: IHeaderBlockTest3Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 610
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://ws.apache.org/" np:name="apache" np1:name="Axis" name="" xmlns:np="http://ws.apache.org/" xmlns:np1="http://axis.apache.org/"></ns2:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest4.expected
Index: IHeaderBlockTest4.expected
===================================================================
Project Type=Open Source
No Of Children = 3
First Node Name = Name
Second Node Name=Project Value = AXISCPP
Last Node Value = This is a test message
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest4Request.out
Index: IHeaderBlockTest4Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 715
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://ws.apache.org/"><np:Name xmlns:np="http://ws.apache.org/"><np1:FirstPart xmlns:np1="http://ws.apache.org/">AXIS</np1:FirstPart><LastPart>APACHE</LastPart></np:Name><Project Type="Open Source">AXISCPP</Project>This is a test message</ns2:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest5.expected
Index: IHeaderBlockTest5.expected
===================================================================
Project Type=Open Source
No Of Children=5
First Node Name = Name
Second Node Name = Location Value =Sri Lanka
Last Child Value=message
NULL is returned for non existing node
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest5Request.out
Index: IHeaderBlockTest5Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 718
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://ws.apache.org/"><np:Name xmlns:np="http://ws.apache.org/"><np1:FirstPart xmlns:np1="http://ws.apache.org/">AXIS</np1:FirstPart></np:Name><Location>Sri Lanka</Location><Project Type="Open Source">AXISCPP</Project>This is a test message</ns2:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest6.expected
Index: IHeaderBlockTest6.expected
===================================================================
No of Child in clone=2
No of Child in original=1
First Child Value=Axis
First Child Value in clone=Test Message
Last Child Name in clone=Name
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/IHeaderBlockTest6Request.out
Index: IHeaderBlockTest6Request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 497
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><np:TestHeader xmlns:np="http://apache.com">Axis</np:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/output/INamespaceTest1.expected
Index: INamespaceTest1.expected
===================================================================
Prefix = nsp
Uri = http://axis.apache.org
5
---------------------- TEST COMPLETE -----------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/INamespaceTest1request.out
Index: INamespaceTest1request.out
===================================================================
POST /Calculator/services/Calculator HTTP/1.1
Host: localhost:13260
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calculator#add"
Content-Length: 528
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns:TestHeader xmlns:ns="http://apache.org" xmlns:nsp="http://axis.apache.org"></ns:TestHeader></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:add xmlns:ns1="http://localhost/axis/Calculator">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>3</ns1:arg_1_0>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IAttributeTest1.xml
Index: IAttributeTest1.xml
===================================================================
<test>
<name>IAttributeTest1</name>
<description>IAttributeTest1</description>
<clientLang>cpp</clientLang>
<clientCode>IAttributeTest1Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IAttributeTest1.expected
</output>
<request>
IAttributeTest1Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IAttributeTest2.xml
Index: IAttributeTest2.xml
===================================================================
<test>
<name>IAttributeTest2</name>
<description>IAttributeTest2</description>
<clientLang>cpp</clientLang>
<clientCode>IAttributeTest2Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IAttributeTest2.expected
</output>
<request>
IAttributeTest2Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IAttributeTest3.xml
Index: IAttributeTest3.xml
===================================================================
<test>
<name>IAttributeTest3</name>
<description>IAttributeTest3</description>
<clientLang>cpp</clientLang>
<clientCode>IAttributeTest3Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IAttributeTest3.expected
</output>
<request>
IAttributeTest3Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IAttributeTest4.xml
Index: IAttributeTest4.xml
===================================================================
<test>
<name>IAttributeTest4</name>
<description>IAttributeTest4</description>
<clientLang>cpp</clientLang>
<clientCode>IAttributeTest4Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IAttributeTest4.expected
</output>
<request>
IAttributeTest4Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest1.xml
Index: IHeaderBlockTest1.xml
===================================================================
<test>
<name>IHeaderBlockTest1</name>
<description>IHeaderBlockTest1</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest1Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest1.expected
</output>
<request>
IHeaderBlockTest1Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest2.xml
Index: IHeaderBlockTest2.xml
===================================================================
<test>
<name>IHeaderBlockTest2</name>
<description>IHeaderBlockTest2</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest2Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest2.expected
</output>
<request>
IHeaderBlockTest2Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest3.xml
Index: IHeaderBlockTest3.xml
===================================================================
<test>
<name>IHeaderBlockTest3</name>
<description>IHeaderBlockTest3</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest3Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest3.expected
</output>
<request>
IHeaderBlockTest3Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest4.xml
Index: IHeaderBlockTest4.xml
===================================================================
<test>
<name>IHeaderBlockTest4</name>
<description>IHeaderBlockTest4</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest4Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest4.expected
</output>
<request>
IHeaderBlockTest4Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest5.xml
Index: IHeaderBlockTest5.xml
===================================================================
<test>
<name>IHeaderBlockTest5</name>
<description>IHeaderBlockTest5</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest5Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest5.expected
</output>
<request>
IHeaderBlockTest5Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/IHeaderBlockTest6.xml
Index: IHeaderBlockTest6.xml
===================================================================
<test>
<name>IHeaderBlockTest6</name>
<description>IHeaderBlockTest6</description>
<clientLang>cpp</clientLang>
<clientCode>IHeaderBlockTest6Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
IHeaderBlockTest6.expected
</output>
<request>
IHeaderBlockTest6Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>
1.1 ws-axis/c/tests/auto_build/testcases/tests/INamespaceTest1.xml
Index: INamespaceTest1.xml
===================================================================
<test>
<name>INamespaceTest1</name>
<description>INamespaceTest1</description>
<clientLang>cpp</clientLang>
<clientCode>INamespaceTest1Client.cpp</clientCode>
<wsdl>CalculatorDoc.wsdl</wsdl>
<expected>
<output>
INamespaceTest1.expected
</output>
<request>
INamespaceTest1Request.out
</request>
</expected>
<endpoint>http://localhost:80/Calculator/services/Calculator</endpoint>
</test>