Copy link to clipboard
Copied
The web service is written to return:
<?xml version="1.0" encoding="utf-8"?>
<UserContactInfo xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns=http://tempuri.org/>
<Firstname>Nelson</Firstname>
<Lastname>Broat</Lastname>
</UserContactInfo>
But somehow Cold Fusion 9 is seeing it as
XMLData is org.tempuri.UserContactInfo@16259b42
which must be why we have the prolog error.
<cfinvoke webservice=http://ouripaddress/folder/servicename.asmx?WSDL method="GetUserBio" returnvariable="XMLData" refreshwsdl="true">
<cfinvokeargument name="uuid" value="#authuser#"/>
</cfinvoke>
<cfdump var="XMLData is #XMLData# output="console" />
<cfset trimXMLdata = trim(XMLData) />
<cfset tmpXML = XMLParse(trimXMLData) />
This webservice was written in .net and runs off a 64-bit computer running Windows 2008 Server R2
Is there something special we need to do here? The above value of XMLData looks like some sort of array pointer or something.
Any and all help and advice is appreciated. Thanks.
Nelson
Copy link to clipboard
Copied
During parsing the XML String use following code, it may solve your issue:
<cfset tmpXML = XmlParse( REReplace( trim(XMLData), "^[^<]*", "", "all" ) ) />
For more details about the issue and solution. Please follow this URL: http://www.bennadel.com/blog/1206-Content-Is-Not-Allowed-In-Prolog-ColdFusion-XML-And-The-Byte-Order...
Copy link to clipboard
Copied
Thanks.
I now have:
11/06 09:47:29 Information [jrpp-1] - Starting Web service request.
11/06 09:47:29 Information [jrpp-1] - Creating Web service proxy {url='http://ipaddremovedforsecurity/folder/program.asmx?WSDL'}
11/06 09:47:53 Information [jrpp-1] - Web service request completed {Time taken=24227 ms}
XMLData is xxx.yyy.zzz.services.UserContactInfo@ddc2fd04
[Fatal Error] :-1:-1: Premature end of file.
For ...
<cfdump var="XMLData is #XMLData#" output="console" />
<cfset tmpXML = XMLParse ( REReplace( trim(XMLData), "^[^<]*", "", "all")) />
<cfdump var="tmpXML is #tmpXML#" output="console" />
So I can only guess I should speak with the webservices programmer at this point to see what changes, if any, he has made to his webservice.
I don't believe he has though, but I could be wrong.
Thanks again. So its a character, but not a blank character.
Nelson