Passing whole xml to a string

Dear Experts,
      i want to pass the whole input xml as a string to the UDF which does a soap look up . how do we do it ?
It is file to soap lookup to jdbc. 
     Qos would normally be that of the sender. In the case of soap lookup , where do we specify the QOS?
    Does the soap reciever adapter make use of wsdl while creating the soap request , and if yes , how ?
Thanks,
Aju

Hi Aju,
Passing the whole input as a string can be easily achieved through java mapping. Use the following code in the execute method of your java class:
     StringBuffer strbuffer = new StringBuffer();
     byte[] b = new byte[[4096]];
     for (int n; (n = in.read(b)) != -1;)
     strbuffer.append(new String(b, 0, n));
     data = strbuffer.toString();
For more on SOAP lookUp use this blog:
Webservice Calls From a User Defined Function.
Thanks and Regards,
Sanjeev.

Similar Messages

  • How to pass a xml CDATA in string element when OSB calling a webservice?

    How to pass a xml CDATA in string element when OSB calling a webservice?
    I have a business service (biz) that route to operation of a webservice.
    A example of request to this webservice legacy:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
    <soapenv:Header/>
    <soapenv:Body>
    <ex:execute>
    <ex:arg><![CDATA[<searchCustomerByDocumentNumber>
    <documentNumber>12345678909</documentNumber>
    </searchCustomerByDocumentNumber>]]></ex:arg>
    </ex:execute>
    </soapenv:Body>
    </soapenv:Envelope>
    the type of ex:arg is a string.
    How to pass this CDATA structure to webservice in OSB?

    Steps to solve this problem:
    1. Create a XML Schema. E.g.:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="unqualified">
         <xs:complexType name="searchCustomerByDocumentNumber">
              <xs:sequence>
                   <xs:element name="documentNumber" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation>
                             </xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string" />
                        </xs:simpleType>
                   </xs:element>
         </xs:sequence>
         </xs:complexType>
         <xs:element name="searchCustomerByDocumentNumber" type="searchCustomerByDocumentNumber"></xs:element>
    </xs:schema>
    With this XSD, the XML can be generate:
    <?xml version="1.0" encoding="UTF-8"?>
    <searchCustomerByDocumentNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="searchCustomerByDocumentNumber.xsd">
    <documentNumber>documentNumber</documentNumber>
    </searchCustomerByDocumentNumber>
    2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
    (:: pragma bea:global-element-return element="searchCustomerByDocumentNumber" location="searchCustomerByDocumentNumber.xsd" ::)
    declare namespace xf = "http://tempuri.org/NovoSia/CreateSearchCustomerByDocumentNumber/";
    declare function xf:CreateSearchCustomerByDocumentNumber($documentNumber as xs:string)
    as element(searchCustomerByDocumentNumber) {
    <searchCustomerByDocumentNumber>
    <documentNumber>{ $documentNumber }</documentNumber>
    </searchCustomerByDocumentNumber>
    declare variable $documentNumber as xs:string external;
    xf:CreateSearchCustomerByDocumentNumber($documentNumber)
    3. In your stage in pipeline proxy add a assign calling the XQuery created passing the document number of your payload.
    Assign to a variable (e.g.: called searchCustomerByDocumentNumberRequest)
    4. Create another XQuery Transformation (XQ) to create a request to the webservice legacy. E.g.:
    <ex:arg>{fn-bea:serialize($searchCustomerByDocumentNumberRequest)}</ex:arg>
    For more information about xquery serialize function:
    41.2.6 fn-bea:serialize()
    You can use the fn-bea:serialize() function if you need to represent an XML document as a string instead of as an XML element. For example, you may want to exchange an XML document through an EJB interface and the EJB method takes String as argument. The function has the following signature:
    fn-bea:serialize($input as item()) as xs:string
    Source: http://docs.oracle.com/cd/E14571_01/doc.1111/e15867/xquery.htm

  • How to parse whole xml elements into a java String

    hello everybody,
    I am trying to parse whole xml into a string for example
    my xml file is as below:
    <root>
        <element>
           <data id="1">1</data>
        </element>
        <element>
           <data id="2">2</data>
        </element>
    </root>
    in java whole data should be transfered as
    String xmlString ="<root><element><data id=\"1\">1</data></element><element><data id=\"2\">2</data></element></root>";or in a simple way can xml be copied into a string? any assistance ...
    thanQ in Advance.
    Han.

    This code is to convert xml document to a string.
                             try {
                                  javax.xml.transform.TransformerFactory tfactory = TransformerFactory.newInstance();
                                  javax.xml.transform.Transformer xform = tfactory.newTransformer();
                                  javax.xml.transform.Source src = new DOMSource(xmlString);
                                  java.io.StringWriter writer = new StringWriter();
                                  StreamResult result = new javax.xml.transform.stream.StreamResult(writer);
                                  xform.transform(src, result);
                                  //System.out.println(writer.toString());          
                             } catch (TransformerConfigurationException e) {
                                  e.printStackTrace();
                             }catch(Exception ex )
                                  ex.printStackTrace();
                             }

  • XML into one string element

    Hello,
            In Graphical mapping, Could anyone pls tell me in detail about how to achieve One whole xml into one string element. This XML file i want to send to DATABASE.

    Thi blog might be of some help
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

  • How to receive a xml CDATA in string element when OSB calling a webservice?

    How to receive a xml CDATA in string element when OSB calling a webservice?
    I have a business service (biz) that route to operation of a webservice.
    A example of response to this webservice legacy:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
    <soapenv:Header/>
    <soapenv:Body>
    <ex:executeResponse>
    <ex:arg><![CDATA[<searchCustomerByDocumentNumberResponse>
    <name>John John</name>
    </searchCustomerByDocumentNumberResponse>]]></ex:arg>
    </ex:executeResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    the type of ex:arg is a string.
    How to receive this CDATA structure to webservice in OSB?

    Similiar to the answer How to pass a xml CDATA in string element when OSB calling a webservice?
    Use the xquery function fn-bea:inlinedXML rather than fn-ben:serialize
    Steps to solve this problem:
    1. Create a XML Schema. E.g.:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="unqualified">
    <xs:complexType name="searchCustomerByDocumentNumberResponse">
    <xs:sequence>
    <xs:element name="name" minOccurs="0">
    <xs:annotation>
    <xs:documentation>
    </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string" />
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="searchCustomerByDocumentNumberResponse" type="searchCustomerByDocumentNumberResponse"></xs:element>
    </xs:schema>
    2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
    3. Create a XQuery Transformation (XQ) to get the CDATA response to the webservice legacy. E.g.:
    declare namespace ns0 = "novosiaws";
    declare function xf:getReponse($searchCustomerByDocumentNumberResponse as element(ns0:searchCustomerByDocumentNumberResponse))
    as element(searchCustomerByDocumentNumberResponse) {
    fn-bea:inlinedXML($searchCustomerByDocumentNumberResponse/ns0:arg)
    For more information about xquery function:
    fn-bea:inlinedXML
    The fn-bea:inlinedXML() function parses textual XML and returns an instance of the XQuery 1.0 Data Model.
    The function has the following signature:
    fn-bea:inlinedXML($text as xs:string) as node()*
    where $text is the textual XML to parse.
    Examples:
    fn-bea:inlinedXML(“<e>text</e>”) returns element “e”.
    fn-bea:inlinedXML(“<?xml version=”1.0”><e>text</e>”) returns a document with root element “e”.
    Source: http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html

  • Passing / parsing XML String IN / OUT from PL / SQL package

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

  • How to pass a XML message as a string and to change the string back to XML

    Hi there,
    in our current application, we have to access a webservice with a message whose XML Schema Definition was provided by the service's provider. But when accessing the webservice's WSDL, it says that the service expects the message part as a string type.
    How can I accomplish to send this structured message (as defined by the .XSD) to the webservice as a string?
    Thanks in advance,

    Michal,
    thanks very much for your help!
    I've managed to correctly serialize a xml into a string with the tips in your blog. However, I've not managed to perform the string -> xml (unserialize) step (I'm using Udo's sugestion).
    The problem is that XI generates a namespace prefix in runtime (it can be ns0, ns1, ns2..., depending on the context), and so I need to reference this namespace into the unserializing XSLT. With XMLSpy, I've managed to correctly transform it using the XPath "//*:my_tag" to the string tag, but this approach didn't work in XI.
    If I try to use just "//my_tag" the transformation concludes successfully, but XI says that the generated XML is not well-formed (probably because it doesn't fits the Schema of the target message, but I'm just guessing here). If I try to use "//:*my_tag", it doesn't even performs the transformation, and gives a "Problem When Testing" error, which says "Transformer configuration exception occurred when loading XSLT ...".
    Any ideas on how to reference namespace prefixes in XSLTs in XI?
    The codes of my XSLT's are below:
    XML to string:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <my_tag>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="/"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </my_tag>
    </xsl:template>
    </xsl:stylesheet>
    String to XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my_prefix="http://my_namespace">
    <xsl:template match="/">
    <xsl:for-each select="//*:my_tag">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Thanks again!

  • Passing an XML file from WebDynpro app to ABAP function module

    Hi all,
    I'm stuck with a problem, and am hoping one of you could let me know how to proceed:
    I need to pass an XML file (or at least the entire content of the XML) from my WebDynpro application to a backend ABAP function module. What I tried was this:
    In my WebDynpro app, I read the XML and convert the content into one long string (using java.io.FileReader and java.io.BufferedReader). In my ABAP function module I created an import parameter of type String. I then imported the ABAP Function module into my WebDynpro app as a model. I then tried to pass the XML string to the ABAP module. What happens is this:
    If the size of the string (XML) happens to be less than 255 characters, then it works. That is, the string is passed to the ABAP function module and I can see the contents. However, if the XML string happens to be greater than 255 characters, then it does not work. The string at the ABAP side is empty. Surprisingly, the ABAP module does not throw an error either. It just displays an empty string.
    Could you please tell me what the problem is?
    Thanks & Regards,
    Biju

    Hi Biju ,
    Welcome to SDN.
    If the import parameter is defined as type string it should work, however did you check whether your application pass it properly?
    I have applications using strings as import parameters working fine. (webapplications (BSP) to RFC)
    Regards
    Raja

  • Problem in sending XML input as String in BPEL

    Hi,
    We have a BPEL flow (assign, invoke, assign) which takes an XML input as String.
    <RegisterCustomerOnVAS><CustomerID>100</CustomerID><MSISDN>9999999</MSISDN><CustomerName>sanjeev</CustomerName><customerInfo>new user</customerInfo></RegisterCustomerOnVAS>
    Assignment is doing fine, but when Invoke calls partner link, the input is getting parsed and only the first text value (eg 100) is getting passed to the partner webservice instead of the entire XML as string.
    Can any one please help us in fixing in this problem.
    Thanks

    Hi,
    You should watch your assign activity (maybe a bad assigment level in copy rule). I think the probem is there.
    Cyryl

  • Can I pass variables in the URL string?

    I am trying to get some variables into a loaded swf at
    runtime. The variables will carry information so the swf can load
    the correct xml file. I thought we could pass them through the URL
    string like so:
    new URLRequest("testing.swf?myVar=varOne
    but it just throws an URL cannot be found error. How can I
    get variables into my swf at runtime?

    What you are doing is fine. But you will always get that
    error when testing
    the movie (Ctrl+Enter). Try it in a browser and it should
    work.
    BTW, another way of doing the same is to use a URLVariables
    object, like so:
    var req:URLRequest = new URLRequest("testing.swf");
    var vars:URLVariables = new
    URLVariables("myVar=varOne&myVar2=varTwo");
    req.data = vars;

  • Problem passing a XML parameter

    Mrs,
    I need to pass a XML parameter from an OAF page to an external page. Below there is a piece of code where I did it at first (through parameters - GET). The problem: the XML has a variable length, so it can be bigger than GET limits.
    How could I pass it via POST? Put it on an OAFormValueBean doesn't seems to be a good answer, since XML tags ("<" and ">") and accents (we use Portuguese - BR) get processed in &xxx; notation. Therefore, as you can see, the page it's only used to mount XML and call another page.
    Dev Guide has a chapter "Posting to an OA Framework Page from a Different Technology". I think I need something like "POSTING FROM AN OA FRAMEWORK PAGE TO A DIFFERENT TECHNOLOGY".
    Any ideas?
    Tks.
    Elner Ribeiro
    CODE:
    processRequest()
    String xmlData = "<ReservaMultiGDSRoot>" + xmlPassag + xmlContato + "</ReservaMultiGDSRoot>";
    HashMap par = new HashMap();
    par.put("XmlData",xmlData);
    par.put("UrlPostBack","https://oafHost/OA_HTML/OA.jsp?page=/oracle/apps/xx/xx/webui/xxPG");
    pageContext.forwardImmediately("http://externalUrl/page.aspx",
    OAWebBeanConstants.REMOVE_MENU_CONTEXT,
    par,
    false,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    }

    forwardImmediately would just forward the request to the indicated resource.
    "POSTING FROM AN OA FRAMEWORK PAGE TO A DIFFERENT TECHNOLOGY".
    doing this means you are leaving the apps context and going to a different location, which is out of apps security.As a workaround what you can do is:
    1. Create a jsp in $OA_HTML
    2. From your OA page, navigate to this jsp, as a normal url link destination
    3. in the jsp, use ServletSessionManager.getURL ("<url>") and then post the data to the page you want to visit.
    4. Remember to define a function in the same menu to navigate to the jsp.
    Thanks
    Tapash

  • Plsql - store function - passing a NULL or empty string argument

    Please see the question I posed below. Does anyone have experience with passing a NULL or empty string to a store function? THANKS.
    Hi All,
    I have a function that takes in two string arrays, status_array, and gender_array. You can see the partial code below. Somehow if the value for the string array is null, the code doesn't execute properly. It should return all employees, but instead it returns nothing. Any thoughts? THANKS.
    for iii in 1 .. status_array.count loop
    v_a_list := v_a_list || '''' || status_array(iii) || ''',';
    end loop;
    v_a_list := substr(v_a_list, 1, length(trim(v_a_list)) - 1);
    for iii in 1 .. gender_array.count loop
    v_b_list := v_b_list || '''' || gender_array(iii) || ''',';
    end loop;
    v_b_list := substr(v_b_list, 1, length(trim(v_b_list)) - 1);
    IF v_a_list IS NOT NULL and v_b_list IS NOT NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') and gender in (' || v_b_list || ')';
    ELSIF v_a_list IS NOT NULL and v_b_list IS NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') ';
    ELSIF v_a_list IS NULL and v_b_list is not null THEN
    v_sql_stmt := 'select distinct full_name from t_employee where gender in (' || v_b_list || ')';
    ELSE
    v_sql_stmt := 'select distinct full_name from t_employee';
    END IF;
    OPEN v_fullname_list FOR v_sql_stmt;
    RETURN v_fullname_list;

    Not sure what version of Oracle you are using, so here's an approach that will work with many releases.
    Create a custom SQL type, so we can use an array in SQL statements (we'll do that at the end).
    create or replace type string_list is table of varchar2(100);
    /declare your A and B lists as the type we've just created
    v_a_list    string_list default string_list();
    v_b_list    string_list default string_list();populate the nested tables with non-null values
    for iii in 1 .. status_array.count
    loop
       if status_array(iii) is not null
       then
          v_a_list.extend;
          v_a_list(v_a_list.count) := status_array(iii);
       end if;
    end loop;Here you'd want to do the same for B list.
    Then finally, return the result. Using ONE single SQL statement will help a lot if this routine is called frequently, the way you had it before would require excessive parsing, which is quite expensive in an OLTP environment. Not to mention the possibility of SQL injection. Please, please, please do some reading about BIND variables and SQL injection, they are very key concepts to understand and make use of, here's an article on the topic.
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1922946900346978163]
    So here we ask for the distinct list of full names where either the status and the gender qualify based on the input data, OR the array passed in had no data to restrict the query on (the array.count = 0 does this).
    OPEN v_fullname_list FOR
       select
          distinct
             full_name
       from t_employee
       where
          status in (select /*+ CARDINALITY ( A 5 ) */ column_value from table(v_a_list) A )
          or v_a_list.count = 0
       and
          gender in (select /*+ CARDINALITY ( B 5 ) */ column_value from table(v_b_list) B )
          or v_b_list.count = 0
       );Hope that helps.
    Forgot to mention the CARDINALITY hint i added in. Oracle will have no idea how many rows these arrays (which we will treat as tables) will have, so this hint tells Oracle that you expect X (5 in this case) rows. Adjust it as you need, or remove it. If you are passing in thousands of possible values, where i've assumed you will pass in only a few, you may want to reconsider using the array approach and go for a global temporary table.
    Edited by: Tubby on Dec 11, 2009 11:45 AM
    Edited by: Tubby on Dec 11, 2009 11:48 AM
    Added link about using Bind Variables.

  • How to read from a xml file(in String format) using a java program

    hi friends
    i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
    thanks

            final DocumentBuilder db =  DocumentBuilderFactory.newInstance().newDocumentBuilder();      
            final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
            final Document document = db.parse(documentStream);

  • XML Element to string conversion returning null

    Hi,
    When i try to convert XML Element to string using toString() API, it returns something like [device: null] where device is element tag.
    Code is as follows -
    Document xmlDoc;
    DOMParser parser = (DOMParser)Class.forName("org.apache.xerces.parsers.DOMParser").newInstance();
    parser.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion", true );
    parser.parse(new InputSource(new StringReader(tableStr)));
    xmlDoc = parser.getDocument();
    Element root = xmlDoc.getDocumentElement();
    NodeList nodeList = root.getElementsByTagName("device");
    Element deviceNode = (Element)nodeList.item(nodeList.getLength()-1);
    System.out.println(deviceNode.toString()); //prints [device: null] ????
    System.out.println(deviceNode.getAttribute("ipAddress")); //prints correct ip address
    Any idea why i am getting [device: null] when trying to convert Element to String though attribute value is retrieved.
    Thanks,
    Deepak

    Hello ,
    I want to get the root node (<ZTOP60_XML_TAG_STRUCTURE>
    ) of the following xml file .
    <?xml version="1.0" encoding="utf-8"?>
    <ZTOP60_XML_TAG_STRUCTURE>
         <MSGTYPE>NAPOBACK</MSGTYPE>
         <SNDPRN>657393485</SNDPRN>
         <RECEIVER/>
         <RCVPRN>GSOHUBDM1</RCVPRN>
         <PONUM/>
         <VENDCODE>0020040266</VENDCODE>
         <VENDUNS>002601768</VENDUNS>
         <PARTNERFUNC_WE>WE</PARTNERFUNC_WE>
         <PARTNERNUM_WE>C240</PARTNERNUM_WE>
         <LINE_ITEMS>
              <item>
                   <ITEMNUM>00687</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>7.000</GRQTY>
                   <NETVAL>339.65</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FE-26865-01</MATNUM>
                   <MATDESC>PTR, T632, LEXMARK 5-BIN MAILBOX</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00178</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>303.000</GRQTY>
                   <NETVAL>18.62</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FE-ZZYRG-01</MATNUM>
                   <MATDESC>FDD,FDI-PC,1.44MB,3.5 ,HH</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00157</ITEMNUM>
                   <POQTY>999999998.000</POQTY>
                   <BOQTY>24.000</BOQTY>
                   <GRQTY>303.000</GRQTY>
                   <NETVAL>26.25</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FE-25094-01</MATNUM>
                   <MATDESC>MOUSE,PC,3BUT,,INTELLIMOUSE,PS2</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00881</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>62.000</GRQTY>
                   <NETVAL>368.80</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FD-66515-01</MATNUM>
                   <MATDESC>ITU MODULE ASM</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00223</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>377.000</GRQTY>
                   <NETVAL>459.28</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FD-65336-01</MATNUM>
                   <MATDESC>MAIN SYSTEM BOARD T23 (2647)</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00081</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>19.000</BOQTY>
                   <GRQTY>810.000</GRQTY>
                   <NETVAL>217.21</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FD-64199-01</MATNUM>
                   <MATDESC>QST- CADET 100</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00271</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>136.000</GRQTY>
                   <NETVAL>813.76</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>FD-60065-01</MATNUM>
                   <MATDESC>SMART UPS 3000VA RM</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00791</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>3.000</GRQTY>
                   <NETVAL>201.73</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>3X-PBXGG-AA</MATNUM>
                   <MATDESC>ATI 7500 PCI GRAPHICS</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00173</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>32.000</GRQTY>
                   <NETVAL>7.50</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>12-56178-01</MATNUM>
                   <MATDESC>CARD GUIDE,SNAP-IN,LOW PROFILE,2.5 INCHE</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00309</ITEMNUM>
                   <POQTY>999999998.000</POQTY>
                   <BOQTY>15.000</BOQTY>
                   <GRQTY>71.000</GRQTY>
                   <NETVAL>51.23</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>30-51476-01</MATNUM>
                   <MATDESC>VHDI-CABLE WIDE 12 FT. DT-AB001-TQ</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
              <item>
                   <ITEMNUM>00194</ITEMNUM>
                   <POQTY>999999999.000</POQTY>
                   <BOQTY>1.000</BOQTY>
                   <GRQTY>147.000</GRQTY>
                   <NETVAL>345.48</NETVAL>
                   <PLANT>C240</PLANT>
                   <MATNUM>29-33689-01</MATNUM>
                   <MATDESC>PTR,IMP9,B/W,PAR/SER,110/240,R</MATDESC>
                   <PONUMBER>6500022388</PONUMBER>
                   <EKGRP>U17</EKGRP>
                   <DISPO>N07</DISPO>
              </item>
         </LINE_ITEMS>
    </ZTOP60_XML_TAG_STRUCTURE>
    I wrote the following lines of code ..
    FTI .. >> String strMsg =((javax.jms.TextMessage)msg).getText();
    StrMsg is a string that represents an xml file .
    DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder builder = docfactory.newDocumentBuilder();
                   Document doc = builder.parse(new InputSource(new StringReader(strMsg)));
                   Element root = doc.getDocumentElement();
                   System.out.println("The root is " + root);
                   String strFileName = root+".xml" ;
                   System.out.println("The file name is " + strFileName);
                   File f = new File (strFileName);
                   FileOutputStream fos = new FileOutputStream( f );
                   for ( int j =0 ; j < strMsg.length(); j++)
                        char c = strMsg.charAt(j);
                        fos.write((int)c);
    I am getting the following error ...
    The root is [ZTOP60_XML_TAG_STRUCTURE: null]
    The file name is [ZTOP60_XML_TAG_STRUCTURE: null].xml
    Whey the file name or root is with special character [ ] and null ..
    I want just ZTOP60_XML_TAG_STRUCTURE.xml .
    Can anyone help me .
    thanks
    mahesh

  • Converting XML Document to String

    Dear All,
    I am quite new to Java Web Services. I have made a Java Class which calls all the web services . I am displaying the results on a Command prompt. Below is my sample code:
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Stub;
    import horusWS.Horus_x0020_Web_x0020_Services_Impl;
    import horusWS.Horus_x0020_Web_x0020_ServicesSoap;
    public class JavaClient {
    public static void main(String[] args)
    Horus_x0020_Web_x0020_Services_Impl service = new Horus_x0020_Web_x0020_Services_Impl();
    Horus_x0020_Web_x0020_ServicesSoap port = service.getHorus_x0020_Web_x0020_ServicesSoap();
    String str;
    str = port.getTextFeedbackLearner(1,"P001",1);
    //where getTextFeedbackLearner is the my Web Service.
    System.out.println(str);
    System.out.println returns the web service in string format. Now I want to compare this string to my actual getTextFeedbackLearner.xml file. But I think I need to convert getTextFeedbackLearner.xml to string first. Please let me know
    how can I convert an XML Document to String.
    Thanking you in Anticipation.
    cheers,
    Sunil Sabir

    You can read the XML document as you read any other file.
    Read it into a String variable.
    Check java.io.FileReader, java.io.BufferReader, etc.

Maybe you are looking for

  • Power Mac G5 Upgrades? New to Mac

    Hello Everyone, this is my first post here on apple. I Recently got a M9020LL/A Power Mac G5 1.6ghz tower, 1 gig memory, 80 gig drive. Fresh install of Leopard 10.5. All is working well... Happy with it. My question is, other than ram/memory obviousl

  • Very loud vibration from new Mac Mini DVD ROM drive

    Good evening all. I bought a new design Mac Mini 3 days ago. Today I decided to re-install the OS and found the following :- 1. The DVD drive makes a horrendous vibrating noise like an out of balance washing machine. 2. The usual method of booting fr

  • Transform, assign, namespaces

    Hi, I'm having a lot of problems with assign and transform activities. I have different bpel processes with different input and output schemas. All the schemas have a commun element named TSO. If I try to copy the values from one variable to the othe

  • Mac OS 10.6  Safari 4.0.3.  Cannot get Flash Player to install.

    Did an archive and reinstall of the OS, then went to download center and downloaded Flash Player (again), but when I try to open a video, continue to get the message that I need to download the latest Flash Player. Called Applecare and they got me th

  • Adjusting Database in Quality server

    Hi All, I have changed the datatype of an existing database from NUM4 to INT4 and adjusted the database utility before activating in a development server. When I moved the transport request to quality server, the transport request got terminated in q