tracker issue : CF-4058416

select a category, or use search below
(searches all categories and all time range)

problems with xml returned when invoking a web service with CF11

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/ThirdParty

Reporter/Name(from Bugbase): Rafael Ulloa / Rafael Ulloa (Rafael Ulloa)

Created: 09/17/2015

Components: Web Services, General

Versions: 11.0

Failure Type: Data Loss

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Mac All

Vote Count: 0

hi, i have run into an unusual behavior when invoking web services.
i am calling a web service that returns a ColdFusion XML object like this:
when calling this web service from CF10, it works just fine. However, when calling from CF11, i only get this:

no <children>? for some reason, CF11 ignores/hides the topmost XML level. this doesn't happen on previous versions. why? the server that hosts the web service is CF11 too.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4058416

External Customer Info:
External Company:  
External Customer Name: Rafael Ulloa
External Customer Email:



We are unable to repro this issue, when tried with ColdFusion 11, SOAP service. Tried with below mentioned code : Test code : <cfset XML3 = XmlNew() /> <cfset xmlRoot = XmlElemNew( XML3, "", "children" ) /> <cfset XML3.XmlRoot = xmlRoot /> <cfset xmlChild = XmlElemNew( XML3, "", "child" ) /> <cfset xmlFN = XmlElemNew( XML3, "", "firstName" ) /> <cfset xmlFN.XmlText ="John"> <cfset xmlLN = XmlElemNew( XML3, "", "lastName" ) /> <cfset xmlLN.XmlText ="Doe"> <cfset ArrayAppend(xmlChild.XmlChildren,xmlFN ) /> <cfset ArrayAppend(xmlChild.XmlChildren,xmlLN ) /> <cfset ArrayAppend(xmlRoot.XmlChildren,xmlChild ) /> <cfset ws = createObject("webservice","http://<host>:<server port>/<path>/webservice.cfc?wsdl", {refreshwsdl="true"})> <cfset xmlCont=ws.echoXml(XML3)> webservice.cfc: <cfcomponent> <cffunction name="echoXml" access="remote" returnType="xml"> <cfargument name="argXml" type="xml"> <cfreturn argXml> </cffunction> </cfcomponent> Application.cfc: <cfcomponent> <cfset"ws_app"> <cfset this.clientmanagement="false"> <cfset this.sessionManagement="true"> <cfset this.sessionTimeout = createtimespan(0,0,1,0)> <cfset this.applicationTimeout = createtimespan(1,0,0,0)> <cfset this.wssettings.version.publish = "1"> <cfset = "rpc"> </cfcomponent> Sent xml was similar to the received one. Please share the test code to repro and details pertaining to webservice, type and its version.
Comment by Akhila K.
5854 | September 18, 2015 04:22:00 AM GMT
test code: <cfset result = createObject("webservice","http://<host>:<server port>/<path>/webservice.cfc?wsdl").createXMLResponse()> webservice.cfc <cffunction name="CreateXmlResponse" access="public" returntype="xml"> <!---Preparing XML Response---> <cfoutput> <cfxml variable="xmlObject" casesensitive="true"> <children> <child> <firstname>john</firstname> <lastname>doe</lastname> </child> </children> </cfxml> </cfoutput> <cfreturn xmlObject> </cffunction> the WS is hosted in a CentOS server with CF11, called from a Mac OSX with CF11.
Comment by External U.
5855 | September 21, 2015 11:48:34 AM GMT
This is a bug with Axis 2. In this case, the response sent by Axis 2 is not within a namespace. <soapenv:Envelope xmlns:soapenv=""> <soapenv:Body> <ns:CreateXmlResponseResponse xmlns:ns="http://bugCF-4058416.bugbash"> <ns:return> <children1> <child> <firstname>john</firstname> <lastname>doe</lastname> </child> </children1> </ns:return> </ns:CreateXmlResponseResponse> </soapenv:Body> </soapenv:Envelope> The actual response should be like: <soapenv:Envelope xmlns:soapenv=""> <soapenv:Body> <ns:echoXmlResponse xmlns:ns="http://bugCF-4058416.bugbash"> <ns:return> <ns2:argXml xmlns:ns2="http://bugCF-4058416.bugbash"> <children1> <child> <firstname>john</firstname> <lastname>doe</lastname> </child> </children1> </ns2:argXml> </ns:return> </ns:echoXmlResponse> </soapenv:Body> </soapenv:Envelope> As a workaround, we can use axis 1 to publishing and consuming the service. Change the CFC to include a "wsversion" attribute in cfcomponent tag. <cfcomponent wsversion="1"> <cffunction name="CreateXmlResponse" access="remote" returntype="xml"> <!---Preparing XML Response---> <cfoutput> <cfxml variable="xmlObject" casesensitive="true"> <children1> <child> <firstname>john</firstname> <lastname>doe</lastname> </child> </children1> </cfxml> </cfoutput> <cfreturn xmlObject> </cffunction> </cfcomponent>
Comment by Paul N.
5856 | September 25, 2015 04:29:12 AM GMT
this works. thank you!
Comment by External U.
5857 | September 28, 2015 09:08:01 AM GMT