If same ISOAPAttachment object is passed as arguments to a service, Axis Engine
creates an invalid SOAP Message
---------------------------------------------------------------------------------------------------------------
Key: AXISCPP-737
URL: http://issues.apache.org/jira/browse/AXISCPP-737
Project: Axis-C++
Type: Bug
Components: Client - API
Reporter: James Jose
ISoapAttachment *att1=ws.createSoapAttachment();
ISoapAttachment *att2=ws.createSoapAttachment();
char *text="This is a test message for attachment";
xsd__base64Binary b64b1;
b64b1.__ptr = (xsd__unsignedByte*)text;
b64b1.__size = strlen(text);
att1->addBody(&b64b1);
att2->addBody(&b64b1);
//Calling webservice with multiple attachments. Here same object is passed as
arguments
xsd__string_Array ret=ws.multiAttachment(att1,att1,att2,att1);
SOAP Message generated for the above code is invalid.
<ns1:arg_0_0 href="cid:1"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
<ns1:arg_1_0 href="cid:1"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
<ns1:arg_2_0 href="cid:5"
xsi:type="ns2:Image"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
<ns1:arg_3_0 href="cid:1"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"
xsi:type="ns2:DataHandler"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
</ns1:multiAttachment>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here in each element for argument,
xmlns:ns2="http://xml.apache.org/xml-soap"(Namespace declaration) occurs three
times. ie If the same object of ISOAPAttachment is passed 'n' times as
argument, then the resulted SOAP message contains namespace declaration 'n'
times.
Testcase 'AttMultiSameAttachment ' adress this issue..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira