mebada
mebada

Reputation: 2378

Required element did not contain a wsu:id?

I am new to soapUI 3.5. I tried some wsdl that acquire security against web service deployed on jboss 4.2.1

while running test on soapUI . It gives me

     <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
     <env:Header/>
     <env:Body>
     <env:Fault>
     <faultcode>env:Server</faultcode>
     <faultstring>org.jboss.ws.core.CommonSOAPFaultException: Required element did not contain a wsu:id.</faultstring>
     </env:Fault>
     </env:Body>
      </env:Envelope>

Any suggestions ?

Thanks in advance

Upvotes: 0

Views: 2091

Answers (3)

talawahtech
talawahtech

Reputation: 630

I had the same problem. I found the solution over in the JBoss Forum

JBoss WS clients generate a wsu:Id attribute in the element, which SoapUI will not insert automatically. Here is what my default SoapUI request looks like (view/edit using the XML tab):

<soapenv:Header/>
  <soapenv:Body>
    <ser:getCutOffTime/>
  </soapenv:Body>

You can use SoapUI if you include a 'dummy' wsu:Id in the Body of your request. Be sure to include the namespace:

<soapenv:Header/>
  <soapenv:Body wsu:Id="element-1-1272320911598-1522000" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <ser:getCutOffTime/>
  </soapenv:Body>

This solved the problem for me. I was using JBoss 5.0.

Upvotes: 1

Chris Thornton
Chris Thornton

Reputation: 15817

The server that you ran against didn't like your request. Probably because SoapUI built the sample using ? as placeholders, or perhaps "lorem ipsum" values. Replace those with valid data, and it should go through.

If you have an app that can already talk to this server, you can usually copy/paste those requests into SoapUI.

Also, if you aren't able to capture those sample requests, run Fiddler on a PC, and it'll act as a proxy, and then it'll give you an easy way to capture sample payloads. SoapUI can do it too, but Fiddler makes it really easy (auto-configures your WinInet to use itself as a proxy).

Upvotes: 0

rook
rook

Reputation: 67039

I don't believe this is a security exception. I believe your WSDL is malformed or otherwise incompatible with the soapUI testing tool. Its likely that other testing tools or client libraries will also throw exceptions. Was this WSDL auto-generated? It should have been...

Upvotes: 0

Related Questions