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 "Ghaznavi, Syed" <sy...@fmr.com> on 2007/09/06 22:22:11 UTC

Problem with Adding Namespace Declaration and Attribute

Hi,
I have been trying to resolve this problem for some time but have not
been able to get my code to work!! 

I a sample WSClient application that adds digital signatures to the
message.

Basically I am trying to add a namespace declaration in the SOAPBody
element using "addNamespaceDeclaration" method on the body element and
then add a new
Attribute associated with that namespace in the SOAPBody element.

I am using Axis 1.1 API for this.

SOAPBody body = sEnvelope.getBody();
Body.addNamespaceDeclaration("wsu",
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-util
ity-1.0.xsd");
body.addAttribute(sEnvelope.createName("Id","wsu" 
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-util
ity-1.0.xsd"), "Body");

But this above code doesn't add anything in the body, except,
<soapenv:Body Id="Body">

I was wondering if there is a Bug in Axis1.1 API that results in this
above behavior ?? 

When I tried using Axis 1.4 and my code seems to work, that is I get a
body element as follows...
<soapenv:Body wsu:Id="Body"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd</soapenv:Body>

What if any is the workaround this, using Axis1.1, because we are
restricted with using Axis1.1 API.

Thanks!

Frustrated Axis1.1 User

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Problem with Adding Namespace Declaration and Attribute

Posted by WJ Krpelan <kr...@yahoo.com>.
basically, axis 1.1 is hardly being used in
production.
are you referring to the jboss implementation?


--- "Ghaznavi, Syed" <sy...@fmr.com> wrote:

> 
> Hi,
> I have been trying to resolve this problem for some
> time but have not
> been able to get my code to work!! 
> 
> I a sample WSClient application that adds digital
> signatures to the
> message.
> 
> Basically I am trying to add a namespace declaration
> in the SOAPBody
> element using "addNamespaceDeclaration" method on
> the body element and
> then add a new
> Attribute associated with that namespace in the
> SOAPBody element.
> 
> I am using Axis 1.1 API for this.
> 
> SOAPBody body = sEnvelope.getBody();
> Body.addNamespaceDeclaration("wsu",
>
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-util
> ity-1.0.xsd");
> body.addAttribute(sEnvelope.createName("Id","wsu" 
>
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-util
> ity-1.0.xsd"), "Body");
> 
> But this above code doesn't add anything in the
> body, except,
> <soapenv:Body Id="Body">
> 
> I was wondering if there is a Bug in Axis1.1 API
> that results in this
> above behavior ?? 
> 
> When I tried using Axis 1.4 and my code seems to
> work, that is I get a
> body element as follows...
> <soapenv:Body wsu:Id="Body"
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> urity-utility-1.0.xsd</soapenv:Body>
> 
> What if any is the workaround this, using Axis1.1,
> because we are
> restricted with using Axis1.1 API.
> 
> Thanks!
> 
> Frustrated Axis1.1 User
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-dev-help@ws.apache.org
> 
> 



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org