Change web service soap response from 1.1 to 1.2

Moderator: crythias

Locked
wolf97084
Znuny newbie
Posts: 26
Joined: 10 Feb 2015, 22:37
Znuny Version: 4.0.1

Change web service soap response from 1.1 to 1.2

Post by wolf97084 »

I have OTRS 4 appliance.

I am using Java 1.7 to consume the web service. I am able to generate ticket successfully, with response like this,

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
			   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
			   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"   
			   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
			   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<soap:Body>
		<TicketCreateResponse xmlns="http://www.otrs.org/TicketConnector/">
			<ArticleID>103</ArticleID>
			<TicketID>41</TicketID>
			<TicketNumber>201502277600021</TicketNumber>
		</TicketCreateResponse>
	</soap:Body>
</soap:Envelope>
However, when I tried to read the SOAP message, Java will return error "SEVERE: SAAJ0415: InputStream does not represent a valid SOAP 1.2 Message"

After close look at the message, I figured out that this SOAP response message from OTRS is using SOAP1.1 (xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"). Is there any where to set SOAP as 1.2 instead?

Thank you!
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Change web service soap response from 1.1 to 1.2

Post by jojo »

OTRS will response in with the same version as the request (see fixed bug http://bugs.otrs.org/show_bug.cgi?id=10812)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
wolf97084
Znuny newbie
Posts: 26
Joined: 10 Feb 2015, 22:37
Znuny Version: 4.0.1

Re: Change web service soap response from 1.1 to 1.2

Post by wolf97084 »

In my webservice:GenericTicketConnectorSOAP:TicketCreate, how should I set "Mapping for outgoing response data", as Simple or nothing?

Or it does not matter at all?

Thank you.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Change web service soap response from 1.1 to 1.2

Post by jojo »

mapping is for data, so no effect here
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
wolf97084
Znuny newbie
Posts: 26
Joined: 10 Feb 2015, 22:37
Znuny Version: 4.0.1

Re: Change web service soap response from 1.1 to 1.2

Post by wolf97084 »

Thank you, Jojo.

I found out what cause the error. I did not setup SOAP protocol when I send the request. After I set the SOAP protocol in the request to 1.2, I can now read the soap response message.

Thanks again.
leesguer
Znuny newbie
Posts: 1
Joined: 15 Feb 2016, 16:52
Znuny Version: 4.1300
Real Name: Leonardo Esguerra

Re: Change web service soap response from 1.1 to 1.2

Post by leesguer »

Hi wolf97084, I have the same message error - SAAJ0415: . Can you help me showing how setup SOAP protocol in request ?

Thanks
Locked