Document literal SOAP message

I need to call a webservice, and the provided WSDL uses document literal mode, and I’m struggling to implement this correctly. The documentation1 for xsoDocument says:

During importing with the Service Builder the “Enable Special Handling for .NET wrapped parameters” options has to be set.

However I cannot find this option in the Service Builder (v9.6.113), and searches has not turned up anything useful. I’ve added a single parameter and result parameter of type XML but the generated SOAP message wraps the supplied XML in the parameter name, which is not what I want. Here’s what I want to end up with, structure-wise:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="">
        <!-- status data here -->

Here’s what I end up with currently:

<SOAP-ENV:Envelope xmlns:xsd="" xmlns:xsi="" xmlns:HNS="" xmlns:SOAP-ENV="">
  <SOAP-ENV:Body xmlns:ro="">
    <v1:Status xmlns:v1="">
        <Status xmlns:xsi="" xsi:noNamespaceSchemaLocation="XML_Status.xsd">
          <!-- status data here -->

Here’s the WSDL, I changed some namespaces but otherwise verbatim:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="" 
xmlns:xs="" name="GoodsNumber" 
		<xs:schema elementFormDefault="qualified">
			<xs:import schemaLocation="XML_Status.xsd"/>
        	<xs:element name="InboundInterface___GoodsNumberResponse"/>				
	<wsdl:message name="InboundInterface___GoodsNumber">
		<wsdl:part name="parameters" element="Status"/>
	<wsdl:message name="InboundInterface___GoodsNumberResponse">
		<wsdl:part name="parameters" element="InboundInterface___GoodsNumberResponse"/>
	<wsdl:portType name="InboundInterface">
		<wsdl:operation name="GoodsNumberResponse">
			<wsdl:input message="tns:InboundInterface___GoodsNumber"/>
			<wsdl:output message="tns:InboundInterface___GoodsNumberResponse"/>
	<wsdl:binding name="InboundInterfaceBinding" type="tns:InboundInterface">
		<soap:binding transport=""/>
		<wsdl:operation name="GoodsNumberResponse">
			<soap:operation soapAction="" style="document"/>
				<soap:body use="literal"/>
				<soap:body use="literal"/>
	<wsdl:service name="InboundInterface">
		<wsdl:port name="InboundInterfacePort" binding="tns:InboundInterfaceBinding">
			<soap:address location="http://localhost:8099/SOAP?service=InboundInterface"/>

In the Service Builder I used the WSDL importer which gave me the operation with a single parameter named parameters, which I set to type Xml, no attributes.

Any tips?


this documentation is a bit outdated. nowadays we are using .NET based wsdl importer and Enable Special Handling for .NET wrapped parameters option is set by default.

I’ve tried to import attached WSDL and it seems to be imcomplete.
can you send original WSDL, and correct request to support@ for keeping privacy, pls?
you can replace endpoint location of your service with localhost

Ah, I’m not familiar enough with SOAP to know what’s missing. SoapUI did not complain and seemed to be able to generate a test message without apparent issues.

Mail sent.

The issue turned out to be that the XSD import statement was missing a namespace declaration.

<xs:import schemaLocation="XML_Status.xsd"/>
should have been
<xs:import namespace="" schemaLocation="XML_Status.xsd"/>

After that change, the service builder generated the correct code.