views:

735

answers:

1

I am invoking a webservice form my .net web application a getting the following com.ibm.wsspi.wssecurity.SoapSecurityException on invocation.

WSEC5048E: One of "SOAP Header" elements required.

The SOAP request seems to be valid so I guess the problem is something to do with the webservice using WS-Securty. I had to install a certificate into my Root certification authority store.

It might be easier to diagnose if I could view the soap request .Net has wrapped but I cant work out how to do this without sniffing the packets.

+2  A: 

It appears that either your request doesn't have the WS-* headers, headers are not for the right WS-* versions (i.e., client/server mistmatch), OR the error is actually on the RESPONSE (i.e., the service didn't send back WS-* headers).

I'm assuming you had to install the cert into your CA store because you're sending an x.509 BST which is signed by a test CA? If so, it is this point that leads me to believe your service is processing the request but the error is on the response?

I often use netcat to see a request sent to a listener. Here's a blog posting I did on how to do this: http://dustinbreese.blogspot.com/2008/09/debugging-with-netcat.html This really only works though, if your request is NOT sent over TLS.

Dustin