Skip to main content
Participant
May 2, 2007
Question

Web Service Reply

  • May 2, 2007
  • 2 replies
  • 4276 views
I am calling a web service with cfinvoke and I am trying to display the raw XML reply. If I just do a dump I only get the following output: org.tempuri.UserInfoListResult@b30ca4f5

I know I am getting a correct response because I can use the following code to get the data.

What I want is the RAW XML!
This topic has been closed for replies.

2 replies

Known Participant
December 1, 2014

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

            <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

BKBK
Community Expert
Community Expert
December 1, 2014

@Niyaz

You will gain little by asking the same question in multiple places in the forum. In fact, many might consider it annoying or even spam.

This question is being discussed in the thread that HaroonTyagi started. (Are you HaroonTyagi, by chance?) I will post an answer there shortly.

Inspiring
May 3, 2007
if the web service returns an XML 'string' then you have have to cast that string as XML. If you veiw source you'll probably see xml, but the page will only render values. so,

<cfset tempXML = XmlParse(users)>

<cfdump var=#tempXML#>
herteltAuthor
Participant
May 3, 2007
Thanks. Now it is telling me that content is not allowed in the prolog. I think it is sending back malformed XML...
Participating Frequently
December 15, 2009

I am having this same problem. I can only seem to get the Java Stub, but no returned (XML) information. Any ideas?