0 Replies Latest reply on Apr 6, 2015 7:08 PM by nataliec68488388

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

    nataliec68488388

      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