I am trying to create a Axis Message ( or SOAP Message ) with multiple
envelopes.
Is there any option that have to enable for processing of multiple
envelopes?
As from the link
http://lists.w3.org/Archives/Public/xml-dist-app/2002Jul/0206.html , I
came to know that axis supports multiple envelope .
But not getting any clue as how to proceed.
I tried creating message with .xml file
Client code:
FileInputStream preppedMsgSrc = new FileInputStream("message.xml");
Message message = new Message(preppedMsgSrc,false);
message.writeTo(System.out);
call.invoke(message);
Where message.xml
<?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>
<ns1:function2
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
xmlns:ns1="multipleEnvelope.Service"/>
</soapenv:Body>
</soapenv:Envelope>
<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>
<ns1:function1
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
xmlns:ns1="multipleEnvelope.Service"/>
</soapenv:Body>
</soapenv:Envelope>
But the constructed message contains only the first envelope .
message.writeTo(System.out); prints
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
s:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSc
hema-instance">
<soapenv:Body>
<ns1:function2
soapenv:encodingStyle="http://schemas.xmlsoap.org
/soap/encoding/" xmlns:ns1="multipleEnvelope.Service"/>
</soapenv:Body>
</soapenv:Envelope>
I want both the messages to be there in constructed message . again
not sure whether all the envelopes in the request will be processed at
server or not on invoking with
call. invoke(message);
Please kindly help me in this regard.
Thanking you ,
Pratima