It's not a secret anymore!*
The moose likes Web Services and the fly likes Error: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s" Watch "Error: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s" New topic
Author

Error: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s

Vishnu Austin
Greenhorn

Joined: Mar 30, 2012
Posts: 11
I am writing a Java client(using JAX-WS and SAAJ) to consume a WCF web service. Tested the SOAP xml request that is being sent(outbound) and it works as expected on SOAPUI.

I am getting the following error,
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood
at com.sun.xml.internal.ws.protocol.soap.MUTube.createMUSOAPFaultException(MUTube.java:140)
at com.sun.xml.internal.ws.protocol.soap.ClientMUTube.processResponse(ClientMUTube.java:82)

Appreciate any help in letting me know how to fix it.

Below is the SOAP input created. Tested the SOAP request in SOAPUI and it works fine.



The handler code is below


Thanks in advance.
Vishnu Austin
Greenhorn

Joined: Mar 30, 2012
Posts: 11
I got it fixed. I had to add to fill the following code for the method getHeaders()



Siitesh Hind
Ranch Hand

Joined: Sep 06, 2012
Posts: 51
Hello Vishnu,

Do you have the code that will create the web service in Java that has the SOAP Header?

Not referring to the client code.

Rgds,

Seetesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s
 
Similar Threads
Custom UsernameToken?
HeaderElements must be namespace qualified when create soap client
Basic authentication soap header values?
Java Client for a SOAP wsdl with basic authentication
WSSecurity headers programmatically