[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Help Me with HTTPAPI SOAP1.2



I found the best "luck" doing what they ask and then making changes as needed to make it work.

From this page:
http://www.webservicex.net/currencyconvertor.asmx?op=ConversionRate

There is an example 1.2 shown. It looks like you found that page and started to make changes. Why did you change the encoding line when the service clearly calls for encoding="utf-8"? Utf-8 being the correct encoding for SOAP1.2 but very importantly, that is what the web service expects. Remember that the SOAP message does not dictate how the data is sent - only what it says.

The [1] [2] do not belong in the SOAP message but then you didn't follow the example there either. Follow what you see on the screen - line for line, character for character.

Make the content type in the POST correct by using the content-type shown in the example.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Raddatz
Sent: Wednesday, October 02, 2013 12:23 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Help Me with HTTPAPI SOAP1.2

Kevin,

For SOAP 1.2 you need to add the SOAP action to the content type header 
like this:

    contentType = 'application/soap+xml;action="' +
                  'your.soap.action.value' +
                  '"';

The SOAP action header must be sent as a blank header.

Sorry, I am in a hurry and cannot not go deeper into details, now.

Thomas.

Am 02.10.2013 18:43, schrieb Kevin Eduardo Fúnez Fúnez:
>     Hello, I want to consume the following web service with Soap1.2
>
>     SOAP =
>      '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
>     +'<SOAP12:Envelope'
>     +'    xmlns:SOAP12="[1]http://schemas.xmlsoap.org/soap/envelope/";'
>     +'    xmlns:tns="[2]http://www.webserviceX.NET/";>'
>     +'<SOAP12:Body>'
>     +'  <tns:ConversionRate>'
>     +'      <tns:FromCurrency>'+ %trim(Country1) +'</tns:FromCurrency>'
>     +'      <tns:ToCurrency>'+ %trim(Country2) + '</tns:ToCurrency>'
>     +'  </tns:ConversionRate>'
>     +'</SOAP12:Body>'
>     +'</SOAP12:Envelope>';
>     rc = http_url_post_xml(
>                'http://www.werservicex.net/CurrencyConvertor.asmx'
>                       : %addr(SOAP) + 2
>                       : %len(SOAP)
>                       : *NULL
>                       : %paddr(Incoming)
>                       : %addr(rate)
>                       : HTTP_TIMEOUT
>                       : HTTP_USERAGENT
>                       : 'application/soap+xml');
>       //              : 'http://www.webserviceX.NET/ConversionRate');
>
>     When I run it gives this error.
>
>     HTTP/1.1 415 Unsupported Media Type
>
>
>     I hope you can help me to consume Soap1.2 from advance thank you very
>     much.
>
> References
>
>     1. http://schemas.xmlsoap.org/soap/envelope/%22'
>     2. http://www.webservicex.net/%22%3E'
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------