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 Franz Fehringer <fe...@isogmbh.de> on 2006/10/18 11:36:55 UTC

setSOAPMethodAttribute

Hello,

I want to use Call:setSOAPMethodAttribute() to set (XML) attributes at 
the highest level of my web service call.
The relevant code snippet is

ppt->getCall()->setTransportProperty(SOAPACTION_HEADER , "#SearchRooms");
ppt->getCall()->setSOAPMethodAttribute("returnAllocationRemaining", 
"ns1", "true");   // <-- critical line
ppt->SearchRooms(strAgreement.get(), strSelection.get(), 0, 0, 0, 
strStay.get(), strRooms.get(), true_, false_, true_, false_, "ROOM", 
ppstrWarningArray, ppstrRoomResult);

Unfortunately this yields a segmentation fault due to the following reason:

In the course of Call:setSOAPMethodAttribute() the class Call member 
m_pIWSSZ is accessed.
But this member (as well as m_pIWSDZ) is not (never?) initialized and 
voila crash.
If i look at the Stub constructor (ppt is of type PegsPortType which is 
derived from Stub) i see

m_pCall = new Call ();
m_pCall->setProtocol (eProtocol);

What i wonder now is if between this two lines the additional line

m_pCall->initialize(); // contains code to initialize m_pIWSSZ and m_pIWSDZ)

should perhaps be applied?

Note that the (generated from WSDL/XSD) call
ppt->SearchRooms(strAgreement.get(), strSelection.get(), 0, 0, 0, 
strStay.get(), strRooms.get(), true_, false_, true_, false_, "ROOM", 
ppstrWarningArray, ppstrRoomResult);
contains function call parameters for attributes like 
"returnAllocationRemaining", but they are not used in the function body 
(i have already filed a JIRA for this omission).

Comments?

Best regards

Franz