return value of Web service

I have a web service and I am cfdumping the return variable, but I don't know how to get the value out.  That's what it gives me.

1

the com.nextaxiom.www.soapservice.xsd1.APApprovalList object

Name of the classcom.nextaxiom.www.soapservice.xsd1.APApprovalListMethods
Method Return type
Equals (Java.lang.Object)Boolean
getAlertDate()java.lang.String
getDescription()java.lang.String
getDeserializer (java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Deserializer
getInvoiceAmount()java.lang.Double
getPaymentReferenceNumber()java.lang.String
getSerializer (java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Serializer
getTypeDesc()org.apache.axis.description.TypeDesc
getUserName()java.lang.String
getVendorName()java.lang.String
hashCode()int
setAlertDate (java.lang.String)Sub
setDescription (java.lang.String)Sub
setInvoiceAmount (java.lang.Double)Sub
setPaymentReferenceNumber (java.lang.String)Sub
setUserName (java.lang.String)Sub
setVendorName (java.lang.String)Sub

If some of these fields I want, but I want the value: description, date of the alert, amt Bill, etc.  Can someone help me.  What should I do next to get the values?

Here is my statement of CF and the WSDL file.

Thanks for the help,

BJ

Rely on the statement

< cfinvoke

                                         webservice=" http://127.0.0.1:8500/APApproval/GetAPApprovalList.WSDL "

method = "GetAPApprovalList' refreshwsdl = 'true '.

returnvariable = "answer" >

< cfinvokeargument name = value "UserName" = "DAVBRY" / >

< / cfinvoke >

< cfoutput > #response # < / cfoutput >

WSDL FILE

<? XML version = "1.0"? >

<! - automatically generated Hyperservice Business Platform, NextAxiom technology, Inc. 07/10/2011 - >

" < definitions xmlns =" http://schemas.xmlsoap.org/wsdl/ "

Name = "BSAPrototype.APApproval.GetAPApprovalList"

" targetNamespace = ' http://www.nextaxiom.com/soapservice/BSAPrototype.APApproval.GetAPApprovalList/WSDL "

' xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ "

' xmlns:tns = ' http://www.nextaxiom.com/soapservice/BSAPrototype.APApproval.GetAPApprovalList/WSDL "

" container = ' http://www.w3.org/2001/XMLSchema "xmlns:xsd1 =" " http://www.nextaxiom.com/soapservice/xsd1 ">

< types >

" < scheme xmlns =" http://www.w3.org/2001/XMLSchema "

" elementFormDefault ="qualified"targetNamespace =" http://www.nextaxiom.com/soapservice/xsd1 ">

< element name = "GetAPApprovalList" >

< complexType >

<>sequence

< element name = "UserName" type = "string" / >

< / sequence >

< / complexType >

< / item >

< element name = "GetAPApprovalListResult" >

< complexType >

<>sequence

< element maxOccurs = "unbounded".

name = "APApprovalList" type = "xsd1:APApprovalList" / >

< / sequence >

< / complexType >

< / item >

< complexType name = "APApprovalList" >

<>sequence

< element minOccurs = '0' name = "User name" type = "string" / >

< element minOccurs = '0' name = "AlertDate" type = "string" / >

< element minOccurs = '0' name = "Description" type = "string" / >

< element minOccurs = '0' name = "PaymentReferenceNumber" type = "string" / >

< element minOccurs = '0' name = 'InvoiceAmount"type ="double"/ >

< element minOccurs = '0' name = "VendorName" type = "string" / >

< / sequence >

< / complexType >

< / schema >

< / types >

< name of message = "GetAPApprovalListRequest" >

< item = "xsd1:GetAPApprovalList" name = "GetAPApprovalList" / >

< / message >

< name of message = "GetAPApprovalListResponse" >

< item = "xsd1:GetAPApprovalListResult" name = "GetAPApprovalListResult" / >

< / message >

< portType name = "BSAPrototype.APApproval.GetAPApprovalListSoapPort" >

< operation name = "GetAPApprovalList" >

< input message = "tns:GetAPApprovalListRequest" / >

< output message = "tns:GetAPApprovalListResponse" / >

< / operation >

< / portType >

< name = "link BSAPrototype.APApproval.GetAPApprovalListSoapBinding" type = "tns:BSAPrototype.APApproval.GetAPApprovalListSoapPort" > "

" < soap binding: xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ "

" style = transport"document"=" http://schemas.xmlsoap.org/SOAP/HTTP "/>

< operation name = "GetAPApprovalList" >

< soap: operation

' xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ "soapAction =" urn:doc? in = GetAPApprovalList? out = GetAPApprovalListResult? path = BSAPrototype.AP Approval.GetAPApprovalList "/ > "

< input >

< use of soap: body = "literal" / >

< / Entry >

< output >

< use of soap: body = "literal" / >

< / output >

< / operation >

< / binding >

< name = "BSAPrototype.APApproval.GetAPApprovalList service" >

< port

"Binding ="TNS:BSAPrototype.APApproval.GetAPApprovalListSoapBinding"name =" BSAPrototype.APApproval.GetAPApprovalListPort ">

< address soap:

' xmlns:soap = ' http://schemas.xmlsoap.org/WSDL/SOAP/ "location =" " http://nextaxb:7777/NXAServer/NextAxiomServer "/>

< / port >

< / service >

< / definitions >

Sorry, I've been cfdump and cfoutput the #response # and off to see what each would give me.  In my code that I showed, I got probably the cfdump statement.

I finally understand that.  I continued to play with tags tables to figure out how it was to store the data.  After a bunch of statements of table, I felt the structure.

Thanks for the reply,

BJ

Tags: ColdFusion

Similar Questions

  • [ADF, JDev 12.1.3] Pop-up window to see the or download a PDF file that is returned by a Web service method

    Hallo,

    in a page of my web application, I need to add a button that when clicked shows a PDF in a pop-up window which enables the user to download on the PC.

    To get the file PDF, the application must call a Web service method that returns the contents of the file encoded in base64 in the body of the response. If the request does not get the file, but a stream that must be dealt with to get the file.

    Could you kindly advice me a good approach/tutorial to create this feature?

    Thank you and best regards,

    Federico

    Call your servlet ws, then convert bytes of payload in base64 and returns this as a binary stream.

    Client side, you can use af:inlineFrame component inside the af: popup to call your servlet.

    Here is example of servlet/inlineFrame part: https://technology.amis.nl/2011/07/28/adf-11g-show-pdf-in-a-popup/

    Dario

  • StatusCode values for web service?

    I'm checking the State of a long service by using a web service from a .NET application call. Therefore, I have access to the libraries of java where the StatusCode constants (enums?) are defined. Can someone be say a .NET library that I can in order to use the constant values of reference, or at least tell me what the whole are values, and I can do my own constants.

    In case it was not clear, I use webservice_invokeStatus (jobId).

    Thank you

    Mike doors

    Hi Mike,.

    Good news! I realized what is happening.

    The codes I posted have been associated with the process. They are process state codes.

    What you want is job-related. Here is the job status codes.

    JOB_STATUS_UNKNOWN = 0 (default)
    JOB_STATUS_QUEUED = 1
    JOB_STATUS_RUNNING = 2
    JOB_STATUS_COMPLETED = 3
    JOB_STATUS_FAILED = 4
    JOB_STATUS_TERMINATED = 5
    JOB_STATUS_SUSPENDED = 6
    JOB_STATUS_COMPLETE_REQUESTED = 7
    JOB_STATUS_TERMINATE_REQUESTED = 8
    JOB_STATUS_SUSPEND_REQUESTED = 9
    JOB_STATUS_RESUME_REQUESTED = 10

    see you soon,

    Parth

  • Can't get through the XML returned by the web service

    I'm using a .NET web service that returns the standard xml SOAP messages. After link "resultXML" to event.results [0], the variable displays its toString/toXMLString methods correctly and check the variable tree in the debugger displays the good exploration down. But browsing and/or variables affecting its children/descendants does not work properly. Variables are defined with the help of the. / operator or child/descendant methods are attached to something like XMLList(@8aa6701) without children and the toString methods return empty strings. I already tried to typecast between XML/XMLList and used methods of copy() with no results. Any suggestions?

    Found the answer to my own question. I needed to define and use the namespace defined in my SOAP message.

    http://livedocs.Adobe.com/Flex/3/HTML/data_access_6.html#194236

  • To access the soap headers to return Web service calls

    Is it possible to get the headers returned from a Web service?

    I tried to access it through the ResultEvent (event.message.headers), but it is unclear how it works.
    The debugger did not me any smarter either, nor documentation.


    Someone has an idea?


    Erik Pettersson

    Flexforum.org

    They are hidden in WebService.Operations.theMethod.resultHeaders

    This makes it a bit complicated to fetch from the result handler, if we do not know the operation he responds too (I'm looking for a way to get this info from the event).

    This would fit in the wish list:

    resultHeaders in the ResultEvent. Please, I beg you.

    Erik Pettersson

    Flexforum.org

  • 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);

  • Web service - &amp; gt; ComboBox

    I am just learning Flex. Decided to learn v2. I am filling a ComboBox from the data returned by a web service. I have spent hours searching through the documentation and examples, but have not been able to find help or examples. Anyone who has done this, and could you give me some examples, and possibly help? Here's the snippits of my code.

    The web service is a CF web service that returns a query with a (name) field in each record. I tested it witn CFML so I know it works. Also, I was able to fill a DataGrid with her.

    < mx:WebService id = "wsDSNinfo".
    "WSDL =" http://localhost:8500/test/DSNinfo/DSNinfo.cfc?wsdl "
    useProxy = "false".
    showBusyCursor = "true" >
    < name mx:operation = "getDSNinfo" > < / mx:operation >
    < name mx:operation = "VerifyDSN" > < / mx:operation >
    < mx:operation name = "getTables" >
    < mx:request >
    < theDSN > xpressline < / theDSN >
    < / mx:request >
    < / mx:operation >
    < name mx:operation = "getTableDetails" > < / mx:operation >
    < name mx:operation = "getTableRecords" > < / mx:operation >
    < / mx:WebService >

    < mx:ComboBox x = "10" y = "10" id = "cbxTables" dataProvider = "{wsDSNinfo.getTables.lastResult}" >
    < mx:Object label = "Name" data = "name" / >
    < / mx:ComboBox >

    Here is the error I get in developer.
    "Several initializers for the"dataProvider"property. (Remarque: "dataProvider» est la propriété par défaut de 'mx.controls.ComboBox').»
    I have an idea of what is happening, but havn't been able discover how to fix it.

    Thanks for any help you can give.

    Sincerely: Phil Spingola

    Thank you very much, Mike. It worked. The only different thing I had to do was type the labelField, uppercase 'NAME' value. I find that the existing doc not really helps me a lot. Is it just me, or are there more clear documents on the way. Your explanation is very clear and useful.

    Thanks: Phil

  • How to stop the success recorded by the web service to display two times answer


    I use the HTTP communication to send the entire PDF document to a web service.  I'm not having problems with the actual presentation.

    However, the status message "registered success' that is returned by the web service displayed twice.  Why?

    This is the response from the web service code.

    Context.Response.Clear)

    Context.Response.Buffer = True

    Context.Response.ContentType = "application/vnd. FDF.

    Context.Response.Write ("%FDF-1.2" & CRLF)

    Context.Response.Write ("1 0 obj < <" & CRLF)

    Context.Response.Write ("/ FDF < <" & CRLF)

    Context.Response.Write ("/ status (form successfully registered)" & CRLF ")

    Context.Response.Write ("> >" & CRLF)

    Context.Response.Write ("> >" & CRLF)

    Context.Response.Write ("endobj" & CRLF)

    Context.Response.Write ("trailer" & CRLF)

    Context.Response.Write ("< < / Root 1 0 R > >" & CRLF)

    Context.Response.Write("%%EOF")

    Context.Response.End)

    Thank you

    Diane Asberry

    I've upgraded to Adobe Reader XI and the problem disappeared.

    Thanks for your help.

    Diane Asberry

  • Data custom provider to invoke the Web Service

    Hello!

    When an order is created in OSM we invoke a Web service from the drive section rule of data via a data Instance in the component of the system of recognition of orders. In this way, we could produce a plan of orchestration that evaluates the information returned by the Web service.

    So we did research on data providers in the developer's Guide that says "a data custom provider when the provider is a class is part of the Design Studio project developed as part of a solution. It must implement the provider com.mslv class. oms.view.rule.ExternalInstanceAdapter interface.

    in the javadocs that we refer to the Interface ExternalInstanceAdapter, we find the details of the method:
    org. W3C. DOM. Element retrieveInstance(ViewRuleContext context, < java.lang.String, java.lang.Object > java.util.Map parameters)

    The developer's Guide also found that compiled class adapter must be added "the file in archive customization.jar oms.ear application" because it is necessary to decompress the osm.ear

    In this search for information I have do to reach my cartridges PIP research objective more precisely the 'CommunicationsSalesOrderFulfillmentPIP' project and found there a Custom Data provider exactly like 'OsmWebServiceAdapter' required and class of supplier was "com.mslv. oms.view.rule.adapter.OsmWebServiceAdapter "which is not found in the project, so I guess it should already be part of the file oms.ear.

    If anyone could tell me where to find the class that implements the data provider, I would be grateful if you could help me, because I have concerns on how to implement the method that I outlined in the javadocs and make the call to a web service.

    Thanks in advance.

    AndresG.

    Hi Andres;

    In your example, the $reuso contains the response to the web service operation, you call. $reuso will be the element to response document root (for example, the item: soap envelope). Yes, $reuso / soap: Body will be the body, etc. Note that you declare all your namespaces in xquery, you need to reference to navigate in your response to your element of document. Note that the element don't have a namespace, so this will make it a little more difficult navigation - better if possible to ensure that this item also has a name space as well.

    As for the source of your error, I suspect it's because you're trying to put all the contents of the soap envelope: in the ReusoInfraestructura element. Unless ReusoInfraestructura is a type of OSM XML component, OSM validation will fail because it does not meet the requirements of this type (only XML elements may themselves contain elements). Is there more information in the about the error stack trace?

    Brian.

  • 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

  • The OPA Web services return no values

    I tried to get the OPA web services to provide a decisive result, but it seems as if my values are not received correctly. I reduced my application to simple terms to see if I can get anything to come back, and maybe to see if someone can point out what is happening, or what Miss me.  The following transactions should bounce at least values, correct?

    Credits:

    Request:

    "< soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:typ ="http://oracle.com/determinations/server/10.4/rulebase/assess/types">" "

    < soapenv:Header / >

    < soapenv:Body >

    < type: evaluate request >

    < type: global instance >

    < typ:attribute id = "applicationClass' type = 'text' deducted ="false"result-style ="single value"unknown-result-style ="single value"known-result-style ="single value">

    < typ:text - val > A < / typ:text - val > < / typ:attribute >

    < / typ: global instance >

    < / typ: evaluate request >

    < / soapenv:Body >

    < / soapenv:Envelope >

    Answer:

    "" < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:i18n ="http://www.w3.org/2005/09/ws-i18n" xmlns:typ = "http://oracle.com/determinations/server/10.4/rulebase/assess/types" >. "

    < SOAP - ENV:Header >

    < i18n:international >

    en_US < i18n: local > < / i18n: local >

    < i18n:tz > GMT-0400 < / i18n:tz >

    < / i18n:international >

    < / SOAP - ENV:Header >

    < SOAP - ENV:Body >

    < type: assessment / response >

    < type: global instance >

    < typ:attribute id = "applicationClass' type = 'text' deducted ="false">

    < typ:unknown - val / >

    < / typ:attribute >

    < / typ: global instance >

    < / typ: assess / answer >

    < / SOAP - ENV:Body >

    < / SOAP - ENV:Envelope >

    Specific:

    Request:

    "< soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:typ ="http://oracle.com/determinations/server/10.4/DriverRoadtestEligibility_Excel/assess/types">" "

    < soapenv:Header / >

    < soapenv:Body >

    < type: evaluate request >

    < type: global instance >

    <! - you can enter the following 37 items in any order-->

    < typ:applicationClass type = "text" deducted = "false" result-style = "single value" unknown-result-style = "single value" known-result-style = "single value" >

    < typ:text - val > A < / typ:text - val >

    < / typ:applicationClass >

    < / typ: global instance >

    < / typ: evaluate request >

    < / soapenv:Body >

    < / soapenv:Envelope >

    Answer:

    "" < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:i18n ="http://www.w3.org/2005/09/ws-i18n" xmlns:typ = "http://oracle.com/determinations/server/10.4/DriverRoadtestEligibility_Excel/assess/types" >. "

    < SOAP - ENV:Header >

    < i18n:international >

    en_US < i18n: local > < / i18n: local >

    < i18n:tz > GMT-0400 < / i18n:tz >

    < / i18n:international >

    < / SOAP - ENV:Header >

    < SOAP - ENV:Body >

    < type: assessment / response >

    < type: global instance >

    < typ:applicationClass type = "text" deducted = "false" >

    < typ:unknown - val / >

    < / typ:applicationClass >

    < / typ: global instance >

    < / typ: assess / answer >

    < / SOAP - ENV:Body >

    < / SOAP - ENV:Envelope >

    Thank you

    It's very strange sound. It might be a problem caused by unnecessary attributes sent in the query. Try the following (generic example application).

    http://schemas.xmlsoap.org/SOAP/envelope/"xmlns:typ ="http://oracle.com/determinations/server/10.4/rulebase/assess/types">."

    A

    This application is the most correct for the following reasons:

    • You should not set the attributes type and deducted . These attributes are usually returned in the response and cannot be defined by the application.
    • You should not set the style of the result of an attribute that you provide the value of. It must always be returned in the response.

    That said, these points do not explain why the applicationClass value is returned as unknown. Perhaps the additional attributes in the query is triggering some bad server behavior of determinations which is the cause not to define the attribute.

    This regulation, if any, that you have associated with modules? You have any customization of the server determination or modules?

  • 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;
    
  • How to return a multiple registration with Oracle Native Web Service?

    Hi all

    I would like to know the native web service oracle can return multiple records of customer or not?

    I have successfully developed the native oracle web service to return only one record, but the next challenge is to develop the web service to return a multiple record (such as database on each department employees)

    Thank you and best regards,
    Zenoni

    I have successfully developed the native oracle web service to return only one record, but the next challenge is to develop the web service to return a multiple record (such as database on each department employees)

    You may return a list (multiple values/records) in XML (using CLOB or XMLType), CSV or JSON format or whatever.

    function get_employees (p_department_id in number) return clob
    as
    begin
      return 'your_xml_string_here';
    end get_employees;
    

    It would be up to the customer (the caller of the web service) to extract the values of any format you decide, of course.

    -Morten

    http://ORA-00001.blogspot.com

  • How to retrieve several values an adapter DB to a Web Service

    Hello

    I create a connection WS who receives the user name and password and returns the status of the user, the full name and a set of permissions (the number of permissions varies between users).

    To do this I created a DBAdapter who calls a PL/SQL procedure. This DBAdapter is connected to the Web Service connection through a mediator.

    I have two problems:

    1. I don't know the type of variable that the PL\SQL procedure must return. As I said I need to retrieve any number of values in a table (the user's permissions). How can I do this inside a PL\SQL procedure? What sort of structure I would stay?

    2 - How can I assign a variable of multiple value (the variable of permission) in the Ombudsman? Is the Ombudsman going to identify it as variable is multiple value and automatically add a for-each statement?


    The version im using Oracle DB is the 11.1.0.7.0 and the Oracle SOA Suite 11.1.1.3.0.

    Thanks in advance,
    Paulo

    You can generate an XMLType (of a VARCHAR2 variable, so) within the PL/SQL procedure. Please see-

    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28369/xdb10pls.htm

    Kind regards
    Anuj

  • 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.

Maybe you are looking for