Set <parameter name="xml-declaration" insert="true"/> inside your http
transport_sender entry in the axis2.xml.
Thanks, this works.
I am not sure this can be done from an Axis2/c client. BTW, why you want
this ? Are you adding custom headers(more than one) which are defined in
a single namespace?
The message from the third party client has this:
<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">
The message from Axis2/C has this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
The message from the third party client works, so I want to define the xsd
and xsi namespaces in the Axis2/C message as well. How can I do this? Do I
need the operation client API for this? If so, where can I find
documentation/examples?
Regards,
Rutger
----- Original Message -----
From: "Manjula Peiris" <[email protected]>
To: "Apache AXIS C User List" <[email protected]>
Sent: Tuesday, February 17, 2009 5:04 PM
Subject: Re: How to modify the SOAP envelope
On Tue, 2009-02-17 at 14:56 +0100, Rutger van Eerd - Vanboxtel BV wrote:
Hello,
I am using Axis2/C 1.4 (actually WSF/C 1.3 which includes Axis2/C 1.4) to
send a SOAP 1.1 request, over HTTP, to a third-party SOAP server. The
server
returns a SOAP fault (E_FAIL, Unspecified error).
However when I use a third party SOAP client to send the message, the
SOAP
server does reply correctly.
I can see two differences between the Axis2 generated SOAP message and
the
third party client SOAP message.
- Axis2/C does not add an XML version preprocessing instruction before
the
SOAP enveloppe.
- The third party defines additional namespaces in the SOAP envelop
element.
I am using the service client API and I build the payload manually (using
axiom_element_create() and friends).
Questions.
- How can I make Axis2 add an XML version preprocessing instruction?
Set <parameter name="xml-declaration" insert="true"/> inside your http
transport_sender entry in the axis2.xml.
- How can I make Axis2 define additional namespaces to the SOAP envelop
element?
I am not sure this can be done from an Axis2/c client. BTW, why you want
this ? Are you adding custom headers(more than one) which are defined in
a single namespace?
Regards,
Rutger
Vanboxtel BV - Kerkstraat 14 - 5427 BC Boekel - KvK 16051676
Vanboxtel BV - Kerkstraat 14 - 5427 BC Boekel - KvK 16051676