Forum Discussion

leefranke's avatar
leefranke
New Contributor
16 years ago

Put namespace on body of SOAP message

I'm sure that this probably a setting in soapUI that I have not been able to find since I am new to using the product.

The problem is that soapUI is putting the all namespace at the envelope level, while other applications (and the webservice itself) is expecting the namespace on the body.

soapUI version=soapui-3.0-dist-24-2009-08-09
Wsdl is attached


Here is the xml sent by another program:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SR_DLInsertOrUpdate_Input xmlns="http://www.test3.fujitsu.com/us/">
<AccountID>This</AccountID>
<TicketNumber>1-34080411</TicketNumber>
<Note>a new note</Note>
</SR_DLInsertOrUpdate_Input>
</soap:Body>
</soap:Envelope>


Here is the xml formed by soapUI
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:us="http://www.test3.fujitsu.com/us/">
  <soapenv:Header/>
  <soapenv:Body>
      <us:SR_DLInsertOrUpdate_Input>
        <us:AccountID>?</us:AccountID>
        <us:TicketNumber>?</us:TicketNumber>
        <us:Note>?</us:Note>
      </us:SR_DLInsertOrUpdate_Input>
  </soapenv:Body>
</soapenv:Envelope>

1 Reply

  • Hi,

    unfortunately there is no setting for this in soapUI (yet..), from a standards-point-of-view there is no difference between the two documents; if your server requires the namespace declaration to be on the body it would be better to fix the issue there..

    If that isn't an option look at the event handlers available in soapUI Pro, they can be used to modify an outgoing message as you need.

    regards!

    /Ole
    eviware.com