Get xml data from a web service into Forms?

Hello folks! I am reading active directory info from a web service into forms via imported java classes. I can read from functions that return strings just fine, but I have to get the output from getGroupUsers which returns an XmlDataDocument. How do I read this in and parse it in Forms?
I will be grateful if y'all could point me to an example.
Thank you,
Gary
P.S. Here is a snippet of how I get the full name by passing an ID:
DECLARE
jo ora_java.jobject;
rv varchar2(100);
BEGIN
jo := ADSoapClient.new;
rv := ADSoapClient.getUserName(jo, 'user_ID');
:block3.fullname := rv;

Hello,
Since you are already dealing with server-side JAVA, I would suggest you create a method that would do the parsing server-side and what your PL/SQL will be dealing with is just the return string.
Here is a method I use to read an XML file (actually, it is an Oracle Reports file converted to XML) and from the string version, I will do search, replace and other things.
So, from getGroupUsers which returns an XmlDataDocument, you can adapt this method to get your data server-side and let the form module read the output data.
<blockquote>
private String processFileXml(String fileName, int iFile) throws ParserConfigurationException, SAXException,
IOException, XPathExpressionException{
try{                
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
InputStream inputStream = new FileInputStream(new File(fileName));
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(inputStream);
StringWriter stw = new StringWriter();
Transformer serializer = TransformerFactory.newInstance().newTransformer();
serializer.transform(new DOMSource(doc), new StreamResult(stw));
return stw.toString();
catch (Exception e){
System.err.println(e);
System.exit(0);
return "OK";
</blockquote>
Let me know if this is of nay help.
Thanks.

Similar Messages

  • XML data from a Web Service sometimes missing fields I need, any ideas on a trap?

    I get reports from our ERP via a web service to SSRS.  Just got asked to make a tweak in a report and find that the WebService only sends data that is needed for this transaction.  My issue is our entire system is based around EACH item we make. 
    New Trading Partner got Case Price.  We put two of our items together in a box for them is all that happened.
    Need to identify package column that had "ea" hard coded. 
    When I get a cs item there are more elements that identify conversion factor UOM etc.  They are only sent down for CASE items.  How do I trap for a column not being there 99.98555% of the time?
    _conv =  conversion factor.  I only receive it with a 2,4,6 in it whe4n the item is not an each. 
     =iif(Len(Fields!tcibd003_conv.Value) >0  , Fields!inh4470_qshp.Value / Fields!tcibd003_conv.Value , Fields!inh4470_qshp.Value  )
    How do I trap for this?  I tried Fields!tcibd003_conv.IsMissing but that didn't seem to work as expected.
    TIA

    Hello,
    Sorry, I cannot get your requirment and report design structure currently. Can you post the following information to us ? It is benefite us for further analysis.
    1. The fields in your dataset. You can post the dataset with sample data if it is convenient.
    2. The Report design structure: Table or Matrix and Group inforamation
    3. It seems that you want to filter the report data based on a expression, please post more details about the filter logic and expected result.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How to retrieve data from a web service

    Hi
    i am at very beginner level about web services.
    I am searching for a simple example of retrieving data from a web services, but cant find.
    How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
    Can somebody point out or give an example?
    Thanks in advance

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • How do I add dates from a web page into iCal?

    Hello. I would love to find a way to input dates from a web page, into iCal as an event. Right now, if there is a conference or whatever that is on such and such a date, I have to keep the web page open that has the dates and time, and then open iCal, and create a new event on that date, etc. Is there a way to highlight said dates on a web page, run some automation, and voila, it is a new event in iCal?

    Don't double tap. Just try pressing on the text. That should highlight it.

  • Get the data  from excel and insert into the database

    I want to read the data from excel file, get the data from excel and insert into the database.

    You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
    This has nothing to do with JSP/JSTL.

  • Converting string data from a web service respons into XML structure of XI

    Hi,
    We receive a string structure from a web service.
    The string structure has an xml type format, that is all the tags and its content are in one line .
    The WSDL file of the webservice defines its response structure as a string type.
    How do i convert this string into proper XML structure (predefined by me in Integration repository).
    OR how do i make XI understand this string as an XML structure for further processing.
    Later i have to map this XML message type into IDoc.
    Himani

    Hi Himani,
    Please find the code for ur requirement -
    String need to parse -<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>
    Below mentioned code will convert it to -<MT_DATA><FROMDATE>20080202</FROMDATE><TODATE>20080101</TODATE></MT_DATA>
    Create a Message type and map it like this using java mapping ( no need to use Graphical mapping).
    Use MT_DATA as source and map it to your target structure .
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class XMLParser {
         private Map param = null;
         public static void main(String[] args) {
              try {
                   XMLParser wdb = new XMLParser();
                   wdb.parse();
              } catch (Exception e) {
                   e.printStackTrace();
         public void setParameter(Map param) {
              this.param = param;
              if (param == null) {
                   this.param = new HashMap();
         public void parse() {
              String document = "<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>";
              try {
                   Document sdoc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   // Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   sdoc = db.parse(new InputSource(new StringReader(document)));
                   Element docEle = sdoc.getDocumentElement();
                   NodeList nl = docEle.getElementsByTagName("from_date");
                   Element lstElmnt = (Element) nl.item(0);
                   NodeList nl1 = docEle.getElementsByTagName("to_date");
                   Element fstElmnt = (Element) nl1.item(0);
                   System.out.println(fstElmnt.getFirstChild().getNodeValue());
                   System.out.println(lstElmnt.getFirstChild().getNodeValue());
                   Document tdoc = db.newDocument();
                   Element structure = createElement("MT_DATA", null, tdoc);
                   tdoc.appendChild(structure);
                   Element statement = createElement("FROMDATE", fstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement);
                   Element statement2 = createElement("TODATE", lstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement2);
                   System.out.println("Struct is :::"+tdoc.getDocumentElement().toString());               
              } catch (DOMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }  catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SAXException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (TransformerFactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static Element createElement(String elementName, String content,
                   Document document) {
              Element returnElement;
              returnElement = document.createElement(elementName);
              if (content != null) {
                   Text T = document.createTextNode(content);
                   returnElement.appendChild(T);
              return returnElement;
         static Element createElement(String elementName, String content,
                   String attributeName, String attributeValue, Document document) {
              Element returnElement = createElement(elementName, content, document);
              returnElement.setAttribute(attributeName, attributeValue);
              return returnElement;
    Regards,
    Kishore

  • How to create XML data source/ and load data from a web service to BI

    All,
    I m trying to find a 'how to' document (or any document) that shows how to create an XML data source to load data directly from a web service or from an XML file.
    I appreciate any help.

    Hi Mike,
    Two more for you:----
    /thread/111488 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/e6/1dd53bb90cbb1ae10000000a11402f/content.htm
    Regards,
    Suman

  • Trying to pass xml data to a web service

    I'm working on an Apex application that is required to pass data to a web service for loading into another (non Oracle) system. The web service expects two stings as input, the first string is simply an ID, the second string is an xml document. I generate an xml 'string' using PL/SQL in an on-submit process prior to invoking the web service. If I pass regular text for the second parameter, the web service returns an error message which is stored in the response collection and displayed on the page as expected. When I pass the the xml data, I get a no data found error and the response collection is empty. I have tried this in our development environment on Apex 3.1.2 (database version 10.2). I also tried this on our Apex 4.0.2 sandbox (with the same Oracle 10.2 database). I have found that once I have nested xml, I get the no data found message, if I pass partial xml data, I get the error response from the web service. Perhaps I am not generating the xml correctly to pass to the web service (this only just occurred to me as I write this)? Or is there an issue passing xml data from Apex to the web service? Any help will be greatly appreciated! here is the code I use to generate the xml string:
    declare
      cursor build_data  is
        select u_catt_request_buid,u_catt_request_name,u_catt_cassette_buid,u_catt_cassette_name
          ,u_project_name,u_sub_project,replace(u_nominator,'ERROR ','') u_nominator
          ,replace(replace(u_going_to_vqc,'Yes','true'),'No','false') u_going_to_vqc
          ,u_promoter,u_cds,u_terminator
          ,u_primary_trait,u_source_mat_prvd,u_pro_resistance_1,u_vector_type
          ,nvl(u_my_priority,'Medium') u_my_priority
          ,replace(replace(u_immediate_trafo,'Yes','true'),'No','false') u_immediate_trafo
          ,replace(replace(u_new_bps_cmpnt,'Yes','true'),'No','false') u_new_bps_cmpnt
          ,u_compnt_name,u_new_cmpt_desc,initcap(u_target_crop) u_target_crop,u_corn_line
          ,u_plant_selection,u_num_of_ind_events,u_num_plants_per_event,u_molecular_quality_events
          ,replace(replace(u_field,'Yes','true'),'No','false') u_field
          ,u_t1_seed_request,u_potential_phenotype,u_submission_date
          ,u_sequence_length,u_trait,u_frst_parent,u_frst_parent_vshare_id,u_cds_vshare_id
          ,constructid,cassetteid,description
        from temp_constructs_lims
        order by constructid,description;
      v_xml_info         varchar2(350);
      v_xml_header       varchar2(1000);
      v_xml_data         clob;
      v_xml_footer       varchar2(50);
      v_create_date      varchar2(10);
      v_scientist_name   v_users.full_name%type;
      v_scientist_email  v_users.email_address%type;
      v_primas_code      construct.fkprimas%type;
      v_nominator_name   v_nominators.full_name%type;
      v_file_length      number;
    begin
      -- initialize variables
      v_create_date := to_char(sysdate,'YYYY-MM-DD');
      v_xml_data := null;
      -- get name and email address
      begin
        select full_name,email_address
        into v_scientist_name,v_scientist_email
        from v_users
        where ldap_account = :F140_USER_ID; 
      exception when no_data_found then
        v_scientist_name := '';
        v_scientist_email := '';
        v_scientist_name := 'Test, Christine';
        v_scientist_email := '[email protected]';
      end;
      -- set up xml file 
      if :OWNER like '%DEV%' then
        v_xml_info := '
          <?xml version="1.0" encoding="utf-8"?>
          <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="deService"
                    xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
      else
        v_xml_info := '
          <?xml version="1.0" encoding="utf-8"?>
          <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="deService"
                    xsi:schemaLocation="deService http://mycompanyprod.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
      end if;
      -- populate xml header records
      v_xml_header := '<header xmlns="">
        <stdXmlVer>2.0</stdXmlVer>
        <sendingUnit>'||:P36_UNIT_NUMBER||'</sendingUnit>
        <sendingPerson>'||v_scientist_name||'</sendingPerson>
        <notification>'||v_scientist_email||'</notification>
        <creationDate>'||v_create_date||'</creationDate>
      </header>
      <entities xmlns="">
      for rec in build_data loop
        begin
          -- get primas code for current construct
          select fkprimas
          into v_primas_code
          from construct
          where constructid = rec.constructid;
        exception when no_data_found then
          v_primas_code := null;
        end;
        begin
          -- get nominator name for current construct
          select full_name
          into v_nominator_name
          from v_nominators
          where nominator_id = rec.u_nominator;
        exception
          when no_data_found then
            v_nominator_name := null;
          when invalid_number then
            v_nominator_name := catt_pkg.full_name_from_user_id(p_user_id => rec.u_nominator);
            v_nominator_name := 'Test, Christine';
        end;
        v_xml_data := v_xml_data||'
          <Construct>
          <requestBUID>'||rec.u_catt_request_buid||'</requestBUID>
          <requestName>'||rec.u_catt_request_name||'</requestName>
          <cassetteBUID>'||rec.u_catt_cassette_buid||'</cassetteBUID>
          <cassetteName>'||rec.u_catt_cassette_name||'</cassetteName>
          <scientist>'||v_scientist_name||'</scientist>
          <projectNumber>'||v_primas_code||'</projectNumber>
          <subProject>'||rec.u_sub_project||'</subProject>
          <comments>'||rec.description||'</comments>
          <nominator>'||v_nominator_name||'</nominator>
          <goingToVqc>'||rec.u_going_to_vqc||'</goingToVqc>
          <primaryTrait>'||rec.u_primary_trait||'</primaryTrait>
          <sourceMatPrvd>'||rec.u_source_mat_prvd||'</sourceMatPrvd>
          <prokaryoticResistance>'||rec.u_pro_resistance_1||'</prokaryoticResistance>
          <vectorType>'||rec.u_vector_type||'</vectorType>
          <priority>'||rec.u_my_priority||'</priority>
          <immediateTrafo>'||rec.u_immediate_trafo||'</immediateTrafo>
          <newComponent>'||rec.u_new_bps_cmpnt||'</newComponent>
          <componentName>'||rec.u_compnt_name||'</componentName>
          <newComponentDescription>'||rec.u_new_cmpt_desc||'</newComponentDescription>
          <targetCrop>'||rec.u_target_crop||'</targetCrop>
          <Line>'||rec.u_corn_line||'</Line>
          <plantSelection>'||rec.u_plant_selection||'</plantSelection>
          <numOfIndEvents>'||rec.u_num_of_ind_events||'</numOfIndEvents>
          <numOfPlantsPerEvent>'||rec.u_num_plants_per_event||'</numOfPlantsPerEvent>
          <molecularQualityEvents>'||rec.u_molecular_quality_events||'</molecularQualityEvents>
          <toField>'||rec.u_field||'</toField>
          <potentialPhenotype>'||rec.u_potential_phenotype||'</potentialPhenotype>
          </Construct>
      end loop;
      -- complete xml data   
      v_xml_footer := '
          </entities>
        </exchange>
      -- complete submission data
      :P36_XML_SUBMISSION := null;   
      :P36_XML_SUBMISSION := v_xml_info||v_xml_header||v_xml_data||v_xml_footer;
      :P36_XML_SUBMISSION := trim(:P36_XML_SUBMISSION);
    end;Here is an example of :P36_XML_SUBMISSION:
    <?xml version="1.0" encoding="utf-8"?> <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="deService" xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd"> <header xmlns=""> <stdXmlVer>2.0</stdXmlVer> <sendingUnit>10</sendingUnit> <sendingPerson>Test, Christine</sendingPerson> <notification>[email protected]</notification> <creationDate>2011-12-20</creationDate> </header> <entities xmlns=""> <Construct> <requestBUID>150000123</requestBUID> <requestName>AA0000123</requestName> <cassetteBUID>160000123</cassetteBUID> <cassetteName>AB000123</cassetteName> <scientist>Test, Christine</scientist> <projectNumber>T000123</projectNumber> <subProject>Discovery Plus</subProject> <comments>AA0000123 From CATT on 20-DEC-11 </comments> <nominator>Test, Christine</nominator> <goingToVqc>true</goingToVqc> <primaryTrait>promoter::intron::transit:gene::terminator</primaryTrait> <sourceMatPrvd>seed - stuff</sourceMatPrvd> <prokaryoticResistance></prokaryoticResistance> <vectorType>Plant Vector</vectorType> <priority>Medium</priority> <immediateTrafo>true</immediateTrafo> <newComponent></newComponent> <componentName>gene</componentName> <newComponentDescription>unknown function; sequence has some similarity to others</newComponentDescription> <targetCrop>Crop</targetCrop> <Line>Inbred</Line> <plantSelection>smidge ver2</plantSelection> <numOfIndEvents>6</numOfIndEvents> <numOfPlantsPerEvent>1</numOfPlantsPerEvent> <molecularQualityEvents>NA</molecularQualityEvents> <toField>true</toField> <potentialPhenotype></potentialPhenotype> </Construct> </entities> </exchange>My application page is accessed by an action from another page. The user reviews the data in a sql report region. When the use clicks on the Upload (SUBMIT) button, the xml string is generated first and then the web service is invoked. I have tried passing a simple string as the second parameter ("dummydata") and partial data in the xml string ("<sendingPerson>Test, Christine</sendingPerson>") the web service returns this error in both cases:
    Error[Validate Data]: (XML) = Data at the root level is invalid. Line 1, position 1.. Cannot validate the XML! Data Exchange not accepted!Once I pass the entire xml string above, I get an Oracle-01403: no data found error. I have opened the web service in IE and pasted my xml input string and received a valid, verified result, so I am sure that the generated xml is correct. I have spoken with the web service developer; there are no log entries created by the web service when I submit the full xml string, so I suspect the failure is in the Apex application.
    Thanks,
    Christine
    I should add that once I have nested tags in the xml, I get the Oracle no data found error ("<header xmlns=""> <stdXmlVer>2.0</stdXmlVer> <sendingUnit>10</sendingUnit> </header>"). I f I do not have nested tags in the xml ("<notification>[email protected]</notification> <creationDate>2011-12-20</creationDate>"), I get the web service response (error).
    Edited by: ChristineD on Dec 20, 2011 9:54 AM

    Ok, I think I'm getting closer to thinking this all the way through. When I have used clobs in the past, I've always used the DBMS_CLOB package. I use this to create a temp clob and then make the above calls. I had to go find an example in my own code to remember all of this. So, here is another suggestion... feel free to disregard all the previous code snippets..
    declare
      cursor build_data  is
        select u_catt_request_buid,u_catt_request_name,u_catt_cassette_buid,u_catt_cassette_name
          ,u_project_name,u_sub_project,replace(u_nominator,'ERROR ','') u_nominator
          ,replace(replace(u_going_to_vqc,'Yes','true'),'No','false') u_going_to_vqc
          ,u_promoter,u_cds,u_terminator
          ,u_primary_trait,u_source_mat_prvd,u_pro_resistance_1,u_vector_type
          ,nvl(u_my_priority,'Medium') u_my_priority
          ,replace(replace(u_immediate_trafo,'Yes','true'),'No','false') u_immediate_trafo
          ,replace(replace(u_new_bps_cmpnt,'Yes','true'),'No','false') u_new_bps_cmpnt
          ,u_compnt_name,u_new_cmpt_desc,initcap(u_target_crop) u_target_crop,u_corn_line
          ,u_plant_selection,u_num_of_ind_events,u_num_plants_per_event,u_molecular_quality_events
          ,replace(replace(u_field,'Yes','true'),'No','false') u_field
          ,u_t1_seed_request,u_potential_phenotype,u_submission_date
          ,u_sequence_length,u_trait,u_frst_parent,u_frst_parent_vshare_id,u_cds_vshare_id
          ,constructid,cassetteid,description
        from temp_constructs_lims
        order by constructid,description;
      v_xml_info         varchar2(350);
      v_xml_header       varchar2(1000);
      v_xml_data         clob;
      v_xml_footer       varchar2(50);
      v_create_date      varchar2(10);
      v_scientist_name   v_users.full_name%type;
      v_scientist_email  v_users.email_address%type;
      v_primas_code      construct.fkprimas%type;
      v_nominator_name   v_nominators.full_name%type;
      v_file_length      number;
      v_xml_body    varchar2(32767); --added by AustinJ
      v_page_item    varchar2(32767);  --added by AustinJ
    begin
      -- initialize variables
      v_create_date := to_char(sysdate,'YYYY-MM-DD');
      --v_xml_data := null;   --commented out by AustinJ
      dbms_lob.createtemporary( v_xml_data, FALSE, dbms_lob.session );  --added by AustinJ
      dbms_lob.open( v_xml_data, dbms_lob.lob_readwrite );  --added by AustinJ
      -- get name and email address
      begin
        select full_name,email_address
        into v_scientist_name,v_scientist_email
        from v_users
        where ldap_account = :F140_USER_ID; 
      exception when no_data_found then
        v_scientist_name := '';
        v_scientist_email := '';
        v_scientist_name := 'Test, Christine';
        v_scientist_email := '[email protected]';
      end;
      -- set up xml file 
      if :OWNER like '%DEV%' then
        v_xml_info := '
          <?xml version="1.0" encoding="utf-8"?>
          <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="deService"
                    xsi:schemaLocation="deService http://mycompany.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
      else
        v_xml_info := '
          <?xml version="1.0" encoding="utf-8"?>
          <exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="deService"
                    xsi:schemaLocation="deService http://mycompanyprod.com/webservices/apexdataexchange/schemas/RTPCATT.xsd">
      end if;
      -- populate xml header records
      v_xml_header := '<header xmlns="">
        <stdXmlVer>2.0</stdXmlVer>
        <sendingUnit>'||:P36_UNIT_NUMBER||'</sendingUnit>
        <sendingPerson>'||v_scientist_name||'</sendingPerson>
        <notification>'||v_scientist_email||'</notification>
        <creationDate>'||v_create_date||'</creationDate>
      </header>
      <entities xmlns="">
      for rec in build_data loop
        begin
          -- get primas code for current construct
          select fkprimas
          into v_primas_code
          from construct
          where constructid = rec.constructid;
        exception when no_data_found then
          v_primas_code := null;
        end;
        begin
          -- get nominator name for current construct
          select full_name
          into v_nominator_name
          from v_nominators
          where nominator_id = rec.u_nominator;
        exception
          when no_data_found then
            v_nominator_name := null;
          when invalid_number then
            v_nominator_name := catt_pkg.full_name_from_user_id(p_user_id => rec.u_nominator);
            v_nominator_name := 'Test, Christine';
        end;
        v_xml_body := '
          <Construct>
          <requestBUID>'||rec.u_catt_request_buid||'</requestBUID>
          <requestName>'||rec.u_catt_request_name||'</requestName>
          <cassetteBUID>'||rec.u_catt_cassette_buid||'</cassetteBUID>
          <cassetteName>'||rec.u_catt_cassette_name||'</cassetteName>
          <scientist>'||v_scientist_name||'</scientist>
          <projectNumber>'||v_primas_code||'</projectNumber>
          <subProject>'||rec.u_sub_project||'</subProject>
          <comments>'||rec.description||'</comments>
          <nominator>'||v_nominator_name||'</nominator>
          <goingToVqc>'||rec.u_going_to_vqc||'</goingToVqc>
          <primaryTrait>'||rec.u_primary_trait||'</primaryTrait>
          <sourceMatPrvd>'||rec.u_source_mat_prvd||'</sourceMatPrvd>
          <prokaryoticResistance>'||rec.u_pro_resistance_1||'</prokaryoticResistance>
          <vectorType>'||rec.u_vector_type||'</vectorType>
          <priority>'||rec.u_my_priority||'</priority>
          <immediateTrafo>'||rec.u_immediate_trafo||'</immediateTrafo>
          <newComponent>'||rec.u_new_bps_cmpnt||'</newComponent>
          <componentName>'||rec.u_compnt_name||'</componentName>
          <newComponentDescription>'||rec.u_new_cmpt_desc||'</newComponentDescription>
          <targetCrop>'||rec.u_target_crop||'</targetCrop>
          <Line>'||rec.u_corn_line||'</Line>
          <plantSelection>'||rec.u_plant_selection||'</plantSelection>
          <numOfIndEvents>'||rec.u_num_of_ind_events||'</numOfIndEvents>
          <numOfPlantsPerEvent>'||rec.u_num_plants_per_event||'</numOfPlantsPerEvent>
          <molecularQualityEvents>'||rec.u_molecular_quality_events||'</molecularQualityEvents>
          <toField>'||rec.u_field||'</toField>
          <potentialPhenotype>'||rec.u_potential_phenotype||'</potentialPhenotype>
          </Construct>
        ';    --modified by AustinJ
        dbms_lob.writeappend( v_xml_data, length(v_xml_body), v_xml_body);   --added by AustinJ
      end loop;
      -- complete xml data   
      v_xml_footer := '
          </entities>
        </exchange>
      -- complete submission data
      v_page_item := null;   
      v_page_item := v_xml_info||v_xml_header||wwv_flow.do_substitutions(wwv_flow_utilities.clob_to_varchar2(v_xml_data))||v_xml_footer;   --added by AustinJ
      :P36_XML_SUBMISSION := trim(v_page_item);   --added by AustinJ
        dbms_lob.close( v_xml_data);  --added by AustinJ
        if v_xml_data is not null then   
            dbms_lob.freetemporary(v_xml_data);   --added by AustinJ
        end if;  --added by AustinJ
    end;This code will use the Database to construct your clob and then convert it back to a varchar2 for output to your webservice. This makes more sense to me now and hopefully you can follow what the process is doing.
    You don't technically need the two varchar2(36767) variables. I used two for naming convention clarity sake. You could use just one multipurpose variable instead.
    If you have any questions, just ask. I'll help if I can.
    Austin
    Edited by: AustinJ on Dec 20, 2011 12:17 PM
    Fixed spelling mistakes.

  • Retrieve data from a web service.

    Hi,
    I need to retrieve the data from Oracle CRM On Demand therefore I downloaded the web service "CustomObject15" from Oracle CRM On Demand then used the netbeans Tool to generate XML files then call Web Service "CustomObject15" then I created small java code to retrieve the data through a web service but the data did not retrieved.
    Only retrieved "CustomObject15Data.CustomObject15Data@1be0799a"
    Kindly, Can you help me and provide me small java code to the data through a web service "CustomObject15".
    Best Regards.

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • Loading data from a web service to BW

    Hi
    I have a web service from a company we work with,
    It looks like http://xxxx.info/CustomerMissions.asmx
    I want to take the data that the web service returns and upload it into SAP BW.
    We are in BW 70105.
    I've read about the soamanager transaction and I want to know if that's the way to go.
    I've managed to run the transaction and started configuring it, but I couldn't find a good guide.
    Any suggestions?
    Shlomi

    Hi Sholmi,
    Have a look at this link.
    [http://www.****************/Tutorials/BI/WebService/Index.htm]
    Thanks,
    Vishall.

  • Possible to read data from a web browser into java?

    Is it possible to read data from a web browser such as IE or Mozilla into a java applet for use and manipulation? If it is, could someone please post some documentation I could look at or a snip-it of code I could use? Thanks.

    This will read the content from a site:
    import java.net.*;
    import java.io.*;
    class Test {
         public static void main(String[] argv) throws Exception {
              URL u = new URL("http://www.google.com");
              URLConnection uc = u.openConnection();
              BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
              String text;
              while( (text = br.readLine()) != null ) {
                   System.out.println(text);
    }

  • How can I get xml data from KM?

    Hi guys,
    how can i get a xml data from KM?
    I saved an xml document in KM, and I want to read its content. How can I get this document?
    Using
    DocResource = (IResource) resFactory.getResource(RID.getRID("Document/ Path"),resContext)?
    I want to know which kinds of API of KM are responsible for this.
    Thanks in advance
    Regards,
    Liying

    Hi Liying
    use this code.
    try {
                   IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
                   IUser sapUser = wdClientUser.getSAPUser();
                   com.sapportals.portal.security.usermanagement.IUser ep5User =
                        WPUMFactory.getUserFactory().getEP5User(sapUser);
                   IResourceContext resourseContext = new ResourceContext(ep5User);
                   IResourceFactory resourseFactory = ResourceFactory.getInstance();
                   RID pathRID =
                        RID.getRID(
                             "/documents/"(Path to folder where ur file is"");
                   ICollection collection =
                        (ICollection) resourseFactory.getResource(
                             pathRID,
                             resourseContext);
                   IResourceList resourceList = collection.getChildren();
                   IResourceListIterator resourceListIterator =
                        resourceList.listIterator();
    while (resourceListIterator.hasNext()) {
                        com.sapportals.wcm.repository.IResource resource =
                             resourceListIterator.next();
    try {
                             /*File from KM Reading*/
                             InputStream in = resource.getUnfilteredContent().getInputStream();
                             ByteArrayOutputStream out = new ByteArrayOutputStream();
                             byte[] buffer = new byte[4096];
                             int bytesread = 0;
                             while ((bytesread = in.read(buffer)) != -1) {
                                  out.write(buffer, 0, bytesread);
                             String dataToBeConvertedToXML = out.toString();
    catch(Exception e){}
    catch(Exception e){}
    Award points if found usefull.
    I suppose you have used KM sharing reference in ur application
    Regards
    BP

  • Import/Export xml data from subtree of dynamic XFA form

    Hi
    We would like to import/export xml data (subtree) of a dynamic xfa form. The following script does only work with static AcroForms:
    formular.content.subformDaten.Button1[1]::click - (JavaScript, client)
    event.target.exportAsXFDF({aFields:["formular[0].content[0].subformDaten[0]"]});
    With dynamic forms the script does export an empty xml file (no data is included, only xml root tag):
    <?xml version="1.0" encoding="UTF-8"?>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"
    ><f href="ExportTest_frei.pdf"
    /><ids original="EA43F92A6B6EA34F9C4DBBC2DA0B1840" modified="6A7C6282A167594F91240B773AA979A7"
    /></xfdf
    >
    Any ideas? Many thanks.
    Best regards,
    Daniel

    Hi Paul
    The Problem that Daniel posted was originally mine. Now after subscribing to this forum myself, I try to describe the aim of using exportAsXFDF/importAnXFDF.
    exportData("", false) and exportXFAData works, in my opinion, only with a DataConnection. In my form I have indeed such a connection for sending the whole form. But in addition I need the possibility to export and import only part of the data without overwriting the rest of the filled form.
    exportAsXFDF works with static forms. So there MUST be a possibility that works with dynamic forms, right?
    I hope anyone has a solution.
    Beat

  • How to update data from a web service

    Hi all,
    I have a webservice that returns some data as e4x type. I
    pull the data i need and put it into an object. I manipulate that
    data, then I want to write it back with another webservice. I get
    serialization errors when I call the update method. I must be doing
    something wrong here. Can anyone help?
    Webservice Methods:
    <mx:operation name="FetchfrmContact" resultFormat="e4x"
    result = "fetchfrmContactResultHandler()">
    <mx:request/>
    </mx:operation>
    <mx:operation name="updatefrmContactCampaigns"
    resultFormat="e4x"
    result="updatefrmContactCampaignsResultHandler()">
    <mx:request/>
    </mx:operation>
    Below is what .lastResult looks like from the fetch method of
    the webservice. I update the different campaign fields by adding or
    removing them in an object called contactData.
    <FetchfrmContactResponse xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="urn:DefaultNamespace" xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <FetchfrmContactReturn>
    <campaignsOptedOut>
    "BP - 411"
    </campaignsOptedOut>
    <campaignsOptedOut>
    "200700 - Avnet Leads"
    </campaignsOptedOut>
    <campaignsOptedOut>
    "200700 - BP-AdHoc"
    </campaignsOptedOut>
    <campaignsReceived>
    "BP - 411"
    </campaignsReceived>
    <campaignsSubscribed>
    "200700 - Avnet Leads"
    </campaignsSubscribed>
    <campaignsSubscribed>
    "200700 - BP-AdHoc"
    </campaignsSubscribed>
    <campaignsSubscribed>
    "200700 - BP - BCS"
    </campaignsSubscribed>
    <campaignsSubscribed>
    "200700 - BP - Extracomm"
    </campaignsSubscribed>
    <campaignsSubscribed>
    "200700 - BP - IBM"
    </campaignsSubscribed>
    <campaignsSubscribed>
    "BP - 411"
    </campaignsSubscribed>
    <companyDocID>
    "CMDPDN-65HTAK"
    </companyDocID>
    <companyName>
    "Provena Hospitals"
    </companyName>
    <contactDocID>
    "CTGSCG-6AHLWW"
    </contactDocID>
    <contactEmail>
    "[email protected]"
    </contactEmail>
    <contactFirst>
    "Steve"
    </contactFirst>
    <contactLast>
    "Rieger"
    </contactLast>
    <docID xsi:nil="true"/>
    <fetchBy>
    "email"
    </fetchBy>
    <form xsi:nil="true"/>
    <locationDocID/>
    </FetchfrmContactReturn>
    </FetchfrmContactResponse>
    The fetch method returns an object of type FrmContactType and
    the update method takes an object of type FrmContactType as it's
    parameter
    package com.psc.components
    import mx.collections.ArrayCollection;
    import mx.collections.XMLListCollection;
    [Bindable]
    public class FrmContactType
    // field variables
    public var contactDocID : String;
    public var companyDocID : String;
    public var locationDocID : String;
    public var campaignsOptedOut : XMLListCollection; //
    SFProfileField_70
    public var campaignsReceived : XMLListCollection; //
    SFProfileField_68
    public var campaignsSubscribed : XMLListCollection; //
    SFProfileField_69
    public var contactEmail : String = "";
    public var fetchBy : String;
    public var docID : String;
    public var form : String;
    public var contactFirst : String = "";
    public var contactLast : String = "";
    public var companyName : String = "";
    Here is the result handler of the fetch method
    private function fetchfrmContactResultHandler() : void
    contactData.contactFirst =
    wsfrmContactLookup.FetchfrmContact.lastResult..contactFirst;
    contactData.contactLast =
    wsfrmContactLookup.FetchfrmContact.lastResult..contactLast;
    contactData.companyName =
    wsfrmContactLookup.FetchfrmContact.lastResult..companyName;
    contactData.contactDocID =
    wsfrmContactLookup.FetchfrmContact.lastResult..contactDocID;
    if( wsfrmContactLookup.FetchfrmContact.lastResult )
    contactData.campaignsReceived = new XMLListCollection(
    wsfrmContactLookup.FetchfrmContact.lastResult..campaignsReceived );
    contactData.campaignsSubscribed = new XMLListCollection(
    wsfrmContactLookup.FetchfrmContact.lastResult..campaignsSubscribed
    contactData.campaignsOptedOut = new XMLListCollection(
    wsfrmContactLookup.FetchfrmContact.lastResult..campaignsOptedOut );
    if( contactData.campaignsSubscribed.length > 0 )
    for( var index : int = 0; index <
    checkBoxSubscribed.length; index++ )
    checkBoxSubscribed[index].selected = true;
    if( contactData.campaignsOptedOut.length > 0 )
    for( index = 0; index < checkBoxOptedOut.length; index++
    checkBoxOptedOut[index].selected = true;
    In my code I update the contactData object, then call the
    update method passing contactData as it's parameter and it barks at
    me. Any ideas why I'd be getting the error message shown below?
    <soapenv:Fault xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <faultcode>
    "soapenv:Server.generalException"
    </faultcode>
    <faultstring>
    "org.xml.sax.SAXException: SimpleDeserializer encountered a
    child element, which is NOT expected, in something it was trying to
    deserialize."
    </faultstring>
    <detail/>
    </soapenv:Fault>

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • Reading XML file from java web service

    Hi
    I am developing web service using Netbeans and the application server is glassfish.
    but I am facing a problem
    I have folder called "config" which will include the xml files. What I need to do setting path into that folder
    but it will read from another location when I am deploying it
    How to set our own path ?
    Error
    DPL5306:Servlet Web Service Endpoint [NewWebService] listening at address [http://kapila.epic.lk:8080/WebApplication2/NewWebServiceService]
    deployed with moduleid = WebApplication2
    java.io.FileNotFoundException: /root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    My "conifg" folder, i have put in to working directory but it will read from "/root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xm"
    below method is used for getting its contain value
    public String getMainCofig() {
                String v ="";
            try{
              DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
                        .newInstance();
              DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
              Document doc = docBuilder.parse(new File("OSconfig/MConfig.xml"));
              doc.getDocumentElement().normalize();
              NodeList listOfSPRMs = doc.getElementsByTagName("MainConfig");
              Node firstSPRMNode = listOfSPRMs.item(0);
              if (firstSPRMNode.getNodeType() == Node.ELEMENT_NODE) {
                   Element firstSPRAMElement = (Element) firstSPRMNode;
                   // Getting platform
                   NodeList server_port = firstSPRAMElement
                             .getElementsByTagName("RunningPlatform");
                   Element server_port_el = (Element) server_port.item(0);
                   NodeList server_port_List = server_port_el.getChildNodes();
                    v= ((Node) server_port_List.item(0))
                             .getNodeValue().trim();
            }catch (Exception e){
            e.printStackTrace();
                    return v;
    Regards
       

    I didn't quite get what the problem is but if the the desired file is in custom directory why don't you just use absolute path to reference it?
    Like: "/home/my/OSconfig/MConfig.xml"

Maybe you are looking for

  • My iPod Won't Restore

    OK, so I plug in my iPod Touch to my computer (Windows Vista) and its in recovery mode at the moment and i have to restore it but every time i try it doesn't work, i comes up with an error and then goes back to recovery mode. Any help? Ed

  • What adobe software do I use to design graphics for a 24 grid window display?

    Hi there, I know in some designing cases you use multiple programs to complete your design goal and I'm thinking this may be a case. If you could help me figure out what programs to use, I'd appreciate it. I have a large storefront window system that

  • Youtube videos randomly won't load

    I recently got a new modem, and ever since then I've noticed YouTube videos will randomly stop loading (particularly longer ones, although I have had short videos stop loading too). Switching to HTML5 video player seems to let me play videos without

  • How do you connect garage band to a mixer

    Anybody used garageband with a guitar as the input device and the garageband amps and stomps outputed through a mixer and PA live?

  • Setting up the notes programmatically

    Hi Guys,  We are developing a SharePoint 2013 app for a Club. We have two groups (Coaches, Players) . As a Coach, I want to setup Notes about a particular player in my team, These notes would be Comments or notes or simple text about the behavior of