from xml to a web service

Hi all

I'm trying to capture some xml that is passed to a web service that I've created. I put the argument of a type XML. When I go back to the argument, the contents of the returned file seems to approximate the XML passed to the web service. However, I can't access XML from webservice.

I tried to do a cfdump to a file inside of the XML web service and all I get are all statements of java object, no XML. I try to call the java object functions and I get nothing. I tried access to content the XML elements using the ColdFusion syntax, and it said that items doen't exist.

If someone has an idea, it would be appreciated.

Thank you
Jim

OK, thank you Adam for wasting your time to help me. Yes, it worked. I don't have any ZIP code because everything I had, it was like four lines, I tried to publish a webservice for ColdFusion, another is the part of your. So, this is all it is:





The problem was that the discharge was the definition of the java object, not the XML. I didn't know how to access the XML component, or if he existed, that makes the xmlsearch. Also, any namespace prefixes are changed when the XML arrives, so if you have a tag like , when it comes into service web CF it is changed to .

If the combination of these two throw me off the coast.

Thanks for the help,
Jim

Tags: ColdFusion

Similar Questions

  • How to transfer data from oracle to the web service using ODI with axis2 tech

    Hi all

    Can someone cause a document or markets about 'How to transfer data from oracle to the web service with the help of ODI with AXIS2 technology'
    If any person with a document or markets, please share it with me

    Thank you
    Phani

    I can give you a few examples of web services in ODI, perhaps that you find them useful?
    Try: -.
    http://John-Goodwin.blogspot.com/2009/04/ODI-series-Web-services.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-3.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-4.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to expose a function that returns a XML as a Web Service?

    ---------------------------------------------------------------------------------
    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production."
    AMT for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    ---------------------------------------------------------------------------------

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:
    -- My types
    create or replace 
    TYPE CHILD_T AS OBJECT ("@ID" VARCHAR2(20), "@NAME" VARCHAR2(20));
    
    create or replace 
    TYPE CHILDREN_T AS TABLE OF CHILD_T;
    
    create or replace 
    TYPE PARENT_T AS OBJECT ("@ID" VARCHAR2(20), CHILDREN CHILDREN_T );
    
    -- The actual select
    SELECT XMLFOREST (
                PARENT_T(d.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parent_id = p.id) AS CHILDREN_T )
                ) AS "Parent"
            ) 
    FROM parent p;
    That gets me this:
    <Parent ID="1">
        <CHILDREN>
            <CHILD_T ID="1" NAME="xxxxx" />
            <CHILD_T ID="2" NAME="yyyyy" />
            <CHILD_T ID="3" NAME="zzzzz" />
        </CHILDREN>
    </Parent>
    It's perfect, but how to expose this result as a Web Service like this link?
     http://localhost:8080/orawsv/MY_USER/GET_CHILDREN?wsdl
    I tried this function:
    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    ) RETURN CLOB
    AS
        L_RESULT CLOB;
    BEGIN
        SELECT to_clob(XMLFOREST (
                PARENT_T (p.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parentId = p.id) AS CHILDREN_T )
                ) AS "ParentObj"
          )) AS MY_XML INTO L_RESULT
        FROM parent p
        WHERE p.i = PARENT_ID;
    
        RETURN (L_RESULT);
    END GET_CHILDREN;
    But when I access although .NET Compact Framework, I get this: "'Element' is an invalid XmlNodeType.

    As you can see, I just need a simple way to transport information between a Windows CE handheld computer and our database. Use functions that return simple values.
    Do I have to return the data as xml?
    What return value I should use? Varchar2 throws a buffer error output.

    ---------
    It is my first post here, also my first contact with OracleDB, and Web Services.

    Hello

    Welcome to Oracle and XML DB!

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:

    Have you also read about the SQL/XML functions?
    You don't have to create objects of type SQL to generate XML data.

    Using only XMLElement, XMLAgg, XMLAttributes, etc., you should be able to generate any kind of structure complex relational data and with total control over the names (which you don't have with the types of objects).
    Your example can be rewritten to:

    SELECT XMLElement("Parent",
             XMLAttributes(p.id as "Id")
           , XMLElement("Children",
               (
                 SELECT XMLAgg(
                          XMLElement("Child",
                            XMLAttributes(
                              c.id as "Id"
                            , c.name as "Name"
                            )
                          )
                        )
                 FROM child c
                 WHERE c.parent_id = p.id
               )
             )
           )
    FROM parent p
    WHERE p.id = :parent_id ;
    

    It's perfect, but how to expose this result as a Web Service like this link?
    [...]
    Do I have to return the data as xml?

    Yes.
    Define the return as XMLType data type:

    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    )
    RETURN XMLTYPE
    AS
        L_RESULT XMLTYPE;
    BEGIN
    
      SELECT XMLElement("Parent",
               XMLAttributes(p.id as "Id")
             , XMLElement("Children",
                 (
                   SELECT XMLAgg(
                            XMLElement("Child",
                              XMLAttributes(
                                c.id as "Id"
                              , c.name as "Name"
                              )
                            )
                          )
                   FROM child c
                   WHERE c.parent_id = p.id
                 )
               )
             )
      INTO L_RESULT
      FROM parent p
      WHERE p.id = PARENT_ID ;
    
      RETURN (L_RESULT);
    
    END GET_CHILDREN;
    
  • Output table in XML format using web services

    I use Labview 8.6 web services to try and a list of power provides a database as XML output. When I table of wire into the Terminal and set the URL for the web services mappings will not build because he says it is an unsupported data type. Any help would be appreciated.

    A web service XML LabVIEW 8.6 supports several types of data. A table is not one of these.

    The best way to work around this limitation is to use a string instead of the indicator table indicator. The antiderivative of flatten it to XML allows you to convert your table to an XML string.

    Alternatively, you can choose your web service method to use the mode of stream instead of the Terminal mode. You can then use the VI of response write in the range of web services to control what to write to the client and when. This seems to be what you mean when you wrote "access to the exit.

    By passerby-tables can serve as exits in LabVIEW 2009 Terminal mode.

    Nathan

  • How send to an XML web service?

    I am brand new to Flex. I am writing a program that uses web services to send and receive data. I got so that he can receive the XML of the web service. However, I also need to send it, and I'm stuck.

    I tried the following code:

    < mx:WebService id = "MyService".
    "WSDL =" http://localhost/FlexTest/service1.asmx?WSDL "
    useProxy = "false".
    result = "resultHandler (Event)" >

    <!-Entry: XML Document... Output: String->
    < mx:operation name = "HelloPersonAcceptsXmlDocumentReturnsString" >
    < mx:request >
    < personXmlDoc > xmlPerson < / personXmlDoc >
    < / mx:request >
    < / mx:operation >

    <!-Entry: XML node... Output: String->
    < mx:operation name = "HelloPersonAcceptsXmlNodeReturnsString" >
    < mx:request >
    < personXmlNode >
    xmlPerson.Person
    < / personXmlNode >
    < / mx:request >
    < / mx:operation >

    <!-Entry: String (XML Format)... Output: String->
    < mx:operation name = "HelloPersonAcceptsXmlStringReturnsString" >
    < mx:request format = "xml" >
    "< personXmlString > < p1:Person xmlns:p1 =" http://impact-tech.com/schemas/FlexTest "> < p1:ID > f1bd45fc - 544 b-489 d-83cf-349d1f9740ec < / p1: I D > < p1:FirstName > Joe < / p1:FirstName > < p1:MiddleName > c. < / p1:MiddleName > < p1:LastName > kick < / p1:L astName > < p1:BirthDate > 2006-09-11 T 14: 03:04.4755443 - 04:00 < / p1:BirthDate > < p1:IsMarried > < /p1:IsMarried > false < p1" : NumChildren > 0 < / p1:NumChildren > < p1:NetWorth > 100000 < / p1: NetWorth > < / p1: Pers on > < / personXmlString >
    <!-{xmlPerson.toXmlString ()} < personXmlString > < / personXmlString >->
    <!-{txInput.text} < personXmlString > < / personXmlString >->
    < / mx:request >
    < / mx:operation >

    < / mx:WebService >

    In the first operation, 'HelloPersonAcceptsXmlDocumentReturnsString', I try to send an XML object. During the second operation, 'HelloPersonAcceptsXmlNodeReturnsString', I try to send the root node, xmlPerson.Person. In both cases, what is actually sent is literally the text that I put in the node < application >, not the object the text refers. For the first, "xmlPerson" then gets sent to the target, not the XML doc what it refers to.

    In the third operation, I tried three different things, and two are commented. I tried to refer to the XML object using the toXmlString() method, but again, it has literally sent the text "xmlPerson.toXmlString ()". I tried the brace link, but then nothing is sent to the web service. I also tried to build the XML node and with values, but I get an error from the web service saying that it cannot be analyzed because there is an illegal line 1, position 1 character. The only thing that worked was to add a text entry box, copy - paste the exact same structure XML that I tried to build manually and then use binding to the text property of the control InputText. Then it works fine. But I can't actually do, it's just to test.

    So my question is how a < application > node that is part of the web service operation that makes reference to an object and sends the value of this object to the web service, not literally all text is typed into this node. I looked at Web Services and sections of the help data binding and did not see examples on this. Everything was much more simplistic with binding to controls. Can someone help a newbie, please?

    I do not understand how this isn't a matter of Flex Builder, since it has to do with how Flex Builder interacts with web services and how objects are used in the binding in MXML.

    But anyway, I got this code for future reference of someone else to research work in this forum:

    Declare a custom in MXML class has been the key to allow the correct link:


    "WSDL =" http://66.129.123.211/FlexTest/service1.asmx?WSDL "
    useProxy = "false".
    result = "resultHandler (Event)" > "




    {testPerson.GetXmlDoc ()}

  • Web services with xml file

    Hello

    How read xml file using web services?

    Here's my cfc web services: (I just want to see how to read the xml file)

    < cfproperty >

    < name cffunction = "getBooks" access = "remote" returntype = "string" output = "no" >

    < cfargument "xmlObject" type = name = "xml" required = "yes" >

    < cfset BookResponse = "" > "".

    < cfset var arrIndx = "" > "".

    < cftry >

    < = cfloop '1' to = "#ArrayLen (arguments.xmlObject.XmlChildren)" # "index ="arrIndx">"

    < cfset BookResponse = arguments.xmlObject.XmlChildren [arrIndx]. XmlName >

    < / cfloop >

    < cfcatch type = "any" >

    < cfset BookResponse = ' #cfcatch.message # #cfcatch.detail # ' >

    < / cfcatch >

    < / cftry >

    < cfreturn BookResponse >

    < / cffunction >

    < / cfproperty >

    Here my code to test web services:

    1. define the XML

    <!-installation of the XML to work with->

    < cfsavecontent variable ="XMLFile"><? XML version ="1.0"? >

    < root >

    < header >

    < user > 1 < / user >

    < / header >

    < book >

    0321330110 < isbn >< / isbn >

    < title > Macromedia ColdFusion MX 7 Certified Developer Guidestudy / < /title >

    < author > BenForta / < / author >

    < / book >

    < header >

    < user > 2 < / user >

    < / header >

    < book >

    0596004206 < isbn >< / isbn >

    < title > Learning XML, secondedition / < /title >

    < author > ErikRay / < / author >

    < / book >

    < header >

    < user > 3 < / user >

    < / header >

    < book >

    0782140297 < isbn >< / isbn >

    < title > ColdFusion Developer's GuideMX / < /title >

    < author > RaymondCamden / < / author >

    < / book >

    < / root >

    < / cfsavecontent >

    2 call web services

    < cfinvoke

    method = "getBooks".

    returnvariable = "rawXMLBookList."

    " webservice =" http://localhost/Hoteleria/WebServices/books.cfc?wsdl "> "

    < name cfinvokeargument = "xmlObject" value = "#XMLFile #" >

    < / cfinvoke >

    <!-< cfset XMLDocResult = XmlParse (rawXMLBookList) >

    < cfdump var = "#XMLDocResult #" >-->

    < cfdump var = "#rawXMLBookList #" >

    3 error: Element XMLOBJECT. XMLCHILDREN is undefined in ARGUMENTS.

    I also try using XMLParse without success.

    Any ideas?

    Thank you

    Sorry about that. It worked for me!

    What about doing it on the basis of chains, as follows:

    Books.CFC

    #arguments.xmlString #.

    testPage.cfm


    1

    0321330110

    Certified Macromedia ColdFusion MX 7 Developer Study Guide

    Ben Forta

    2

    0596004206

    Learning XML, second edition

    Erik Ray

    3

    0782140297

    ColdFusion MX Developer's Handbook

    Raymond Camden

    <>

    method = "getAuthors".

    returnvariable = "authorList.

    "WebService ="http://localhost/Hoteleria/webServices/books.cfc?wsdl ">

  • Can I receive via an XML web service in the PDF form?

    Hi all, I am able to send data to a server via a web service configured in my button send email.  Once the data has been received on the server, a reference number is returned.  My problem starts here as reference number comes back in my browser and not in the PDF file.  How can I get the reference number in the PDF?  Thank you J

    If you actually submit the XML via a web service you shodul be able to bind the output of the web service to a field in your form. You have configured a data connection to a WSDL file?

    You say that you submit via a webservice in your button send email. That made no sense than that described two submit operations on the same key. I suspect that you send us by e-mail and that the server is answer via a HTML page... .Hence the browser is to intercept and place it on the screen (outside your PDF file).

    Hope that helps

    Paul

  • Web service for a more specific class when compiling

    Hello

    I just started using labview generator of the user Web interface and I have a problem when I generate the project.

    I recover data with the service and all works well when the application runs in the generator of the user Web interface of labview environment.

    But when I build the project, the Web API service is not recover my data. After a few debbuging, it seems that the problem comes from the block 'Parse Web Services', which returns nothing.

    Someone has an idea?

    Thank you

    I called the support OR and the response was:

    Name of the object should never have special characthers as e, to, o (in french) etc...

    The reason is that the application is generated by a server OR English on the web.

    So for the french, think of never having name determined that contains special characters.

    Otherwise, the application will run in the development environment but not after compilation by the server OR.

    Good bye

  • How to check the total of the data sent and received via Web Service

    Hi guys

    I develop an application that receives data on about from server using the Web Service. Any fast way I can find total data sent to the server and the total of the data received from the server by my application?

    Any help would be much appreciated.

    Pinsard

    Check this thread:

    http://supportforums.BlackBerry.com/T5/Java-development/calculate-data-usage-for-particular-applicat...

    It could be that useful...

  • Management component of the ADF based on Web Service

    Hi Experts,

    Jdev 11.1.1.7

    How to create a from ADF BC of web service proxy.  Long time back I saw a post that shows step by step implementation on even use cases. I guess it was Frank Nimphius post.

    I googled a lot, but not found. Looking for simillar post.

    Thank you

    Nitesh

    In this case: http://www.oracle.com/technetwork/issue-archive/2012/12-jul/o42adf-1653060.html

    Dario

  • How to get the XML from the Request of Java object before sending. SOAP Web services

    I'm building Java request to Online Web Services and we'll call it application A . I got the WSDL forms the second part of the file in order to communicate with their application and we'll call it application B .

    Of the WSDL file generate the Java required classes that are Requests and Responses . classes Application A will send some request object after setting the parameters required and with the exception of response object of application B .

    The connection is established and the two applications A and B communicate with each other.

    Question:

    Of application A How can I get the xml data (or text file) for the request object before sending it to application B ?

    As described the connection is passing Java object such as request and I know that in some point this request will be converted to xml file. How to get it?

    -EDIT-

    Missing important information which can be confusing.

    I'm generated the Java rating were generated using the Axis framework

    The problem is solved by, add the following statements in the bindingStub class that was automatically generated from the WSDL file to the web-services you are trying to access.

       String request = _call.getMessageContext().getRequestMessage().getSOAPPartAsString(); 
     String response = _call.getMessageContext().getResponseMessage().getSOAPPartAsString();
    

    These statements should be placed after the following method call _call.invoke otherwise you will get NullPointerException .

    _callis a variable of type org.apache.axis.client.Cal and it is automatically generated byAxis

  • XPath with XML from a Web Service

    Hello

    I've been tweaking data traction of a webservice and have managed to get the results that I need so I'm now at the stage where I want to do something useful with the XML that is returned, so I played with Xpath.

    I understand I can use Xsearch to draw the nodes of the XML object rather than having to write the XML to a file and then look in the file. The problem I have is that when I use Xsearch it does not extract data I'll be waiting.

    Here is the XML that is returned by the web service, which I attribute to the variable xmlReturned:

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

    " < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema ">

    < soap: Body >

    " < GetChildLocationsResponse xmlns =" http://tempuri.org/VillarentersWebService/villa_search ">

    < GetChildLocationsResult >

    < RequestedParentID > 3924 < / RequestedParentID >

    < VRF / >

    < ChildLocations >

    < location >

    < LocationRef > 10 < / LocationRef >

    the Argentina < LocationDescription > < / LocationDescription >

    < ParentID > 3924 < / ParentID >

    < / location >

    < location >

    < LocationRef > 30 < / LocationRef >

    Brazil < LocationDescription > < / LocationDescription >

    < ParentID > 3924 < / ParentID >

    < / location >

    < / ChildLocations >

    < / GetChildLocationsResult >

    < / GetChildLocationsResponse >

    < / soap: Body >

    < / envelope soap: >

    So, when I use:

    < cfset locDescription = XmlSearch (xmlReturned, "//LocationDescription") / >

    < cfdump var = "#locDescription #" >

    I expect to see an array of 2 elements, the Argentina and the Brazil. What I actually get is an empty array. I tried using a Xpath Checker convenient online at http://www.zrinity.com/xml/xpath/index.cfm and I get the same result. I tried a little research different but every time the table is empty.

    Does anyone know why it is not pulling the knots required in the table? Am I missing something simple here?

    Or you could represent the namespaces in your xpath xmlsearch properties.

    Here is the first link that I got from a Google search for"namespace xmlsearch.

    http://www.aftergeek.com/2006/08/xmlSearch-XPath-and-XML-namespaces-in.html

  • Download image pieces bmp to xml from the web service

    You try to download a bmp, in blocks of 10,000 bytes, using a .net web service.

    I get an error because of the bmp bytes.

    How the octets must be encoded?

    XML uses utf8 text, you'll have to urlencode (base64) bytes, similar to an email.

  • Bind the drop down list to XML response from the web service

    In Designer ES2, I'm trying to populate a drop-down list with the data returned by a web service, but can't seem to get the link right.

    I created a web service using Workbench, which returns the following XML data (shown here in a text field for test purposes):

    image1.PNG

    However, when I bind this to the DataDropdownList control, LiveCycle seems to be putting the entire XML document in the drop-down list.

    Liaison:

    image2.PNG

    (Full text of the link is connectionData.groupLeaderWebService.Body.invokeResponse.xmlData.document.)

    Result:

    image3.PNG

    Therefore, a connection is made and the web service returns data, but it is not bound correctly as items in the list.

    I need the drop-down list to display the individual names returned by the web service.  Finally, it probably will be expanded to include the name and identification number (text and value, respectively).

    Can you see where I am going wrong with this?  Any help would be appreciated.

    Thank you!

    Toby

    Oops. Good fishing. This should be pls.loadXML (form1.page1.footer.lots.rawValue, 0, 1);

  • My native BB app, how to connect to the remote URL and call a Web service method to retrieve the XML base result using Eclipse Version 3.7.2

    Hello

    I am new to the development of native applications from BB using JDE. I'm testing Simulator. From my native BB app, I connect a remote URL and call a Web service method to extract some basic result XML.

    I need to write a login code remote URL to achieve? If so, how?

    So, how can I use this connection object to call the Web service from this URL remotely.

    Please help me out of it...

    Many thanks in advance...

    What i am doing is, On clicking the "Login" button i want to call the webservice method like below mentioned code...
    Here WaveServices is a class and getAllCinemas() is a static method inside which a webservice method call is made..
    
    loginButtonField.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field paramField, int paramInt) {
                    WaveServices.getAllCinemas();
                }
            });
    

    Indeed, the question was raised and answered here:

    http://supportforums.BlackBerry.com/T5/Java-development/from-my-native-BB-application-how-to-connect...

Maybe you are looking for