You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Jörg Eichhorn <ei...@ponton-consulting.de> on 2006/03/24 15:08:40 UTC

[Axis2] Additional namespace definition is added to the SOAPEnvelope when loading an existing soapmessage using SAAJ

Hello,

i am trying to load a soap message which was created using a different 
namespace prefix for the soapenvelope than Axis2 does.
The default prefix in Axis2 is 'soapenv' - my soapmessge uses the prefix 
  'SOAP-ENV'.
When loading the message by with:
   MessageFactory factory = MessageFactory.newInstance();
   SOAPMessage msg = factory.createMessage(headers, in);

it will internally create a new instance of the class 
org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl by using the constructor:
  public SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder,
                          SOAPFactory factory)

In this constructor it calls the parent constructor with the new 
namespace definition using the default prefix. When the to be loaded 
soap message uses a different prefix, this will result into two xmlns 
definitions with the soap envelope namespace url when writing the 
message out again.

A possible solution could be just don't create a the new namespace in 
the class SOAPEnvelopeImpl.

Hopefully this can be fixed before Axis2 1.0

Regards,
Jörg Eichhorn


Re: [Axis2] Additional namespace definition is added to the SOAPEnvelope when loading an existing soapmessage using SAAJ

Posted by Davanum Srinivas <da...@gmail.com>.
Jörg,

Can u please log a bug report in JIRA?

thanks,
dims

On 3/24/06, Jörg Eichhorn <ei...@ponton-consulting.de> wrote:
> Hello,
>
> i am trying to load a soap message which was created using a different
> namespace prefix for the soapenvelope than Axis2 does.
> The default prefix in Axis2 is 'soapenv' - my soapmessge uses the prefix
>   'SOAP-ENV'.
> When loading the message by with:
>    MessageFactory factory = MessageFactory.newInstance();
>    SOAPMessage msg = factory.createMessage(headers, in);
>
> it will internally create a new instance of the class
> org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl by using the constructor:
>   public SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder,
>                           SOAPFactory factory)
>
> In this constructor it calls the parent constructor with the new
> namespace definition using the default prefix. When the to be loaded
> soap message uses a different prefix, this will result into two xmlns
> definitions with the soap envelope namespace url when writing the
> message out again.
>
> A possible solution could be just don't create a the new namespace in
> the class SOAPEnvelopeImpl.
>
> Hopefully this can be fixed before Axis2 1.0
>
> Regards,
> Jörg Eichhorn
>
>


--
Davanum Srinivas : http://wso2.com/blogs/