Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6 Beta
-
None
-
Axis Client : latest code from SVN
XMLParser: xerces-c-2.7.0
WSDL2WS: Build with latest code using Axis Java 1.6
Compiler: VC++ 2005(Vc8)
Description
The generated client stub is not creating the correct request. The name of the operation is wrong.
<?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><ns1:SSOCookie xmlns:ns1="http://abc.com/security"></ns1:SSOCookie></SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:ProductTerms xmlns:ns1="http://www.cat.com/ppd"><ProductId>1.000000</ProductId>
<Definition> </Definition>
<LongName>AS</LongName>
<ShortName> </ShortName>
<EDSName> </EDSName>
</ns1:ProductTerms>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Respone is SOAPFault.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>No such operation 'ProductTerms'</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The generated stub code
ProductTermsArray* PiecePartServicePT::
assemblySearch(ProductTerms* Value0)
{
ProductTermsArray* pReturn = NULL;
const char* pcCmplxFaultName = NULL;
try
{
// ======================================================================
// Initialize client engine, set SOAP version, SOAPAction, operation, etc.
// ======================================================================
if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER))
return pReturn;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("AssemblySearchRequest", "http://www.abc.com/ppd", false);
// ======================================================================
// Apply SSL configuration properties and user-set SOAP headers.
// ======================================================================
includeSecure();
applyUserPreferences();
// ======================================================================
// Process parameters.
// ======================================================================
char cPrefixAndParamName0[22];
sprintf( cPrefixAndParamName0, "%s:ProductTerms", m_pCall->getNamespacePrefix("http://www.abc.com/ppd"));
m_pCall->addCmplxParameter(Value0, (void*)Axis_Serialize_ProductTerms, (void*)Axis_Delete_ProductTerms, cPrefixAndParamName0, Axis_URI_ProductTerms);
// ======================================================================
// Invoke web service, send/receive operation. Handle output parameters, if any.
// ======================================================================
if (AXIS_SUCCESS == m_pCall->sendAndReceive())
{
if(AXIS_SUCCESS == m_pCall->validateMessage("AssemblySearchResponse", "http://www.cat.com/ppd", false))
checkForExtraneousElements();
}
m_pCall->unInitialize();
return pReturn;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{ m_pCall->unInitialize(); throw; } ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://www.abc.com:8463/ICC/services/PiecePartServiceSOAP" );
if(pSoapFault)
{
const char *detail = pSoapFault->getSimpleFaultDetail();
bool deleteDetail=false;
if (NULL==detail || 0==strlen(detail))
{ detail=m_pCall->getFaultAsXMLString(); if (NULL==detail) detail=""; else deleteDetail=true; } OtherFaultException ofe(pSoapFault->getFaultcode(),
pSoapFault->getFaultstring(), pSoapFault->getFaultactor(),
detail, iExceptionCode);
if (deleteDetail && NULL!=detail)
Axis::AxisDelete( (void ) const_cast<char>(detail), XSD_STRING);
m_pCall->unInitialize();
delete pSoapFault;
throw ofe;
}
else
}
}