• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ColdFusion 10 calling .net webservice - Error 415: Cannot process the message .... need help

New Here ,
Apr 06, 2015 Apr 06, 2015

Copy link to clipboard

Copied

I am working on calling web service from Cold Fusion 10 and ran into the following error:

415 Cannot process the message because the content type 'application/soap+xml;charset=UTF-8;action=http://webservices.host.com/API/2012/10/SchemaService/GetSchemaBySystemName' was not the expected type 'multipart/related; type="application/xop+xml"'.

I was able to run the same call using SOAP UI. Below is the code related to this call in ColdFusion:

------------------------

<cfhttp url="https://[hostname.com]/API/SchemaService?wsdl" method="post" result="httpResponse">

     

       <cfhttpparam type="header" name="content-type" value="application/soap+xml;charset=UTF-8;action=http://webservices.host.com/API/2012/10/SchemaService/GetSchemaBySystemName">

        <cfhttpparam type="header" name="Action" value="Apache-HttpClient/4.1.1 (java 1.5)" >

       

        <cfhttpparam type="header" name="x-Ignore-RewriteRule-Force-SSL" value="true" >

        <cfhttpparam type="header" name="Connection" value="keep-alive" >

      <!---  <cfhttpparam type="header" name="accept-encoding" value="no-compression">  --->

        <cfhttpparam type="header" name="accept-encoding" value="deflate;q=0">

        <cfhttpparam type="header" name="TE" value="deflate;q=0">

        <cfhttpparam type="header" name="content-length" value="#len(request_xml)#">

        <cfhttpparam type="header" name="mimetype" value="application/xop+xml, text/xml, application/soap+xml" >

        <cfhttpparam type="header" name="charset" value="UTF-8">

        <cfhttpparam type="xml" name="message" value="#len(trim(request_xml))#">

    </cfhttp>

-----------------------

It seems that we are able to login to the remote server (soap header contains the soap security for login using username and password), the method call is the point this error occurred.

Please help if you can.

Thanks in advance.

Natalie

Views

345

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation