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

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
-----------------------------------------------------------------------