In Axis 1.x, you can try using the Call interface passing it an array of
org.apache.axis.message.SOAPBodyElement as parameter. I believe this
should generate the message that you require (multiple elements as
children of SOAP Body). Of course you will have to manually create the
message yourself as DOM Elements. Note that even though the SOAP/WSDL
specs allow this, it is disallowed in the WS-I Basic profile.
Something like this might work:
Call call = ....
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
org.w3c.dom.Element[] elements = ....
SOAPBodyElement[] soapBodyElements = new
SOAPBodyElement[elements.length];
for(int j=0; j < elements.length; j++){
soapBodyElements[j] = new SOAPBodyElement(elements[j]);
}
Vector ret = (Vector)call.invoke(soapBodyElements); //returns a Vector
of SOAPBodyElement.
- Junaid
-----Original Message-----
From: Javier Kohen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 8:16 PM
To: [email protected]
Subject: Messages with many parts
I'm trying to write the WSDL for an already existing web service that
requires including two elements as children of the Body element. The web
service uses SOAP and expects the request's body in the form
<soap:Body><ElementA xmlns="mynamespace">content</ElementA><ElementB
xmlns="mynamespace">content</ElementB></soap:Body>
As I'm using Axis on the client side, I'd like to know what
Axis-compatible construction I can use to generate the above message.
I have tried many options with Axis 1.4 and Axis2 1.1, to no avail. The
best I could achieve was to have both elements inside a wrapper element,
but the web service rejects that. I'd like to start moving my codebase
to Axis2 now that 1.1 seems to be able to handle my other WDSLs
correctly, but I'm still using Axis 1.4 at the moment, so either is fine
with me.
In case you were wondering the server is using .Net and there's no way I
can have them change the definition. The WSDL itself is simply not
available, so I can't work from there either.
Thanks in advance,
--
Javier Kohen <[EMAIL PROTECTED]>
ICQ: blashyrkh #2361802
Jabber: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]