Return XML CFC

I'm trying to return a string xmlObject through a Web service or xml. When I empty the back I get the following code (in the code)
& lt; thankyoucards & gt; & lt; presentation & gt; & lt; user name & gt; returnVariable & lt; / user name & gt;. & lt; OrderDate & gt; returnVariable & lt; / orderdate & gt; & lt; JobNumber & gt; returnVariable & lt; / jobnumber & gt; & lt; ContactName & gt; returnVariable & lt; / contactname & gt;

XMLParse chokes on trying to show this.

In my cfc I use the cfsavecontent tag to create the xml file

< cfset myXML = "" >

<! - generate xml - >
< cfsavecontent variable = "myXML" >
< thankyoucards >
< quote >
< username > returnVariable < / username >
returnVariable < orderdate > < / orderdate >
< jobnumber > returnVariable < / jobnumber >
returnVariable < contactname > < / contactname >
returnVariable < email > < / email >
< contactphone > returnVariable < / contactphone >
< mailclass > returnVariable < / mailclass >
< dropdate > returnVariable < / dropdate >
returnVariable < parts > < / parts >
returnVariable < fileupload > < / fileupload >
< wordupload > returnVariable < / wordupload >
returnVariable < addfiles > < / addfiles >
returnVariable < cardtype > < / cardtype >
< comment > < / comment >
< / quote >
< / thankyoucards >
< / cfsavecontent >
< cfreturn myXML >
How can I find the XML so that I can analyze in an xml object?
Thanks for the help.

DOH! Thanks for the warning shot. Good thing, it's a weekend. Once again, thank you.

Mark

Tags: ColdFusion

