Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to create proper SOAP message

 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to add an attribute to the soap body in the following way:

Name bodyAttribute = requestMessage.getSOAPPart().getEnvelope().createName("Id", "wsu", "http://docs.oasis-open-arg/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
requestBody.addAttribute(bodyAttribute,"Body");

However the result is not as expected.

Expected result:
<soap-env:Body wsu:Id="Body" >

Current Result:
<soap-env:Body ns12373232:Id="Body">

Why is the value of the prefix changing?
Can anyone help me resolve this problem?

Thanks in advance,
Anup
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic