Populate table with XML returned by a Web Service

Hi,
I have a web service that executes MulitipleRowQuiery and returns XML
variable.
When I set the data connection (in Designer) to this service in my
PDF form I'm getting "document" and "element" nodes under the
invokeResponce tree (data view palette).
How can I use this parameters in order to traverse the XML that was
returned by the WS?
What I need is to populate a table with this XML data..
Thanks, Rbuz.

You can use the XDP as is ...it is just this forum that will not accept XDP format. I have already made th erequest to get it changed and we are waiting for the next software update.
There are two sets of bindings for every object on a form. DataBindings allow you to import XML and bind the nodes to the fields and Execute bindings which are used with Web Services. I used your sample XML file as an input for data bindings and got it to work the way you want by using [*] in the binding instructions to indicate that more than one node was present there. This is not possible in the Execute bindings. You can only have a one to one relationship. So I do not think you can do it the way you want.
Can you get the WS to return you the entire XML as a single parameter? If so then you could bind that parm to a hidden field, then load all of the XML into the DataDom and use Data Bindings that do support what you are trying to do. I have included a sample that shows the table being filled the way you want using data binding.
You shoudl contact support and get an enhancement logged to get the WS bindings to act the same way.
Hope that helps
Paul

Similar Messages

  • Extracting Tag Value from XML returned when a web service via PL/SQL

    All,
    Good afternoon.
    I have a PL/SQL that called a web service. The code is as below:
    create or replace procedure soap3 as
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    bra number := 205;
    cus number := 134988;
    cur number := 1;
    led number := 0;
    sub number := 0;
    chq number := 1;
    n number;
    v_raw RAW(32767);
    buff RAW(32767);
    http_res UTL_HTTP.resp;
    blob_length INTEGER;
    chunk_size BINARY_INTEGER := 32767;
    blob_position INTEGER := 1;
    out_file UTL_FILE.FILE_TYPE;
    name VARCHAR2(256);
    value VARCHAR2(1024);
    v_buffer RAW(32767);
    begin
    soap_request := '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <Validate_Mandate xmlns="http://tempuri.org/Clearing_Workflow/Service1">
    <Bra_code>205</Bra_code>
    <Cus_num>134988</Cus_num>
    <Cur_code>0</Cur_code>
    <Led_code>0</Led_code>
    <sub_acct_Code>0</sub_acct_Code>
    </Validate_Mandate>
    </soap:Body>
    </soap:Envelope>';
    --DBMS_LOB.CREATETEMPORARY(buff,true);
    http_req := utl_http.begin_request('http://10.99.0.13/clearinginwards/InwardCheques.asmx',
    'POST',
    'HTTP/1.1');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req,
    'SOAPAction',
    'http://tempuri.org/Clearing_Workflow/Service1/Validate_Mandate'); -- required to specify this is a SOAP communication
    utl_http.write_text(http_req, soap_request);
    http_resp := utl_http.get_response(http_req);
    dbms_output.put_line('HTTP response status code: ' || http_resp.status_code);
    dbms_output.put_line('HTTP response reason phrase: ' || http_resp.reason_phrase);
    UTL_HTTP.read_raw(http_resp, buff, 32767);
    end;
    The response gotten from the web service is as below :
    open=F, temp=T, length=13256, chunksize=8132, data=3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E3C736F61703A456E76656C6F706520786D6C6E733A736F61703D22687474703A2F2F736368656D61732E786D6C736F61702E6F72672F736F61702F656E76656C6F70652F2220786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E63652220786D6C6E733A7873643D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D61223E3C736F61703A426F64793E3C56616C69646174655F4D616E64617465526573706F6E736520786D6C6E733D2268747470
    I do not understand what this output actually means as what the webservice returns is meant tio be a XML with a signature tag that contain an image of customers signature.
    Please I need help.

    Thanks for the responses thus far , but I think i need to properly define my problem so will be able to help me better.
    I have a webservice with the definition below :
    POST /NigMailService/nigmailservice.asmx HTTP/1.1
    Host: 10.2.15.157
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/GetImageDataTable_HT"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetImageDataTable_HT xmlns="http://tempuri.org/">
    <BranchCode>int</BranchCode>
    <CustomerNumber>int</CustomerNumber>
    <CurrencyCode>int</CurrencyCode>
    <LedgerCode>int</LedgerCode>
    <SubAccountCode>int</SubAccountCode>
    <ChequeNumber>int</ChequeNumber>
    <ClientCode>string</ClientCode>
    <wantedImageTypes>int</wantedImageTypes>
    <wantedImageSize_InPercent>int</wantedImageSize_InPercent>
    </GetImageDataTable_HT>
    </soap:Body>
    </soap:Envelope>
    and sample response :
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetImageDataTable_HTResponse xmlns="http://tempuri.org/">
    <GetImageDataTable_HTResult>xmlxml</GetImageDataTable_HTResult>
    </GetImageDataTable_HTResponse>
    </soap:Body>
    </soap:Envelope>
    My aim is to write a PL/SQL that will call the webservice and recieve the response which is definately a XML with an image that is meant to be written to a file in PL/SQL.
    Please how can i achieve this ?

  • Dynamic Table with XML Schema

    Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.

    Ivor,
    Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
    C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
    and the form samples.
    Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
    Steve

  • Facing problem while going to  catch return result from web-services.

    Hi everybody,
    I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
    When, I tried to catch the attribute and store to a temporary varilable using the following code:
    *<assign name="AssignQASDoGetAddress1">*
    *<copy>*
    *<from variable="InvokeQAS_DoSearch_OutputVariable"*
    part="body"
    query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
    *<to variable="temp"/>*
    *</copy>*
    *</assign>*
    but, I am facing the following selectionFailure errors after running it:
    *"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
    -<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
    Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
    *</summary>*
    *</part>*
    *</selectionFailure>*
    Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
    For your information, we are using Jdeveloper as the development tool for building the BPEL process.
    Am I doing any syntax error. Please consider it as urgent and provide me asolution.
    Thanks in advance.
    Chandrachur.

    Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
    <xs:element name="QASearchResult">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
    <xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
    </xs:complexType>
    </xs:element>
    <xs:complexType name="QAPicklistType">
    - <xs:sequence>
    <xs:element name="FullPicklistMoniker" type="xs:string" />
    <xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
    <xs:element name="Prompt" type="xs:string" />
    <xs:element name="Total" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="LargePotential" type="xs:boolean" default="false" />
    <xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
    <xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
    <xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
    <xs:attribute name="Timeout" type="xs:boolean" default="false" />
    </xs:complexType>
    <xs:complexType name="PicklistEntryType">
    - <xs:sequence>
    <xs:element name="Moniker" type="xs:string" />
    <xs:element name="PartialAddress" type="xs:string" />
    <xs:element name="Picklist" type="xs:string" />
    <xs:element name="Postcode" type="xs:string" />
    <xs:element name="Score" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="FullAddress" type="xs:boolean" default="false" />
    <xs:attribute name="Multiples" type="xs:boolean" default="false" />
    <xs:attribute name="CanStep" type="xs:boolean" default="false" />
    <xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
    <xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
    <xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
    <xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
    <xs:attribute name="Name" type="xs:boolean" default="false" />
    <xs:attribute name="Information" type="xs:boolean" default="false" />
    <xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
    <xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
    <xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
    <xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
    </xs:complexType>
    here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
    Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
    Thanks once again for your valuable suggestions...!!!
    Chandrachur.

  • Error in testing XML query result set web service

    Hi
    I was trying to test a <b>XML query result set web service</b> in BW system with tcode wsadmin but getting error like
    <b>Cannot download WSDL from http://ibmbtsb02.megacenter.de.ibm.com:8070/sap/bw/xml/soap/queyview?sap-client=001&wsdl=1.1&mode=sap_wsdl: F:\usr\sap\W70\DVEBMGS70\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\wsnavigator\root\WEB-INF\temp\ws1139464945296\wsdls\wsdlroot.wsdl (The system cannot find the path specified)</b>
    I had tried it first time few days ago and was able to test it successfully with the same configuration settings.
    Could any one of you please provide any suggestion on this?
    Thanks in advance
    Sudip

    hi
    check this links it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/e3072e65f04445a010847aa970b68b/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/frameset.htm
    Regards,
    Manoseelan

  • What are the different messages that OCOD may return for a web service requ

    Hi,
    Please give me feedback on the questions below, concerning the limitations of web service, and messages which may return.
    1) What are the different messages that OCOD may return for a web service request? I need all the messages of all the scenarios which OCOD can meet, for example:
    - If the file is rejected (Error message)
    - If the file is accepted (to clarify that the records have been created)
    - if the application is unavailable (maintenance or web service is down)
    2) How many request can we send simultaneously, and how many records we can make per second?
    Best Regard,

    Have a look here Jquery slideshow tutorial for beginners | WEBTUTS

  • SharePoint SiteMialbox failed with 503 error (AutoDiscover.svc web service call failed)

    SharePoint SiteMialbox failed with 503 error (AutoDiscover.svc web service call failed)
    I followed Technet articles to configure SiteMailBoxes in our environment & exchange sever.
    When we created Sitemailbox in a SiteCollection &when we try to open it, it failed with below error.
    Site Mailbox
    We are having trouble connecting to Exchange Server
    The server might be temporarily unavailable. Please check back on this page in a few minutes. If this problem persists, please contact your system administrator.
    Correlation ID: bb0fe99c-6f4e-e084-b191-881fbf0fa977, Error Code 10 
    ULS Log (503 error)
    Autodiscover Diagnostics Response Headers: request-id: 95d12ceb-283e-4495-b28b-256503fd097c  client-request-id: 742fe69c-ef5a-e084-ca05-6098c759c584  X-CalculatedBETarget: devapwxyz01a.devap.mydomain.com  X-FEServer: DEVNAABCD01B
     Content-Length: 0  Cache-Control: private  Date: Tue, 03 Feb 2015 18:53:40 GMT  Set-Cookie: X-BackEndCookie=; expires=Sun, 03-Feb-1985 18:53:40 GMT; path=/autodiscover; secure; HttpOnly  Server: Microsoft-IIS/8.5  X-AspNet-Version:
    4.0.30319  X-Powered-By: ASP.NET    
    742fe69c-ef5a-e084-ca05-6098c759c584
    if I am correct, X-CalculatedBETarget supposed to be DEVNAABCD01B.devna.mydomain.com but it connected to different domain devapwxyz01a.devap.mydomain.com.  Do you guys have any idea on this?  (I verified
    the same using fiddler, it is failing right at autodiscover.svc call.)
    I wrote a powershell script to connect autodiscover service in sharepoint server & this web service call able connect right server X-CalculatedBETarget. It gave the expected response.
    I am not sure why SharePoint webservice call (X-CalculatedBETarget) is going to different server?
    let me know if you guys have any ideas.
    Thanks.

    Thanks for the Response Raj.
    I already followed the same instructions in the Links.
    When SharePoint Autodisover.svc webservice send a request to Exchange server & Exchange server redirecting that request to different server, this is the problem i am facing right now.
    X-CalculatedBETarget
    supposed to be DEVNAABCD01B.devna.mydomain.com but it connected to different domain devapwxyz01a.devap.mydomain.com.
    Let me know if you have any suggestions?

  • XML DB as a web service provider

    Does anyone know where I can find some info/sample programs that use XML DB as a web service provider. I'd like to start publishing PL/SQL packages as web services and can't seem to find anything other than high-level info.
    Thanks for any responses.

    Just to note, I'm on 10.2.0.1.

  • SOAP vs. XML-RPC for synchronous Web Services applications

    Hi everyone, I have to finish one project soon and I have to make a decision. Because I don't have much time I want to ask if anyone can answer me, what are the major differences bettween SOAP vs. XML-RPC for synchronous Web Services applications. I'll be very grateful if you help me!
    Thanks in advance!

    Come on guys i know you can help me, please don't hesitate to write some row

  • Designer beginner's question: How to populate form with XML web service output?

    sorry, here is yet another Adobe Designer beginners question: <br /><br />My form uses a webservice data connection which returns <br />an xml-string like this: <br /><br /><?xml version="1.0" encoding="utf-16"?> <br /><CurrentWeather> <br />  <Location>Sion, Switzerland (LSGS) 46-13N 007-20E 481M</Location> <br />  <Time>Apr 26, 2007 - 09:50 AM EDT / 2007.04.26 1350 UTC</Time> <br />  <Wind> from the WSW (240 degrees) at 15 MPH (13 KT):0</Wind> <br />  <Visibility> greater than 7 mile(s):0</Visibility> <br />  <SkyConditions> partly cloudy</SkyConditions> <br />  <Temperature> 80 F (27 C)</Temperature> <br />  <DewPoint> 46 F (8 C) </DewPoint> <br />  <RelativeHumidity> 30%</RelativeHumidity> <br />  <Pressure> 29.88 in. Hg (1012 hPa)</Pressure> <br />  <Status>Success</Status> <br /></CurrentWeather> <br /><br />What is the simplest and recommended way to extract the <br />element fields to my form? <br /><br />Thank you very much an kind regards, <br />Hans Grund

    The question is still unanswered!
    Let me give some details and break up the problem
    in more specific questions:
    - In Designer 8.1 I click new data binding --> wsdl -->
    http://www.webservicex.net/globalweather.asmx?wsdl
    A message box comes up and says "cannot load wsdl file"
    ==> 1. Question:
    Why maybe refuses Designer to load the http-wsdl,
    although this option is explicitly allowed?
    - When I save the wsdl to a file, Designer loads it
    without any problems. The web service uses two input parameters
    (CountryName and CityName) and returns an xml-string GetWeatherResult)
    like the one in my first posting. I drag these fields from the binding view to my form, and it runs ok!
    - THE PROBLEM IS, THAT I NEET TO EXTRACT THE ELEMENT FIELDS
    FROM THE RESULT XML-STRING!
    ==> 2. Question:
    How to extract xml element fields from wsdl output into a form?
    - I tried with eclipse and XmlSpy to build a modified wsdl file
    with structured output definition, so that the specific element fields
    show up in the data binding view and are usable to my form,
    and the modified wsdl maps consistently to the web service result string.
    So far without success: In the PDF -preview or Reader-
    when the wsdl-binding is executed and the web service output
    should show up in the result fields, just nothing happens.
    ==> 3. Question:
    Can this strategy to provide a "modified wsdl" possibly succeed,
    and how?
    ==> 4. Question:
    Is is possible -and how?- to check whether an xml string
    is valid as web service output against the wsdl-definition?
    ==> 5. Question:
    How to debug a web service connection with Designer?
    - Finally I tried to find a way to load the result xml-string
    into a local var in the script editor and parse it, much like:
    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.load(DataSet.MyForm.GetWeatherResult.rawValue);
    ==> 6. Question:
    Is it possible -and how?- to use a framework like dotnet?
    How to utilize SAX or DOM in Designer?
    Many thanks and appreciations for your help!!

  • How to populate DataGird with data returned from php page?

    Hi, I'm new in Flex, I try to populate DataGrid with data from PHP, My code is
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false" method="POST" showBusyCursor="true" resultFormat="e4x">
    </ mx:HTTPService>
    <mx:DataGrid 
    id="searchResult" dataProvider="{???what to paste here???}" y="30">
    </mx:DataGrid>
    private  
    function getPerson(evt:ResultEvent):void { var res:XMLList = evt.result..dane as XMLList;searchResults =
    new XMLListCollection(res); 
    output from PHP
    <person>
    <dane>
    <name>ABC</name>
    <street>XLXXLX</street>
    </dane>
    <dane>
    <name>DEF</name>
    <street>YAYAYAY</street>
    </dane>
    </person>
    If I set the dataProvider as "searchResults" it doesn't work. I probably have to set as dataprovider any ArrayCollection , but I don't know how to convert my XMLListCollection to it.
    Could anyone help me populate Datagrid with
    name | streer
    ABC, XLXXLX
    DEF, YAYAYAY
    Best Regards,
    Mariusz

    Thanks for your reply, but I'm afraid it doesn't work :-( Could you browse my code and check what I'm doing wrong???
    full mxml code:
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="personRequest.send()">
    <mx:Script><![CDATA[
         import mx.rpc.events.ResultEvent; 
         [Bindable]
         public var searchResultsXML:XML;  
         private  function getPerson(evt:ResultEvent):void 
          {          searchResultsXML = (evt.result
    as XML);
              trace(searchResultsXML);     }
    ]]></mx:Script>  
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false"
    method="POST" showBusyCursor="true" resultFormat="e4x"></mx:HTTPService>
    <mx:DataGrid  id="searchResult" dataProvider="{searchResultsXML.dane}"></mx:DataGrid>
     </mx:Application> 
    trace statement returns:
    <person>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Nowogródzka</ulica>
    <dom>7B</dom>
    <lokal>25</lokal>
    </dane>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Sybiraków</ulica>
    <dom>15</dom>
    <lokal>27</lokal>
    </dane>
    </person>

  • Filling tables with XML data

    Hi!!
    I need help with this!! I don't know the right way to implement such a problem!
    Here is the scenario:
    I do have a number of tables (relations) created in MS Access and I do have an XML document now what I'm looking for is to fill these tables with data from the XML document!
    Here are the tables that I have (IDs are auto numbered fields)
    Table Name: datee
    Fields:
    1- datee_ID
    2- datee_day
    3- datee_month
    4- datee_year
    Table Name: paragraph
    Fields:
    1- paragraph_ID
    2- paragraph_String
    Table Name: month
    Fields:
    1- month_ID
    2- month_String
    Table Name: notee
    Fields:
    1- notee_ID
    2- notee_to
    3- notee_from
    4- notee_heading
    5- notee_datee_day
    6- notee_datee_month
    7- notee_datee_year
    Table Name: year
    Fields:
    1- year_ID
    2- year_String
    Table Name: day
    Fields:
    1- day_ID
    2- day_String
    Table Name: to
    Fields:
    1- to_ID
    2- to_String
    Table Name: from
    Fields:
    1- from_ID
    2- from_String
    Table Name: heading
    Fields:
    1- heading_ID
    2- heading_String
    Table Name: notee_paragraph
    Fields:
    1- notee_paragraph_ID
    2- notee_ParentID
    3- notee_paragraph_String
    Here is the XML document
    <notee>
    <to>Jane</to>
    <from>Tom</from>
    <heading>Reminder</heading>
    <paragraph>Hi</paragraph>
    <paragraph>Don�t be late!</paragraph>
    <datee>
    <day>13</day>
    <month>May</month>
    <year>2004</year>
    </datee>
    <to>Mark</to>
    <from>Ed</from>
    <heading>Invitation</heading>
    <paragraph>Hello</paragraph>
    <paragraph>Please come</paragraph>
    <paragraph>Take care</paragraph>
    <datee>
    <day>14</day>
    <month>March</month>
    <year>2004</year>
    </datee>
    </notee>
    I used DOM to parse the XML document but my only problem is in finding an algorithm that I should follow to fill in these tables!! so HOW!! I'm a bit confused??
    Any help or advice will be highly appreciated!

    For each of your elements, build a class representing the object. All your classes should have a method
    to create an instance of the class from an XML node (i.e. public static Object fromXML(Node)), and also
    a 'full constructor' (with parameters for all members of the class.
    Then, build utility classes to hold the table access.
    Short example for table DATEE:
    public class Datee {
       private int id;
       private byte day, month, year;
       public Datee(int id, byte day, byte month, byte year) {
          this.id = id;
          this.day = day;
          this.month = month;
          this.year = year;
       public static Object fromXML(Node node) {
          NamedNodeMap attributes = node.getAttributes();
          String strid = attributes.getNamedItem("id").getNodeValue();
          String strday = attributes.getNamedItem("day").getNodeValue();
          String strmonth = attributes.getNamedItem("month").getNodeValue();
          String stryear = attributes.getNamedItem("year").getNodeValue();
          try {
             id = Integer.parseInt(strid);
             day = Integer.parseInt(strday);
             month = Integer.parseInt(strmonth);
             year = Integer.parseInt(stryear);
          catch(Exception e) {
          return new Datee(id, day, month, year);
    }Its of course the simplest example. If instance contains other object instances, just use its fromXML() method to create it.
    Hope this helped,
    Regards.

  • Returning XML to client from web service

    Hi,
    I am new to developing web services using JAX_RPC. I am trying to return a xml document to the client from the web service.
    My Server implementation is as follows:
    Interface:
    public interface OntoIF extends Remote
    public DataHandler ontoCompare (String targetUrl,String sourceUrl ) throws RemoteException;
    Implementaion:
    public class OntoImpl implements OntoIF
    public DataHandler ontoCompare (String targetUrl,String sourceUrl ) throws RemoteException
    DataHandler dataHandler = new DataHandler( new StreamSource( new File ("status.xml")), "text/xml");
    return dataHandler;
    Client Implementation:
    Stub stb = (Stub) (new OntoService_Impl().getOntoIFPort());
    stb._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
         "http://localhost:8080/onto-service/onto");
    OntoIF onto = (OntoIF) stb;
    DataHandler retDHandler = onto.ontoCompare(targetOntoUrl, sourceOntoUrl);
    When I compile and run my client, it throws the following error -
    java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
    at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
    va:497)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294
    at sstub.OntoIF_Stub.echoDataHandler(OntoIF_Stub.java:122)
    at sstub.OntoClient.main(OntoClient.java:63)
    Can you please let me know what I am doing wrong? I have no problems in sending a DataHandler but receiving the DataHandler from the web service throws errors.
    Thanks!

    Hi I'm having the same problem. I try to set up a Web Service using JAX_RPC. My WS should invoke a native Method implemented in C++. Did you got a solution for this issue? My Error Message is as follows:
    java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
         at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:497)
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294)
         at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
         at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:489)
         at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:122)
         at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:86)
    at $Proxy0.getHello(Unknown Source)
         at com.neuhaus.test.ws.client.NativeInvokeClient.main(NativeInvokeClient.java:44)
    Exception in thread "main"
    greetings, JAN

  • Generating table with XML Type column while registering schema

    Hi,
    Is it possible to generate a table with an XML Type column during schema registering. Does the "xdb:defaultTable" always create an XMLType table?
    Thanks.
    Rahul

    "You can create XML schema-based XMLType tables and columns and optionally specify, for example, that they:Conform to pre-registered XML schema ."
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb01int.htm

  • Return XML from MVC WebAPI Web Service

    The tutorials to create a web service using MVC WebAPI (frmaework4.5) in VS 2013  is touted as being "very simple" to return JSON or XML.
    But then, all you get is JSON. When you want to return a plain ole' string of XML ... there is no clear documentation. I see a bunch of posts where people are referencing the ActionResult method ... which is not in the APIController class... so that implies
    to me that I need to roll my own from the Controller class. That doesn't seem right to me.
    So ... how does one return an XML string from an MVC WebApi application?
    * the list of "questions similar to yours" that this forum presents me either:  a) are for ASMX in VS 2008 or b) do not work.
    Any direction to some documentation is appreciated.
    Thanks

    Hi,
    If this issue is related to MVC, you could ask this question in the ASP.NET forum:
    http://forums.asp.net. If then, you could get an answer more quickly and professional. Maybe the
    WCF, ASMX and other Web Services forum will be better for this issue. Thanks for your cooperation.
    Have a nice day,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Can I download two different itunes accts on the same computer

    Can I downloan two different Itunes accounts on the same computer under different users???  I have 3 Iphones and they don't want to share an itunes acct.

  • Is there a way to disable stereo bluetooth in OS3 but keep Hands Free?

    Hi All, I've been a huge fan of my 3G since purchasing it last September and have adored it even more since buying my 2009 Acura TSX. The car and phone seemed built for eachother and have worked seamlessly together since I bought the car in November.

  • SQL command Question

    Hello all! Is my bold condition on sql statement bellow correct? select vbeln posnr aubel aupos vgbel vgpos matnr into table it_vbrp    from vbrp    for all entries in it_mseg_vbfa <b>   where vgbel = it_mseg_vbfa-xblnr(10)</b>    and   matnr = it_ms

  • Firefox does not open and support article has not helped

    Firefox will not start when I click on the icon on my desktop but it shows up under Processes in the Task Manager. I have read the related support articles, but it has not solved my problem. I have previously been using Firefox normally.

  • Organizing Itunes Library: Numbers First

    I recently updated my Itunes and afterwards the artists whose names begin with a number (2pac, 311, 50 cent...) are at the bottom of my library after "Z". I know its a little anal, but, I liked those artists in front of the "A" artists. Does anybody