Skip to content

How to create SOAP 1.2 requests? #101

@t-arn

Description

@t-arn

I have a webservice which uses SOAP 1.2, but suds always creates a SOAP 1.1 message:

  • the namespace for the Envelope, Header and Body is for SOAP 1.1
  • in the SOAP Header, the WS-Addressing elements wsa:To and wsa:Action are missing
  • the Content-Type in the HTTP Header is for SOAP 1.1

Can I configure suds to create a SOAP 1.2 compliant message or is this feature missing?

The WSDL is here: https://wsg.isceco.admin.ch/Livestock/AnimalTracingWSDL/3

The generated XML is this (SOAP 1.1):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.admin.ch/xmlns/Services/evd/Livestock/AnimalTracing/1" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header/>
	<ns1:Body>
		<ns0:GetCodes>
			<ns0:p_ManufacturerKey xsi:nil="true"/>
			<ns0:p_LCID/>
			<ns0:p_Type xsi:nil="true"/>
		</ns0:GetCodes>
	</ns1:Body>
</SOAP-ENV:Envelope>

But the XML to be sent should be this (SOAP 1.2):

<SOAP-ENV:Envelope xmlns:ns1="http://www.admin.ch/xmlns/Services/evd/Livestock/AnimalTracing/1" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
	<SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
		<wsa:To>https://wsg.isceco.admin.ch/Livestock/AnimalTracing/3</wsa:To>
		<wsa:Action>http://www.admin.ch/xmlns/Services/evd/Livestock/AnimalTracing/1/AnimalTracingPortType/GetCodes</wsa:Action>
	</SOAP-ENV:Header>
	<SOAP-ENV:Body>
		<ns1:GetCodes>
			<ns1:p_ManufacturerKey/>
			<ns1:p_LCID/>
			<ns1:p_Type/>
		</ns1:GetCodes>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions