Forum Discussion

finsterwalder's avatar
finsterwalder
Occasional Contributor
16 years ago

SoapUI has a problem with a namespace

Hi there,

I have a problem with SoapUI, where I currently think SoapUI is not working correctly.

When I send the following soap request (via the CXF-Framework) to a soapUiMock, SoapUi responds with an error:


 
     
someAddress

     
       
            text
       

     

 


Response:

Missing operation for soapAction [http://www.xyz.com/myurl/opName] and body element [{http://www.xyz.com/mynamespace}address] ...

SoapUI responds correctly, if I omit the namespace in the address-tag. So the following XML is what SoapUI expects:


 
     
someAddress

     
       
            text
       

     

 


When I let SoapUI generate a request from the WSDL, that is also what is generated.

Why is SoapUI thinking, that address doesn't have a namespace?

And here is the WSDL for all of that:



xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.xyz.com/mynamespace"
xmlns:envelope="http://www.xyz.com/othernamespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
name="myName"
targetNamespace="http://www.xyz.com/mynamespace">


xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.xyz.com/mynamespace"
xmlns:tns="http://www.xyz.com/mynamespace"
xmlns:envelope="http://www.xyz.com/othernamespace">






name="address"
element="tns:address" />

name="request"
element="envelope:someElement" />




name="response"
element="envelope:someOtherElement" />










name="myBinding"
type="tns:portName">

style="document"
transport="http://schemas.xmlsoap.org/soap/http" />


soapAction="http://www.xyz.com/myurl/opName" />











name="myName"
binding="tns:myBinding">

location="http://www.xyz.com/myurl" />


  • Hi!

    I think soapUI is confused by the WSDL since it defines the operation to be document style but also defines two message parts for the request (which is definitely not by the book), can you fix this so the WSDL either only has one message part in the request or uses an RPC-style operation instead?

    regards!

    /Ole
    eviware.com
  • finsterwalder's avatar
    finsterwalder
    Occasional Contributor
    I figured there might be something wrong with my wsdl, but I couldn't see what. Now it's obvious.
    Thank you!

    Sure I can fix that.