You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "nadir amra (JIRA)" <ax...@ws.apache.org> on 2011/05/13 23:46:47 UTC

[jira] [Commented] (AXISCPP-1080) The generated codes does not create the correct SOAPRequest.

    [ https://issues.apache.org/jira/browse/AXISCPP-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033325#comment-13033325 ] 

nadir amra commented on AXISCPP-1080:
-------------------------------------

It does not appear you are using latest code from SVN.  Please build using latest code from SVN and see if problem persists.

I know that code is not latest because one thing we no longer do a check as follows:

if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
      m_pCall->setTransportProperty(SOAPACTION_HEADER , ""); 

We currently always set it. 

> The generated codes does not create the correct SOAPRequest.
> ------------------------------------------------------------
>
>                 Key: AXISCPP-1080
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1080
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions:  1.6 Beta
>         Environment: 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) 
>            Reporter: Vaidhy Kumar
>         Attachments: PiecePartServiceSOAP_Issue.xml
>
>
> 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 &apos;ProductTerms&apos;</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))
> 			{
> 				pReturn = (ProductTermsArray*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_ProductTermsArray, (void*) Axis_Create_ProductTermsArray, (void*) Axis_Delete_ProductTermsArray,"ProductTermsArray", 0);
> 			}
> 			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
> 		{
> 			m_pCall->unInitialize();
> 			delete pSoapFault;
> 			throw;
> 		}
> 	}
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org