You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Rutger van Eerd - Vanboxtel BV <rv...@vanboxtel.nl> on 2009/02/17 14:56:26 UTC
How to modify the SOAP envelope
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?
- How can I make Axis2 define additional namespaces to the SOAP envelop
element?
Regards,
Rutger
Vanboxtel BV - Kerkstraat 14 - 5427 BC Boekel - KvK 16051676
Re: How to modify the SOAP envelope
Posted by makos <sz...@freemail.hu>.
Are you still looking for the answer or have you figured it out somehow? My
problem is the same, please tell the answer if you have!
--
View this message in context: http://old.nabble.com/How-to-modify-the-SOAP-envelope-tp22057868p28547041.html
Sent from the Axis - C++ - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org
Re: How to modify the SOAP envelope
Posted by Rutger van Eerd - Vanboxtel BV <rv...@vanboxtel.nl>.
> 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" <ma...@wso2.com>
To: "Apache AXIS C User List" <ax...@ws.apache.org>
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
Re: How to modify the SOAP envelope
Posted by Manjula Peiris <ma...@wso2.com>.
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
>