You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by bh...@rsa.com on 2009/01/27 13:14:47 UTC

Error while trying to add a DOM element directly under the SoapBody

> Hi,
> 
> I am trying to create an axis2 JAX-WS dispatch client with
> Service.Mode.MESSAGE. I am getting the following error while trying to
> construct the SOAPBody. Could someone please explain a proper way to
> add a valid org.w3c.dom.Element directly under the SoapBody.
> 
> Code snippet:
>      SOAPFactory sf = SOAPFactory.newInstance();
> //     no option to add an element, hence passing a document. 
>      body.addDocument(validw3cDocument);
> 
> Exception in thread "main" java.lang.IllegalArgumentException:
> Namespace URI may not be null
> 	at
> org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
> 2)
> 	at
> org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
> 8)
> 	at
> org.apache.axis2.saaj.SOAPBodyImpl.toSAAJNode(SOAPBodyImpl.java:424)
> 	at
> org.apache.axis2.saaj.SOAPBodyImpl.addDocument(SOAPBodyImpl.java:303)
> 
> Regards,
> Bharath

RE: Error while trying to add a DOM element directly under the SoapBody

Posted by bh...@rsa.com.
I am using Axis2 1.4.1.

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: Tuesday, January 27, 2009 11:49 PM
To: axis-user@ws.apache.org
Cc: Krishnappa, Bharath
Subject: Re: Error while trying to add a DOM element directly under the
SoapBody

This issue has been reported as AXIS2-2773 [1] and should have been
fixed for Axis2 1.3. What version do you use?

Andreas

[1] https://issues.apache.org/jira/browse/AXIS2-2773

On Tue, Jan 27, 2009 at 13:14,  <bh...@rsa.com> wrote:
>> Hi,
>>
>> I am trying to create an axis2 JAX-WS dispatch client with
>> Service.Mode.MESSAGE. I am getting the following error while trying
to
>> construct the SOAPBody. Could someone please explain a proper way to
>> add a valid org.w3c.dom.Element directly under the SoapBody.
>>
>> Code snippet:
>>      SOAPFactory sf = SOAPFactory.newInstance();
>> //     no option to add an element, hence passing a document.
>>      body.addDocument(validw3cDocument);
>>
>> Exception in thread "main" java.lang.IllegalArgumentException:
>> Namespace URI may not be null
>>       at
>>
org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
>> 2)
>>       at
>>
org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
>> 8)
>>       at
>> org.apache.axis2.saaj.SOAPBodyImpl.toSAAJNode(SOAPBodyImpl.java:424)
>>       at
>> org.apache.axis2.saaj.SOAPBodyImpl.addDocument(SOAPBodyImpl.java:303)
>>
>> Regards,
>> Bharath
>


Re: Error while trying to add a DOM element directly under the SoapBody

Posted by Andreas Veithen <an...@gmail.com>.
This issue has been reported as AXIS2-2773 [1] and should have been
fixed for Axis2 1.3. What version do you use?

Andreas

[1] https://issues.apache.org/jira/browse/AXIS2-2773

On Tue, Jan 27, 2009 at 13:14,  <bh...@rsa.com> wrote:
>> Hi,
>>
>> I am trying to create an axis2 JAX-WS dispatch client with
>> Service.Mode.MESSAGE. I am getting the following error while trying to
>> construct the SOAPBody. Could someone please explain a proper way to
>> add a valid org.w3c.dom.Element directly under the SoapBody.
>>
>> Code snippet:
>>      SOAPFactory sf = SOAPFactory.newInstance();
>> //     no option to add an element, hence passing a document.
>>      body.addDocument(validw3cDocument);
>>
>> Exception in thread "main" java.lang.IllegalArgumentException:
>> Namespace URI may not be null
>>       at
>> org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
>> 2)
>>       at
>> org.apache.axiom.om.impl.dom.NamespaceImpl.<init>(NamespaceImpl.java:3
>> 8)
>>       at
>> org.apache.axis2.saaj.SOAPBodyImpl.toSAAJNode(SOAPBodyImpl.java:424)
>>       at
>> org.apache.axis2.saaj.SOAPBodyImpl.addDocument(SOAPBodyImpl.java:303)
>>
>> Regards,
>> Bharath
>