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 2007/01/18 03:52:50 UTC
svn commit: r497291 - in /webservices/axis/trunk/c: src/soap/
src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ tests/auto_build/testcases/
tests/auto_build/testcases/client/cpp/ tests/auto_build/testcases/output/
tests/auto_build/testcases/tests/ tests/auto_...
Author: nadiramra
Date: Wed Jan 17 18:52:49 2007
New Revision: 497291
URL: http://svn.apache.org/viewvc?view=rev&rev=497291
Log:
AXISCPP-1011 - SoapFaults not handled correctly
Added:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/FaultMappingDocDivByZeroClient.cpp
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroActorAndDetail.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActor.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActorNoDetail.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoDetail.xml
webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/FaultMappingDocDivByZero.wsdl
Modified:
webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?view=diff&rev=497291&r1=497290&r2=497291
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Wed Jan 17 18:52:49 2007
@@ -855,18 +855,12 @@
getCmplxFaultObjectName ()
{
if (!m_pNode)
- m_pParser->next ();
+ m_pNode = m_pParser->next ();
m_nStatus = AXIS_SUCCESS;
if (RPC_ENCODED == m_nStyle)
- {
- // just skip wrapper node with type info
- // Ex: <tns:QuoteInfoType xmlns:tns="http://www.getquote.org/test">
m_pParser->next ();
- }
- else if (!m_pNode)
- m_pNode = m_pParser->next ();
if (!m_pNode)
return NULL;
@@ -1295,96 +1289,118 @@
return (xsd__duration *)getAttribute(pName, pNamespace, &simpleType);
}
+bool SoapDeSerializer::
+isNillValue()
+{
+ for (int i = 0; m_pNode->m_pchAttributes[i]; i += 3)
+ {
+ string sLocalName = m_pNode->m_pchAttributes[i];
+ string sValue = m_pNode->m_pchAttributes[i + 2];
+
+ if( strcmp( "nil", sLocalName.c_str()) == 0 &&
+ strcmp( "true", sValue.c_str()) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+void SoapDeSerializer::
+processFaultDetail(IAnySimpleType * pSimpleType, const AxisChar* elementValue)
+{
+ bool isWhiteSpace = true;
+
+ int len = elementValue ? strlen(elementValue) : 0;
+
+ // See if detail element character data is whitespace
+ for (int i=0; i<len; ++i)
+ if (!(*elementValue == '\r' || *elementValue == '\n'
+ || *elementValue == '\t' || *elementValue == ' '))
+ {
+ isWhiteSpace = false;
+ break;
+ }
+
+ // If it is whitespace, peek to see if next element is the start of
+ // a new element, in which case the fault detail is complex. Peek()
+ // return null string if end-element tag is encountered.
+ char *workingString = (char *)elementValue;
+ if (isWhiteSpace)
+ {
+ // Since we will be doing a peek, elementValue will no longer
+ // be valid, so if we will deserialize null string if we need to.
+ workingString = "";
+
+ // if end tag not found, must be complex detail - fault handling code
+ // will know what to do when we return with no deserialization
+ const char* nextName = m_pParser->peek();
+ if (nextName[0] != 0x00)
+ {
+ m_pNode = NULL; // node consumed
+ return;
+ }
+ }
+
+ // If here, detail is simple character data, deserialize simple string
+ pSimpleType->deserialize(workingString);
+ skipEndNode();
+
+ return;
+}
+
+
void SoapDeSerializer::
getElement (const AxisChar * pName,
const AxisChar * pNamespace,
IAnySimpleType * pSimpleType,
bool isArrayElement)
{
+ bool bNillFound = false;
+
if (AXIS_SUCCESS != m_nStatus)
return;
if (RPC_ENCODED == m_nStyle)
{
- bool bNillFound = false;
m_pNode = m_pParser->next ();
-
- // wrapper node with type info Ex: <i xsi:type="xsd:int">
if (!m_pNode)
return;
if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
- {
- for (int i = 0; m_pNode->m_pchAttributes[i] && !bNillFound; i += 3)
- {
- string sLocalName = m_pNode->m_pchAttributes[i];
- string sValue = m_pNode->m_pchAttributes[i + 2];
-
- if (strcmp( "nil", sLocalName.c_str()) == 0 &&
- strcmp( "true", sValue.c_str()) == 0)
- bNillFound = true;
- }
- }
+ bNillFound = isNillValue();
if (bNillFound || isArrayElement || (pSimpleType->getType() == getXSDType (m_pNode)))
{
m_pNode = m_pParser->next (true); /* charactor node */
- if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
+ if (!m_pNode)
+ return;
+
+ if (CHARACTER_ELEMENT == m_pNode->m_type)
{
const AxisChar* elementValue = m_pNode->m_pchNameOrValue;
- // FJP Added this code for fault finding. If detail is
- // followed by CR/LF or CR/LF then CR/LF then assume that
- // it is not a simple object. As added protection against
+ // FJP Added this code for fault finding. As added protection against
// false findings, the namespace has been set to an invalid
// value of a single space character.
- if (strlen (elementValue) < 3 && pNamespace != NULL)
+ if (pNamespace != NULL && *pNamespace == ' ')
+ processFaultDetail(pSimpleType, elementValue);
+ else
{
- if (*pNamespace == ' ')
- {
- bool bReturn = false;
-
- if (strlen (elementValue) == 0)
- bReturn = true;
-
- if (strlen (elementValue) == 1 && (*elementValue == '\n' || *elementValue == '\r'))
- bReturn = true;
-
- if (strlen (elementValue) == 2
- && ((*elementValue == '\n' || *elementValue == '\r')
- && (*(elementValue + 1) == '\n' || *(elementValue + 1) == '\r')))
- bReturn = true;
-
- if (bReturn)
- {
- skipEndNode();
- return;
- }
- }
+ pSimpleType->deserialize(elementValue);
+ skipEndNode();
}
-
- pSimpleType->deserialize(elementValue);
- skipEndNode();
- return;
}
- else if (m_pNode && (END_ELEMENT == m_pNode->m_type) && bNillFound ) //xsi:nil="true"
+ else if (END_ELEMENT == m_pNode->m_type)
{
- pSimpleType->deserialize(NULL);
+ // xsi:nil="true" OR empty tag case <tag/>
+ pSimpleType->deserialize(bNillFound ? NULL : "");
m_pNode = NULL;
- return;
- }
- else if (m_pNode && (END_ELEMENT == m_pNode->m_type)) // We have an empty string
- {
- pSimpleType->deserialize("");
- m_pNode = NULL;
- return;
- }
- else
- return;
+ }
+
+ return;
}
else
{
-
/* it is an error if type is different or not present */
}
}
@@ -1399,69 +1415,35 @@
if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
{
- bool bNillFound = false;
- for (int i = 0; m_pNode->m_pchAttributes[i] && !bNillFound; i += 3)
- {
- string sLocalName = m_pNode->m_pchAttributes[i];
- string sValue = m_pNode->m_pchAttributes[i + 2];
-
- if( strcmp( "nil", sLocalName.c_str()) == 0 &&
- strcmp( "true", sValue.c_str()) == 0)
- bNillFound = true;
- }
+ bNillFound = isNillValue();
m_pNode = m_pParser->next (true); /* charactor node */
- if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
+ if (!m_pNode)
+ return;
+
+ if (CHARACTER_ELEMENT == m_pNode->m_type)
{
const AxisChar* elementValue = m_pNode->m_pchNameOrValue;
- // FJP Added this code for fault finding. If detail is
- // followed by CR/LF or CR/LF then CR/LF then assume that
- // it is not a simple object. As added protection against
+
+ // FJP Added this code for fault finding. As added protection against
// false findings, the namespace has been set to an invalid
// value of a single space character.
- if (strlen (elementValue) < 3 && pNamespace != NULL)
+ if (pNamespace != NULL && *pNamespace == ' ')
+ processFaultDetail(pSimpleType, elementValue);
+ else
{
- if (*pNamespace == ' ')
- {
- bool bReturn = false;
-
- if (strlen (elementValue) == 0)
- bReturn = true;
-
- if (strlen (elementValue) == 1 && (*elementValue == '\n' || *elementValue == '\r'))
- bReturn = true;
-
- if (strlen (elementValue) == 2
- && ((*elementValue == '\n' || *elementValue == '\r')
- && (*(elementValue + 1) == '\n' || *(elementValue + 1) == '\r')))
- bReturn = true;
-
- if (bReturn)
- {
- skipEndNode();
- return;
- }
- }
+ pSimpleType->deserialize(elementValue);
+ skipEndNode();
}
-
- pSimpleType->deserialize(elementValue);
- skipEndNode();
- return;
}
- else if (m_pNode && (END_ELEMENT == m_pNode->m_type) && bNillFound ) //xsi:nil="true"
+ else if (END_ELEMENT == m_pNode->m_type)
{
- pSimpleType->deserialize(NULL);
+ // xsi:nil="true" OR empty tag case <tag/>
+ pSimpleType->deserialize(bNillFound ? NULL : "");
m_pNode = NULL;
- return;
}
- else if (m_pNode && (END_ELEMENT == m_pNode->m_type) ) // empty tag case <tag/>
- {
- pSimpleType->deserialize("");
- m_pNode = NULL;
- return;
- }
- else
- return;
+
+ return;
}
else
return;
Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.h?view=diff&rev=497291&r1=497290&r2=497291
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.h Wed Jan 17 18:52:49 2007
@@ -353,6 +353,8 @@
void deserializeLiteralComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct, void *pDelFunct, const AxisChar * pName, const AxisChar * pNamespace);
void deserializeEncodedComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct, void *pDelFunct, const AxisChar * pName, const AxisChar * pNamespace, int size);
void skipEndNode();
+ void processFaultDetail(IAnySimpleType * pSimpleType, const AxisChar* elementValue);
+ bool isNillValue();
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?view=diff&rev=497291&r1=497290&r2=497291
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java Wed Jan 17 18:52:49 2007
@@ -1156,6 +1156,14 @@
}
// End of AXISCPP-918
+ // Set fields in SoapFaultException parent class if fault
+ if (type.isFault())
+ {
+ writer.write("\tsetFaultCode(original.getFaultCode());\n");
+ writer.write("\tsetFaultString(original.getFaultString());\n");
+ writer.write("\tsetFaultActor(original.getFaultActor());\n");
+ }
+
int anyCounter = 0;
for (int i = 0 ; i < attribs.length ; i++)
{
Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/FaultMappingDocDivByZeroClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/FaultMappingDocDivByZeroClient.cpp?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/FaultMappingDocDivByZeroClient.cpp (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/FaultMappingDocDivByZeroClient.cpp Wed Jan 17 18:52:49 2007
@@ -0,0 +1,97 @@
+// 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 "MathOps.hpp"
+#include <axis/AxisException.hpp>
+#include <ctype.h>
+#include <signal.h>
+#include <iostream>
+
+void sig_handler(int);
+using namespace std;
+
+int main( int argc, char * argv[])
+{
+ char *pszURL = "http://localhost:80/axis/MathOps";
+ const char *pszOperation = NULL;
+
+ signal( SIGILL, sig_handler);
+ signal( SIGABRT, sig_handler);
+ signal( SIGSEGV, sig_handler);
+ signal( SIGFPE, sig_handler);
+
+ pszURL = argv[1];
+
+ try
+ {
+ MathOps ws( pszURL);
+ int iResult = ws.div( 10, 0);
+ cout << "Result is " << iResult << endl;
+ }
+ catch( DivByZeroStruct& 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 << "DivByZeroStruct Fault: \"" << e.varString << "\", " << e.varInt << ", " << e.varFloat << 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 << "Exception : " << e.what() << endl;
+ }
+ catch( exception& e)
+ {
+ cout << "Unknown Exception: " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unspecified Exception: " << endl;
+ }
+
+
+ cout << "---------------------- TEST COMPLETE -----------------------------" << endl;
+
+ return 0;
+}
+
+void sig_handler( int sig)
+{
+ signal( sig, sig_handler);
+ cout << "SIGNAL RECEIVED " << sig << endl;
+ exit(1);
+}
\ No newline at end of file
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail.cpp.out?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail.cpp.out Wed Jan 17 18:52:49 2007
@@ -0,0 +1,5 @@
+FaultCode = ns2008922717:DivByZeroStruct
+FaultString = org.soapinterop.DivByZeroStruct
+FaultActor = http://www.test.apache.org/endpoint
+DivByZeroStruct Fault: "Division by zero exception", 1, 10.52
+---------------------- TEST COMPLETE -----------------------------
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected Wed Jan 17 18:52:49 2007
@@ -0,0 +1,26 @@
+HTTP/1.1 500 Internal Server Error
+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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<soapenv:Header/>
+<soapenv:Body>
+ <soapenv:Fault>
+ <faultcode xmlns:ns2008922717="http://soapinterop.org/wsdl" xmlns="">ns2008922717:DivByZeroStruct</faultcode>
+ <faultstring xmlns="">org.soapinterop.DivByZeroStruct</faultstring>
+ <faultactor xmlns="">http://www.test.apache.org/endpoint</faultactor>
+ <detail xmlns="">
+ <DivByZeroStruct xmlns="http://soapinterop.org/wsdl">
+ <varString>Division by zero exception</varString>
+ <varInt>1</varInt>
+ <varFloat>10.52</varFloat>
+ </DivByZeroStruct>
+ </detail>
+ </soapenv:Fault>
+</soapenv:Body>
+</soapenv:Envelope>
+0
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor.cpp.out?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor.cpp.out Wed Jan 17 18:52:49 2007
@@ -0,0 +1,5 @@
+FaultCode = ns2008922717:DivByZeroStruct
+FaultString = org.soapinterop.DivByZeroStruct
+FaultActor = NULL
+DivByZeroStruct Fault: "Division by zero exception", 1, 10.52
+---------------------- TEST COMPLETE -----------------------------
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail.cpp.out?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail.cpp.out Wed Jan 17 18:52:49 2007
@@ -0,0 +1,5 @@
+FaultCode = ns2008922717:DivByZeroStruct
+FaultString = org.soapinterop.DivByZeroStruct
+FaultActor = NULL
+SoapFaultException: org.soapinterop.DivByZeroStruct
+---------------------- TEST COMPLETE -----------------------------
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected Wed Jan 17 18:52:49 2007
@@ -0,0 +1,18 @@
+HTTP/1.1 500 Internal Server Error
+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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<soapenv:Header/>
+<soapenv:Body>
+ <soapenv:Fault>
+ <faultcode xmlns:ns2008922717="http://soapinterop.org/wsdl" xmlns="">ns2008922717:DivByZeroStruct</faultcode>
+ <faultstring xmlns="">org.soapinterop.DivByZeroStruct</faultstring>
+ </soapenv:Fault>
+</soapenv:Body>
+</soapenv:Envelope>
+0
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor_ServerResponse.expected?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoActor_ServerResponse.expected Wed Jan 17 18:52:49 2007
@@ -0,0 +1,24 @@
+HTTP/1.1 500 Internal Server Error
+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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<soapenv:Header/>
+<soapenv:Body>
+ <soapenv:Fault>
+ <faultcode xmlns:ns2008922717="http://soapinterop.org/wsdl" xmlns="">ns2008922717:DivByZeroStruct</faultcode>
+ <faultstring xmlns="">org.soapinterop.DivByZeroStruct</faultstring>
+ <detail xmlns=""> <DivByZeroStruct xmlns="http://soapinterop.org/wsdl">
+ <varString>Division by zero exception</varString>
+ <varInt>1</varInt>
+ <varFloat>10.52</varFloat>
+ </DivByZeroStruct>
+ </detail>
+ </soapenv:Fault>
+</soapenv:Body>
+</soapenv:Envelope>
+0
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail.cpp.out?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail.cpp.out Wed Jan 17 18:52:49 2007
@@ -0,0 +1,5 @@
+FaultCode = ns2008922717:DivByZeroStruct
+FaultString = org.soapinterop.DivByZeroStruct
+FaultActor = http://www.test.apache.org/endpoint
+SoapFaultException: org.soapinterop.DivByZeroStruct
+---------------------- TEST COMPLETE -----------------------------
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail_ServerResponse.expected?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/FaultMappingDocDivByZeroNoDetail_ServerResponse.expected Wed Jan 17 18:52:49 2007
@@ -0,0 +1,19 @@
+HTTP/1.1 500 Internal Server Error
+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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<soapenv:Header/>
+<soapenv:Body>
+ <soapenv:Fault>
+ <faultcode xmlns:ns2008922717="http://soapinterop.org/wsdl" xmlns="">ns2008922717:DivByZeroStruct</faultcode>
+ <faultstring xmlns="">org.soapinterop.DivByZeroStruct</faultstring>
+ <faultactor xmlns="">http://www.test.apache.org/endpoint</faultactor>
+ </soapenv:Fault>
+</soapenv:Body>
+</soapenv:Envelope>
+0
Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroActorAndDetail.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroActorAndDetail.xml?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroActorAndDetail.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroActorAndDetail.xml Wed Jan 17 18:52:49 2007
@@ -0,0 +1,18 @@
+<test>
+ <name>FaultMappingDocDivByZeroActorAndDetail</name>
+ <description>FaultMappingDocDivByZeroActorAndDetail</description>
+ <clientLang>cpp</clientLang>
+ <clientCode>FaultMappingDocDivByZeroClient.cpp</clientCode>
+ <wsdl>FaultMappingDocDivByZero.wsdl</wsdl>
+ <expected>
+ <output>
+ FaultMappingDocDivByZeroActorAndDetail.cpp.out
+ </output>
+ <serverResponse>
+ FaultMappingDocDivByZeroActorAndDetail_ServerResponse.expected
+ </serverResponse>
+ </expected>
+
+
+ <endpoint>http://localhost:80/axis/FaultMappingDoc</endpoint>
+</test>
Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActor.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActor.xml?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActor.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActor.xml Wed Jan 17 18:52:49 2007
@@ -0,0 +1,18 @@
+<test>
+ <name>FaultMappingDocDivByZeroNoActor</name>
+ <description>FaultMappingDocDivByZeroNoActor</description>
+ <clientLang>cpp</clientLang>
+ <clientCode>FaultMappingDocDivByZeroClient.cpp</clientCode>
+ <wsdl>FaultMappingDocDivByZero.wsdl</wsdl>
+ <expected>
+ <output>
+ FaultMappingDocDivByZeroNoActor.cpp.out
+ </output>
+ <serverResponse>
+ FaultMappingDocDivByZeroNoActor_ServerResponse.expected
+ </serverResponse>
+
+ </expected>
+
+ <endpoint>http://localhost:80/axis/FaultMappingDoc</endpoint>
+</test>
Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActorNoDetail.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActorNoDetail.xml?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActorNoDetail.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoActorNoDetail.xml Wed Jan 17 18:52:49 2007
@@ -0,0 +1,18 @@
+<test>
+ <name>FaultMappingDocDivByZeroNoActorNoDetail</name>
+ <description>FaultMappingDocDivByZeroNoActorNoDetail</description>
+ <clientLang>cpp</clientLang>
+ <clientCode>FaultMappingDocDivByZeroClient.cpp</clientCode>
+ <wsdl>FaultMappingDocDivByZero.wsdl</wsdl>
+ <expected>
+ <output>
+ FaultMappingDocDivByZeroNoActorNoDetail.cpp.out
+ </output>
+ <serverResponse>
+ FaultMappingDocDivByZeroNoActorNoDetail_ServerResponse.expected
+ </serverResponse>
+ </expected>
+
+
+ <endpoint>http://localhost:80/axis/FaultMappingDoc</endpoint>
+</test>
Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoDetail.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoDetail.xml?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoDetail.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/FaultMappingDocDivByZeroNoDetail.xml Wed Jan 17 18:52:49 2007
@@ -0,0 +1,18 @@
+<test>
+ <name>FaultMappingDocDivByZeroNoDetail</name>
+ <description>FaultMappingDocDivByZeroNoDetail</description>
+ <clientLang>cpp</clientLang>
+ <clientCode>FaultMappingDocDivByZeroClient.cpp</clientCode>
+ <wsdl>FaultMappingDocDivByZero.wsdl</wsdl>
+ <expected>
+ <output>
+ FaultMappingDocDivByZeroNoDetail.cpp.out
+ </output>
+ <serverResponse>
+ FaultMappingDocDivByZeroNoDetail_ServerResponse.expected
+ </serverResponse>
+ </expected>
+
+
+ <endpoint>http://localhost:80/axis/FaultMappingDoc</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?view=diff&rev=497291&r1=497290&r2=497291
==============================================================================
Binary files - no diff available.
Added: webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/FaultMappingDocDivByZero.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/FaultMappingDocDivByZero.wsdl?view=auto&rev=497291
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/FaultMappingDocDivByZero.wsdl (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/FaultMappingDocDivByZero.wsdl Wed Jan 17 18:52:49 2007
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+
+<wsdl:definitions targetNamespace="http://soapinterop.org/wsdl" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soapinterop.org/wsdl" xmlns:intf="http://soapinterop.org/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/wsdl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soapinterop.org/wsdl" xmlns:intf="http://soapinterop.org/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <element name="div">
+ <complexType>
+ <sequence>
+ <element name="arg_0_0" type="xsd:int"/>
+ <element name="arg_1_0" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="divResponse">
+ <complexType>
+ <sequence>
+ <element name="divReturn" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="DivByZeroStruct" nillable="true">
+ <complexType>
+ <sequence>
+ <element name="varString" nillable="true" type="xsd:string"/>
+ <element name="varInt" type="xsd:int"/>
+ <element name="varFloat" type="xsd:float"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="divRequest">
+ <wsdl:part element="impl:div" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="divResponse">
+ <wsdl:part element="impl:divResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="DivByZeroStruct">
+ <wsdl:part element="impl:DivByZeroStruct" name="fault"/>
+ </wsdl:message>
+
+ <wsdl:portType name="MathOps">
+ <wsdl:operation name="div">
+ <wsdl:input message="impl:divRequest" name="divRequest"/>
+ <wsdl:output message="impl:divResponse" name="divResponse"/>
+ <wsdl:fault message="impl:DivByZeroStruct" name="DivByZeroStruct"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="MathOpsSoapBinding" type="impl:MathOps">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="div">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="divRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="divResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="DivByZeroStruct">
+ <wsdlsoap:fault name="DivByZeroStruct" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="MathOpsService">
+ <wsdl:port binding="impl:MathOpsSoapBinding" name="MathOps">
+ <wsdlsoap:address location="http://localhost/axis/MathOps"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org