Similar Questions

  • actions cannot return xml types

    Anyone know if there is a way to allow an action support a nodelist return xml.

    I'm trying to run a workflow to a list of xml nodes. The problem I have is that you cannot return a type xml of an action or a script action. So I can't create a loop of workflow and so the loop will have to be written in the code. I tried to return a "some", but I cannot deserialize xml.

    Although in the code it works in principle it means there is little a workflow.

    I guess I could fill configuration objects and then loop but it would be much easier to have just an xml return type.

    And I forgot to mention that you can consider the question as answered since actions cannot return XML types.

    Of course, we can continue the conversation if necessary for the best workaround solutions.

    Christophe.

  • Web Service SOAP returned XML data are unreadable

    Hello

    I hope someone with some experience of SOAP could help me find a solution for which XML data coming out of a Web Service (SAP production) are illegible.

    In the attached file is the Web Service response, and as you can see in the header of the request is OK. (request to pass a serialized PCB of a 'tail' to 'work'). Request is successful (I manually check by directly connecting the SAP web service and check), but also the data on the printed circuit should be returned (edge stock code, etc...).

    My request and response with the XML data returned works very well in SoapUI.

    Any help would be appreciated.

    Darin.K wrote:

    I agree with Phillip (except that you want to "inflate" the payload).  You can simply post a VI with full response defined as default in a string control/indicator and I am betting we could get it sorted.

    Thanks Darin, I think acompress and after reading an article google re: SAP NetWeaver, who used the terms inflate and deflate, I confused my prefixes. I also regularly exchange numbers when transcribing the long numbers. Dyslexic, I am.

    JonnyR - please use the uncompress function I've included on the same link as soon as possible. You will need to remove the header HTML of the string portion. If you do not, unzip it will interpret the header as compressed data and you will get jumbled as output data.

  • return of cfc query

    is it possible to query the data back to a cfc to flex back using the following:

    < cffunction = access "getClientJobsQuery" name = "remote" returntype = "query" >
    < cfset myQuery = "" >
    < cfquery name = "myQuery" datasource = "flexTrainingData" >
    SELECT ProjectName, description, projectID, contributor
    Projects
    < / cfquery >
    < myQuery cfreturn >
    < / cffunction >

    I can't get the data to display in a datagrid control. I tested the application on a normal page and it doesn't work, and just to be sure the component is actually achieved, I added another method that passes from a simple string back - and does so successfully so not dramatic it. It's how to pass recordsets back to flash, it's the same for the access remote flex based?

    my code at the end of flex is:

    < mx:Button label = "get the remote object query" click = "myService.getClientJobsQuery ()" / >
    < mx:DataGrid dataProvider = "{qResult}" >
    < mx:columns >
    < mx:Array >
    < mx:DataGridColumn dataField = "number of project" / >
    < mx:DataGridColumn dataField = "project name" / >
    < mx:DataGridColumn dataField = "description" / >
    < mx:DataGridColumn dataField = "contributor" / >
    < / mx:Array >
    < / mx:columns >
    < / mx:DataGrid >

    Any help greatly appreciated, I can't wait to get into flex :)

    Hello.. I actually had work yesterday and had not had the opportunity to see again...

    I had:

    [Bindable]
    public var qResult:ArrayCollection;

    I just needed to add the following line to operate:

    public function clearAll (): void {}
    qResult = new ArrayCollection();
    }

    See you soon,.
    Mark

  • Response returned by FinancialUtilService is not XML?

    Hello

    I use FinancialUtilService to create a test file in the Complutense University of MADRID.

    It works very well in that it creates the file in the Complutense University of MADRID, however, it seems that the answer is not a valid XML code.

    When I try the 'Service of Fusion Tester', I get a response that seems well, for example:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < = xmlns:env env:Envelope ' http://schemas.xmlsoap.org/SOAP/envelope/ "xmlns:wsa =" " http://www.w3.org/2005/08/addressing ">

    < env:Header >

    < wsa: action > http://xmlns.Oracle.com/apps/Financials/commonModules/shared/financialUtilService//FinancialUtilService/uploadFileToUcmResponse < / wsa: action >

    < wsa: MessageID > urn: uuid:6877448f - 8 d 10-4e83-9070-5e5935a91ee8 < / wsa: MessageID >

    < / env:Header >

    < env:Body >

    " < = xmlns:ns0 ns0:uploadFileToUcmResponse ' http://xmlns.Oracle.com/apps/Financials/commonModules/shared/financialUtilService/types/ "> "

    " < result xmlns =" http://xmlns.Oracle.com/apps/Financials/commonModules/shared/financialUtilService/types/ "> 1250389 < / result > .

    < / ns0:uploadFileToUcmResponse >

    < / env:Body >

    < / env:Envelope >


    However, I have when I call using APEX_WEB_SERVICE. MAKE_REQUEST, waiting for XMLType gave, I get the errors below:

    ORA-31011: XML parsing failed

    ORA-19202: an error has occurred in the processing of XML

    LPX-00231: 39 invalid character ("") in a name a Nmtoken

    Error on line 3

    ORA-06512: at "SYS." XMLTYPE", line 5

    ORA-06512: at "APEX_040200.WWV_FLOW_WEBSERVICES_API", line 165

    ORA-31011: XML parsing failed

    ORA-19202: an error has occurred in the processing of XML

    LPX-00210: expected ' < ' instead of 'P '.

    I tried to review the response through other methods, and I'm getting something that starts from below, which looks like it is the reason why XML parsing is a failure:

    -= _Part_9559_409058356.1416840422981

    Content-Type: application/xop + xml; Charset = UTF-8; Type = "text/xml".

    Content-Transfer-Encoding: 8 bit

    Content-ID: < d7028776-1bb2-48aa-ba61-143110a9cb38 >

    <? XML version = "1.0" encoding = "UTF-8"? >

    Any ideas how I can use APEX_WEB_SERVICE to review the answer?

    Thank you

    Peter

    Solved.

    I could not force the service to return XML, but has managed to use apex_web_service.make_rest_request instead (which accepts as a returned CLOB).

  • Flex php XML return connection

    Hello! IM new to flex and I have a question I hope someone can answer. I have a flex application I'm building that needs to display a list of dynamic images, preferably with icons. I built the list of titles, but I do not know how to connect the HTTPService data to the list. the HTTPService returns XML data, it must be easy. but, as I said, Im really new. Please help me!

    "arthurlockman" wrote in message
    News:g7kk4g$177$1@forums. Macromedia.com...
    > Hello! IM new to flex and I have a question which I hope someone can
    > response. I have a flex application I'm building that needs a list
    > of
    > dynamic images, preferably with icons. I built the list, but I have no
    > soaps
    > How to connect the HTTPService data to the list. the HTTPService is
    > return
    > The XML data, so it must be easy. but, as I said, Im really new. Help, please
    > Me!
    >

    Depending on what you are willing to do, you can either use a Repeater with
    a picture or a custom component that contains an Image or you can use a list
    component to display an Image or a custom with a base Image component (or
    SwfLoader, or Loader) inside. It is literally a ton of stuff on it
    in the help. Here are a few places that you can try:

    Help > Flex Start Page > creating a Simple RIA
    Help > Help contents > User Interfaces
    -With the help of data providers and Collections
    -Controls
    -Image
    -SwfLoader
    -With the help of data-driven controls
    -With the help of converters point and section editors
    -Dynamically repeating controls and containers

    Here is an example that might get you quickly * if * you are not the type
    to read the docs:

    http://examples.Adobe.com/flex2/inproduct/SDK/PhotoViewer/PhotoViewer.html

    HTH;

    Amy

  • ColdFusion 2016 invoke webservice returns an error - works fine on CF 9

    So I try to migrate a site of CF 9 at CF 2016 after a few issues I ran into something I can't understand. Basically, I call the web service like this

    < cfinvoke

    WebService = "#APPLICATION. SiteURL#/cfapi/webservices/Orders.cfc?wsdl ".

    method = "QueryOrder".

    returnvariable = "REQUEST. XML">

    < name cfinvokeargument = "WebOrderNumber" value = "#URL. "WebOrderNumber #" / >

    < / cfinvoke >

    And he calls a page that returns a command via xml. The CF 9 it works fine. CF 2016 returns the XML, but it also returns an error. The error indicates

    This page contains the following errors:

    error on line 66 in column 1: Extra content at the end of the document

    Here is a rendering of the page up to the first error.

    It then lists my XML but just as directly data of type string. Although if you view the source code, it shows exactly the same returns XML content as the CF 9 server. The other info error I see is this. "Cannot perform web service QueryOrder call '

    I'm stuck! Any ideas?

    I found the problem. I had an OnRequestEnd function in my Application.cfc which was the addition of the white space

  • Problems with the Web Service using XML in Flex

    Hello

    I use a ColdFusion CFC, which is configured to generate an XML string. It runs on ColdFusion MX 6.1 and is configured as a remote web service. I tested the call and it returns the string XML fine when it is called from another method of Flex unfounded. My problem is this simple Flex application to call the same function via a service web, I wrote below. I cannot get to the exit results, keeps showing as NULL. I can't use the HTTP of Flex appeal for remote access because I'm not under MX7. Does anyone know what is wrong with my code? BTW, I would do the work of cross - domain.xml file to call the cfc, let me know if you want to test and I can add your domain name. Thank you!

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    <! - set Web Service to get the XML data of course catalog - >
    < mx:WebService
    ID = "cd".
    "WSDL =" http://training.wonderware.com/components/courses.cfc?wsdl "
    Load = "CD.getCourseCatalogXML.Send ()" "
    showBusyCursor = "true" fault = "Alert.show (event.fault.message), 'Error' ' result =" cdResult (event) ">"
    < mx:operation name = "getCourseCatalogXML" resultFormat = "e4x" >
    < mx:request >
    < IDCalendrier > 3 < / IDCalendrier >
    < / mx:request >
    < / mx:operation >
    < / mx:WebService >

    < mx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    Import mx.rpc.events.ResultEvent;
    Import mx.rpc.events.FaultEvent;

    [Bindable]
    public var outputString:String

    public void cdResult(event:ResultEvent):void
    {
    outputString = event.result as String
    }
    []] >
    < / mx:Script >

    < mx:Canvas horizontalScrollPolicy = "off" verticalScrollPolicy = "off" >
    < mx:Text width = '100% ' paddingLeft = "4" paddingRight = paddingTop "4" = "4" >
    < mx:text > OUTPUT: {outputString} < / mx:text >
    < / mx:Text >
    < / mx:Canvas >

    < / mx:Application >

    Thank you very much! I do not have the notion that the HTTPService is indded just an HTTP call. So yes that it a much simpler way to call just ColdFusion to return the XML string to the application. No reason to use Flash Remoting or CFCS etc... and certainly not a web server. This made the turn that I called a HTTPService now what charges by coldfusion page that returns XML and bam, works well with e4x result etc... Thanks tracy!

  • How to make httpconnection and get the xml response using httpconnection in post method.

    Hello

    I am new to the blackberry web work,

    I want to make httpconnection using the post method and also pass a parameter related to my url.

    This function returns xml data.

    How can I perform this task.

    Please help me if anyone has a solution...

    I have soved that problem myself.

  • ORA-31011: XML parsing failed

    Hello

    Currently I am passing the sql SELECT query * table to this API oracle returns XML data into a clob.

    I have a column in DB which, once certain error over a value that contains an unprintable character. Its not visible directly on sqlplus then I ran the query to find its value ascii() and it turns out be ASCII 4 which is EOT [end of transmission]

    dbms_xmlgen. GetXml is isn't able to manipulate and generate the XML from this table. His throw ORA-31011: failed to parse XML.

    I know that you can use regxp_replace as in the following example to remove all control characters (that is, non-printable characters):

    SELECT DBMS_XMLGEN.
            getxml (
              'select regexp_replace(empno,''[:cntrl:]'') empno, ename, job, mgr, hiredate, sal, comm, deptno  from emp')

      FROM DUAL;

    But, this also removes the feedback tab and transport, I need to keep.

    What is needed is a set of characters (for example, [: xml :]) that can be used with regexp to return all valid XML characters.])

    No idea how to remove all non - xml characters elegantly (i.e. without having to specify the ranges of hexadecimal characters, etc..)?

    You need to delete ASCII 1-8, 11,12,14-31 and 39, so I doubt that ' elegantly '.

    Here is an example of work with regexp_replace and (clumsy) beaches. There is no more an EXCEPTION with the high-end:

    DECLARE
      ostr  VARCHAR2(50);
      nstr  VARCHAR2(50);
      xstr CLOB;
    BEGIN
      FOR i IN 1..255 LOOP
      BEGIN
        ostr := chr(i);
        nstr := regexp_replace(ostr,'['||chr(1)||'-'||chr(8)||']|['||chr(11)||'-'||chr(12)||']|['||chr(14)||'-'||chr(31)||chr(39)||']','#');
        SELECT DBMS_XMLGEN.getxml ('SELECT '||i||' i, '''||nstr||''' str  FROM dual') INTO xstr  FROM dual;
        --dbms_output.put_line(xstr);
      EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line(i);
      END;
    END LOOP;
    END;        
    
  • The biggest way how to check XML Diffs

    Hi all!

    I am looking for a simpler and faster way to compare two XML in Oracle (PL/SQL).

    Perhaps that some build in functions which can do.

    I don't know about XMLDIFF, but I must returned XML type, the return value should be: are similar or not!

    Thank you

    ID.

    Maybe...

    CASE

    WHEN XMLEXISTS)

    ' declare namespace xd = "http://xmlns.oracle.com/xdb/xdiff.xsd"; /XD:xdiff / *'

    ROUTED to XMLDIFF (a, b))

    'DIFFERENT '.

    ON THE OTHER

    "SIMILAR".

    END diff

  • best way to parse XML without a XSD

    Hello

    In the past whenever I've had to deal with XML, I had an XSD that I could use to marshal the XML in a bean. But now I have to communicate to an API that returns XML that have no any XSD or other type of document description XML.

    I was going to just to use string mute and corresponding analysis. Is there a better way to deal with this? Is there like a tool or library that will be the input XML ICD and put it in a container that is widespread with cards and such that I can pull the data I want?

    Thank you
    Jose

    >
    In the past whenever I've had to deal with XML, I had an XSD that I could use to marshal the XML in a bean. But now I have to communicate to an API that returns XML that have no any XSD or other type of document description XML.

    I was going to just to use string mute and corresponding analysis. Is there a better way to deal with this? Is there like a tool or library that will be the input XML ICD and put it in a container that is widespread with cards and such that I can pull the data I want?
    >
    So what stops you to create your own XSD?

    The basic structure you need to analyze and process the data anyway. So why not simply capture the structure you need in an XSD, and then use this XSD the same way you have always (e.g. XMLBeans or other).

    If you are looking for on the net you can find some freeware libraries that can create a basic XSD from an XML doc. More complete example XML is the best work they can do. Use one of those to get the first draft of a XSD and then to embellish it.

    You can also use Apache Commons Digester to only have access to the raw XML data.
    http://Commons.Apache.org/proper/Commons-digester/

  • ADF Mobile - XML parsing

    Previously, I posted on the call of a remote webservice - call remote using ADF Mobile service and I get my weather app already working.

    WebService returns me a string which is a XML form. I want to parse the XML to make it easy to read.

    The current output of webservice (http://www.webservicex.com/globalweather.asmx) as is below.

    * < string > < NewDataSet > *.
    * < table > *.
    * < country > Singapore < / country > *.
    * < City > Singapore / Paya Lebar < / City > *.
    * < /table > *.
    * < table > *.
    * < country > Singapore < / country > *.
    * < City > Singapore / Changi Airport < / City > *.
    * < /table > *.
    * < / NewDataSet > < / string > *.

    How to analyze this output so I can correctly display the string in the mobile?

    Singapore / Paya Lebar
    Singapore / Changi Airport

    Any direction on how to do it? Or is there a built-in inside JDeveloper?

    As mentioned earlier - your service returns XML code - so either you write Java code that performs the extraction of data.
    Or if you want to use declaratively using the data URL control option
    as explained here:
    http://Rohith-Oracle.blogspot.com/2012/12/ADF-mobile-consuming-RESTful-service.html
    Your service will accept this type of URL:
    http://www.webservicex.com/globalweather.asmx/GetCitiesByCountry?CountryName=Singapore

  • Conversion function XML AS2 AS3

    Hi guys, how are you?

    Once again I m here to ask for your help.

    I m trying to convert an AS2 AS3 script, but I m not good in AS3 síntax yet. I Don t know how to create this structure. Please, could someone help me?

    xml:
    
    <resources>
    
             <levelTitle1>Iniciante</levelTitle1>
              <levelTitle5>Aprendiz</levelTitle5>
              <levelTitle10>Aspirante</levelTitle10>
              <levelTitle15>Recruta</levelTitle15>
              <levelTitle20>Experiente</levelTitle20>
              <levelTitle30>Profissional</levelTitle30>
              <levelTitle50>Star</levelTitle50>
              <levelTitle70>Ás</levelTitle70>
              <levelTitle90>Campeão</levelTitle90>
              <levelTitle120>Lenda</levelTitle120>
    
    </resources>
    
    
    AS2 Function:
    
    public static function getLanguage(tag:String):String
    {
               if (languageObject[tag].data){
    
    
                        return slanguageObject.resources[tag].data;
               }
                 return "Error";
     }
    

    I can´t find a way to work in as3 without the parameter 'data '.

    I want to call this as2 function, pass "levelTitle30" to the "tag" parameter and return by the return of the function of the content of "levelTitle30" of the xml tag.

    Kind regards

    is your code xml in an external file?

    If so, (for example, resources.xml), you would use:

    var xml

    var urlLoader:URLLoader = new URLLoader();

    urlLoader.addEventListener (Event.COMPLETE, completeF);

    urlLoader.load (new URLRequest ("resources.xml"));

    function completeF(e:Event):void {}

    XML = e.Target.Data;

    }

    public static function getLanguage(tag:String):String{
    if(xml[tag]){
    return xml[tag];

    } else {
    return "Error";
    }
    }

  • Writing of XML "&lt;" or "&gt;" AKA &amp; lt; or &amp; gt;

    Hello

    How can I write a lower or higher of symbol in an xml file? The code works, but the resulting XML file contains the reference of character entity named instead of the lower or greater than sign.

    I need the XML for Cascading Style sheets. If we build the xml manually, everything works fine. We are trying to build a utility to the AIR to create the XML for us, based on the contents of the fields in a form of AIR. Everything works until we try to add «!» [CDATA [< p >"in the opening tag.]]

    In despiration, we tried a number of things. The most recent is by using variables to contain the strings that we write as in what you see then:

    var cDataStart:String = "!" [CDATA [< p > ";]]

    var cDataEnd:String = ' < /p >]] ";

    newElements.DragDropContainer.appendChild (< DragDrop > < name of labels = {Match} > {cDataStart+ filename +cDataEnd} < /Etiquettes > < target image value = {png} = {Match} > < / objectives > < / DragDrop >);

    The result is this XML:

    < DragDrop >

    < name of labels = 'Match0' >! [CDATA[& lt; p & gt; tag& lt; /p & gt;]] < / Label >

    < target image = "image3.png" value = "Match0" / > "

    < / DragDrop >

    Thoughts anyone?

    Thank you

    Pete H.

    This is the 2nd part of my message that addresses the problem you see: you use the cdata and this is the value as a string instead of xml.

    for example, use:

    function cdataF(s:String):XML {}

    var xml = new XML(" ");

    return xml;

    }

    var XML = {cdataF (')}

    ' + Name + '.

    ")};

Maybe you are looking for