SoapUI giving error as Malformed Request when Request is valid

Here is a snippet of xml generated by my .net code that is sent to a third party soap service endpoint.

<?xml version="1.0" encoding="utf-16"?>
    <vnsState_request xmlns="">

This works thru code but when I put the exact same request that I pulled out from my debug breakpoint in SoapUI and send it to the same service it returns with XML malformed error as below

<faultstring>Malformed SOAP message</faultstring>

When I generate a sample request for the same operation I see this difference in the generated request XML

<soapenv:Envelope xmlns:soapenv="" xmlns:vns="">

Why does SoapUI require those extra tags and why can't it use the request generated by my .Net code? And why does it require vns: pre-pended to every element along with those new elements?

<soapenv:Envelope >

1 answer

  • answered 2018-01-11 22:39 Rao

    1. Regarding Extra Tags: If you are hitting a SOAP service from any client, SOAP headers are required. You may find more details here.
    2. Regarding Prefix: It is not required if the default namespace is used which is in you .net case. Where as in the SoapUI, it is using explicit namespace, hence the prefix is used. You can find more details regarding the namespace here.

    For instance, taking your example. Below both are same.

    <vnsState_request xmlns="">
    <!--the above one is using default namespace -->


    <ns:vnsState_request xmlns:ns="">
    <!--using explicit namespace "ns", hence the same is prefixed for the tag -->

    And if you take a look at the one in SoapUI, it has added namespace in the first line itself. So, it using as you have shown.

    Hope this helps.