Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in Soap Response while implementing ws-security using Metro

 
somia razzaq
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
somia razzaq
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using Metro for implementation of WS-Security at server and client side.

Thanks
 
Manan Panchal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic