Forum Discussion

Garry's avatar
Garry
Occasional Contributor
11 years ago

How to use default namespace instead of prefix

Hi,

is there a way in SoapUI to controll how namespace prefixes are used when SoapUI creates web service (SOAP) request?
Below is example of how SoapUI generates sample request:

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://mycompany.com/project/2012-05-29">
<soapenv:Header/>
<soapenv:Body>
<ns:[/b]FaresInformationRequest>
<ns:Origin>
<ns:Crs>XYZ<ns:Crs>
</ns:Origin>
</ns:FaresInformationRequest>
</soapenv:Body>
</soapenv:Envelope>


Notice the namespace with the prefix ns. What I'd like to have is default namespace used instead:


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://mycompany.com/project/2012-05-29">
<soapenv:Header/>
<soapenv:Body>
<FaresInformationRequest>
<Origin>
<Crs>XYZ</Crs>
</Origin>
</FaresInformationRequest>
</soapenv:Body>
</soapenv:Envelope>


Is it possible for SoapUI to make the namespace default so that ns prefix will disappear from all the subsequent elements? How this can be achieved?
Thanks

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    There is no option in SoapUI Pro to disable the creating of the prefixes when generating a request. You can manually change the request, and change the default request editor to Source. Doing that when reopening and closing the editor your changes will be saved. To change the default editor to Source, go to File -> Preferences -> SoapUI Pro and change Default Request Editor to Source.



    Regards,
    Marcus
    SmartBear Support