1 Reply Latest reply on Dec 1, 2014 4:52 AM by BKBK

    Coldfusion SOAP Exception Error Handling

    Niyaz Ahmad Imam Level 1

      Dear All Technology Expert's,

      I have a query related to Coldfusion SOAP services, that is most commonly asked in all the forum's but NONE of them has got answer.

      If there is NO solution so I think Adobe has to come up with some patches so developer can able to do some customization.

      I like to share with you all, in all other language ( PHP, JAVA, .NET etc) this option is available and you can customize the error.

       

       

      Ok let me again explain the very basic error:

       

       

      SOAP Request:

       

       

      <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

         <soapenv:Header/>

         <soapenv:Body>

          

         </soapenv:Body>

      </soapenv:Envelope>

       

       

      SOAP Response:

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

         <soapenv:Body>

            <soapenv:Fault>

               <faultcode>soapenv:Server.userException</faultcode>

               <faultstring>java.lang.Exception: Body not found.</faultstring>

               <detail>

                  <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.lang.Exception: Body not found.

        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)...</ns1:s tackTrace>

                  <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">Coldfusion Error</ns2:hostname>

               </detail>

            </soapenv:Fault>

         </soapenv:Body>

      </soapenv:Envelope>

       

       

      HOW we can customize the error, in all other languages you can simple customize the error like

       

       

      Other languages SOAP response:

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

         <soapenv:Body>

            <soapenv:Fault>

               <faultcode>BODY_NOT_FOUND</faultcode>

               <faultstring>Body is missing in your request</faultstring>

              

            </soapenv:Fault>

         </soapenv:Body>

      </soapenv:Envelope>

       

       

      But the same is NOT possible in Coldfusion, right?

       

       

      AS you know it is vulnerability to display exception messages in the response.

      We are developing this web service to access  from other language website (PHP, .NET).

       

       

      We are also planning to upgrade server the Coldfusion 11, but do you think there is any solution with latest Coldfusion version.

       

       

      Please response only if you know about these issue's or solution. 

       

       

      Thanks

      Niyaz