File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Error in Soap Response while implementing ws-security using Metro Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error in Soap Response while implementing ws-security using Metro" Watch "Error in Soap Response while implementing ws-security using Metro" New topic
Author

Error in Soap Response while implementing ws-security using Metro

somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
Hi
I am trying to implement ws-security in web service using metro. I am succeeded to implement it in a simple web service but facing problems in contract-first web service. In a contract-first web service, my SOAP request message is ok, having information about authentication and encrypted soap body. But i am getting the following error in the soap response message. The client is a servlet based web service. Please help me how i resolve it.

INFO: Element not understood={http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
INFO: ---[HTTP response 500]---
INFO: <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:MustUnderstand</faultcode><faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring></S:Fault></S:Body></S:Envelope>

Thanks in advance
Regards
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
To determine whether the problem is your service or your client, I would recommend you trying to access the service using soapUI.
If soapUI is able to access the web service, then the problem is your client. If not, then there is something wrong with your service.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
Hi Ivan
I am trying to use soapUI to test my service. I am using netbeans 6.8. I have installed soapUI plugin. But i am getting the error of Test case failed. The snapshot of netbeans IDE with failed Test case is given in attached file. Is it mean i have some error at service side or some other fault ( e.g. related to configuration of soapUI in my IDE)? Please help me. As i am using soapUI plugin first time.

Thanks
Manan Panchal
Greenhorn

Joined: Nov 17, 2008
Posts: 24
How do you handle security at service side?
If you do security implementation in SOAPHandler than what do you write in getHeaders() method?
somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
Hi
I am using Metro for implementation of WS-Security at server and client side.

Thanks
Manan Panchal
Greenhorn

Joined: Nov 17, 2008
Posts: 24
I know you are using Metro.
But at which place do you authenticate the incoming request?
Do you have any SOAPHandler for that purpose?
If yes then you have to write the code in getHeaders() of SOAPHandler.


If no and you are using some other techniques then I am sorry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in Soap Response while implementing ws-security using Metro