XML out of WS

Hey All,
I hav been working on Web Service where in get a WS object say, output from a WS method call
this output to my understanding comes as a XML data that we convert to java code to retrieve data out of it through iterations
I wonder is there any where in I can straight away get the XML data itself out of output WS object bcoz I see only methods inside this object to get the list of elements not the XML text?

Yes, but the way you do this will depend on the tool you use. For instance when using Axis refer to:
http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration/ViewSOAPMessages

Similar Messages

  • DDX XML out help

    Hey everyone quick question that I hope someone can help me
    out with. We are currently in the process of making a switch from
    our old CMS to websphere and we have a few thousand PDF documents
    that have hard coded links in them.
    Anyhow I was thinking I might be able to use DDX with CF8 to
    extract the doc info in XML then use CFDocument to recompile them
    back again but change the links to be a different URL.
    I have been able to get the XML out with DDX but its not
    retaing the formatting in the xml or the link information.
    So I guess my question is, is this possible with DDX?
    I also some some people talking about a open source solution
    called PDFBox, but its all java and I'm not a java expert, but if
    anyone knows of some tutorials or examples of using this with CF
    that would be awesome.
    Thanks for any help
    Mike.

    Yes, but the way you do this will depend on the tool you use. For instance when using Axis refer to:
    http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration/ViewSOAPMessages

  • XML out ... and in

    For an automated data transfer I need to get a database (relational structure) to export to XML and to be able to import a similar structure sent by our partners.
    I have been googling on this and there seems to be a massive number of options and tools available. That's great but it has got me rather confused.
    At the moment, it looks like I will be converting from XML to CSV using XSLT/Saxon and then importing into Oracle. In the other direction (i.e. Oracle to XML) I am hoping to be able to use Oracle SQL and include the XML tagging at the time of generation.
    However, none of this is really pretty and so I was wondering if anyone out there had any tips on how best to 'shunt' data to and from XML most comfortably.
    Any tips or links would be gratefully received.
    Regards,
    Alan Searle

    For handling XML data, Oracle provided XML DB. You simply store your XML directly into XMLTYPE datatype in Oracle and can process this XML data by using XML queries. For more information please refer XML DB.
    XML DB
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/transformxml/TransformXML.html

  • Generate XML out of internal Table (via XSLT)

    Hi NG,
    is there an easy way to generate an XML document out of an internal ABAP Table? Maybe there is even a chnage to use XSLT as an template to define the structure of the XML file.
    Thanks
    Stefan

    check out following thread you will find more than one answer. I like CL_XML_DOCUMENT solution, that is so simple.
    Re: Convert to XML format
    -Sanjeev

  • SQL in XML out

    hi folks
    Any one know of any db package that takes sql and puts xml tags around it like the XMLELEMENT in 9i.
    I am working on 8i db.
    Cheers
    Tappies

    I presume from your answer that the only option i have is to hard code the xml in to the sql results.

  • Xml out tag displays incorrect results

    Hi, I am reading a RSS feed using JSTL and i am using <x:out select="description" /> tag to read the value associated with "description". The returned value is html image tag. Instead of processing the image tag, IE does shows the image html tag itself like below
    <img src=http://xxx.com/index.aspx?isbn=9780268033729%3b0268033722+(pbk.+%3a+alk.+paper)%3b02680/SC.GIF><br><br><b><i>Title:</b></i> Character psychology and character education / edited by <br><b><i>Imprint:</b></i> Notre Dame, Ind. : University of Notre Dame Press, c2005.<br><b><i>ISBN:</b></i> (pbk. : alk. paper);02680
    How should i get rid of this?

    What is the HTML source of this code?
    I think it's probably being printed out as > and < which causes the browser to not interpret it as a tag but as the greater than and lesser than symbols.

  • How to Format the XML out as Standard Format

    Hi,
    I'm trying to make a Web Service Provider , so I can respond with and standar XML message file, I'm using NetBeans , and Tomcat 5.0.28 & AXIS2 1.4 ,to deploy it.
    but when I test the web service, it respond with the following XML.
    <ns:PendienteResponse>
    <ns:return><Linea></ns:return>
    <ns:return><Fecha>31/7/7</Fecha></ns:return>
    <ns:return><Concepto>3O </Concepto></ns:return>
    <ns:return><Debito>0.0<;/Debito></ns:return>
    <ns:return><Credito>0.29<;/Credito></ns:return>
    <ns:return><Interes>0.0<;/Interes></ns:return>
    <ns:return><Saldo>0.29<;/Saldo></ns:return>
    <ns:return><Cajero> 999</Cajero></ns:return>
    <ns:return></Linea>
    </ns:PendienteResponse>
    what I want to get in the XML doc. is:
    <:PendienteResponse>
    <Linea>
    <Fecha>31/7/7</Fecha>
    <Concepto>3O </Concepto>
    <Debito>0.0<;/Debito>
    <Credito>0.29<;/Credito>
    <Interes>0.0<;/Interes>
    <Saldo>0.29<;/Saldo>
    <Cajero> 999</Cajero>
    </Linea>
    </PendienteResponse>
    How can I get rid of the <ns:return></ns:return>
    Thanks.
    Jeff Talavera

    Name spaces are integral part of XML / Web services. If you want to remove them due to some reason, you can do so programmatically and [String.replace()|http://java.sun.com/javase/6/docs/api/java/lang/String.html#replace(java.lang.CharSequence,%20java.lang.CharSequence)] might be useful in this scenario.

  • Out Of Memory Issue while dowloading infomraiton from DB to XML

    Hi,
    I am converting the Database tables into XML file format
    using Java IO and SAXP. I am keeping all XML files in
    download folder. But, while downloading process
    i am getting Out Of Memory Error.
    When i tried to download the real data, the download
    folder size is going tp 50 MB and i am getting Out Of
    memory error?
    Is that related to JVM Memory or System Memory. What
    would be the solution for this?
    Awaiting your answers

    By default the JVM appropriates 96Mb of memory for it's heap. You can increase the allocation by putting, say -Xmx128m on the Java command line, though perhaps a better solution is to avoid loading all your data at one time and write the XML out while reading the database.

  • Calling StroreProcedure contain XML as Input and store proce return XML as out-BizTalk

    I have a requirement in BizTalk that
    - I will receive XML from Source and i need to submit this XML data in  SQL storeprocedure  as a parameters and submit data
    Ex: My_SP(myXML xml Input,myXML1 xml OUT)
    Could you please help me how to call storeprocedure and submit XML and how to retrieve XML from SP.

    One of the way is to return xml from stored procedure instead of getting a typed schema
    You can have xml auto defined at stored procedure something like below stored procedure.
    SELECT [Employee_ID] ,[Name] ,[DOJ] ,[Designation] ,[Job_Description] ,cast([Rating] as varchar(100)) as Rating ,[Salary] ,[Last_Modified] ,[Status] ,[Address]
    FROM [Adapt_Doc].[dbo].[Employee] for xml auto, xmlschema
    After that you can directly assign the message to the typed schema something like below
    MessageTypedSQL=MessageUntypedSQl;
    For reference you can look into below MSDN articles
    SQL and XML: Use XML to Invoke and Return Stored Procedures
    Executing Stored Procedures Having a FOR XML Clause
    Thanks
    Abhishek

  • Not able to Read Blob ( BlobDomain) Xml Data from DB

    I am trying to read a BLOB file from Data base with the below code . However , i am facing 2 challenges - which i need ur help..
    1. the data is not in readable format , may be i am missing some more code or encoding somewhere . ( this is how data is printing-- �B�...........)
    2. Throwing an exception in the end
    The Blob Data types appears as BlobDomain in the entity defination . My jdev is 11.1.1.5
    +{+
    +..............+
    oracle.jbo.domain.BlobDomain  blobDomainXml = (BlobDomain)r.getAttribute("Document");
    System.out.println(" XML Out Put = "blobDomainXml);+
    +}+
    public ViewObject getBlobObject(){
    return (ViewObjectImpl)findViewObject("getBlobObject1");
    below is exception after the call ---
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.ViewRowSetIteratorImpl.getViewObject(ViewRowSetIteratorImpl.java:238)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getSyncLock(ViewRowSetIteratorImpl.java:178)
         at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1904)
         at com.stryker.gtc.view.bean.LoginPageName.getBlob(LoginPageName.java:243)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)

    The Blob xml has used some encoding . If i use the below italic code in main class , i can get the proper xml . However , It uses the blob resultset but I get exception if i try with ADF blob domain .
    below is the code in a simple main method class and gives me the desired xml .
    ResultSet rset = statement.executeQuery("Select * from XML_DOCUMENT where DOCUMENT_ID=(Select DOCUMENT_ID from DOCUMENT_DLV_MSG_REF where MESSAGE_GUID = (Select MESSAGE_GUID from DLV_MESSAGE \n" +
    "where CIKEY = (Select CIKEY from CUBE_INSTANCE where CMPST_ID='1931038')))");
    +try {+
    XMLDOMImplementation domimpl = new XMLDOMImplementation();
    +while (rset.next()) {+
    BinXMLProcessor proc =  BinXMLProcessorFactory.createProcessor()  ;
    BinXMLStream inpbin = proc.createBinXMLStream(rset.getBlob("DOCUMENT"));
    BinXMLDecoder dec = inpbin.getDecoder();
    InfosetReader xmlreader = dec.getReader();
    XMLDocument doc = (XMLDocument)domimpl.createDocument(xmlreader);
    doc.print(System.out);
    +}+
    +} catch (Exception e) {+
    System.out.println(" Exception ="e);+
    +}+
    But , In ADF we have Blob Domian in the entity defination , auto generated ...
    Row r = iter.next();
    oracle.jbo.domain.BlobDomain blob = (*BlobDomain*)r.getAttribute("Document");
    try
    XMLDOMImplementation domimpl = new XMLDOMImplementation();
    BinXMLProcessor proc = BinXMLProcessorFactory.createProcessor() ;
    BinXMLStream inpbin = proc.createBinXMLStream(blob.getInputStream());
    BinXMLDecoder dec = inpbin.getDecoder();
    InfosetReader xmlreader = dec.getReader();
    now in the above higlighted code I get java.lang.IllegalArgumentException . I do not find a way to convert BlobDomain to blob . even no decoder in blob Domain .
    May be you can help ..
    Edited by: Amitava Biswas on Sep 12, 2012 11:13 AM

  • Communication problem MYSQL PHP XML Flash.

    I have driven myself into a corner with this so I hope someone here knows a solution.
    I am building a photogallery with a simple html layout but with a flash slideshow.
    The data for each album and photo are stored in a mysql database. Each photo-image is in one big folder on the server. With PHP I sort out which photo belongs to what album and display them accordingly. To start the slideshow people can click on a link near the album, this link will send a < href> with the album ID to an PHP file (xml.php) that will generated an XML output created from the MYSQL server. Here comes my problem:
    Loading XML into flash is no problem BUT I only know how to do this with a static or self supporting XML output. (xml.php needs the input of the album ID else it will not get the correct data). For now I have a temporary solution where I write the XML output from xml.php to a txt file and let Flash read from there, but is there a way where I can read directly from xml.php?

    Echo your formatted xml out as a string in xml.php, Flash will then read your dynamically generated XML.

  • Converting a simple Oracle Report to XML Publisher report template

    Hello,
    I have a simple Oracle Report 9i which displays data from four tables. It uses three different queries to get the data. How can I simply generate a template file(say RTF) or atleast an XML source from that report? I tried joining the queries (like outer join) but wasn't able to get the format which report 9i was generating. Could anyone please help me out with a clear approach?

    Hi,
    Are you referring to how to get xml out put from seeded report i mean from EBS that already in oracle reports,
    then you need to query from respective application by creating new concurrent program and then change the out put to XML, you will get xml file then save it to your system.
    By using this input xml fle you can create RTF template whatever you want the foramat, after that you upload back this RTF file to EBS using XML PUBLISHER ADMINISTRATOR responsibility.
    hope this might give you idea,
    let us know if it is not clear or you are asking different question,
    srinuk

  • Special characters in XML structure when prepared using String

    Hi,
       I am preparing an XML structure using 'String'. I print the prepared XML structure in the server log. Issue is that I am seeing extra characters([[ and ]]) that I am not printing.
    Please let me know how to get rid of those.
    Code Excerpt
            String xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
            String lsb_xmlcon = xmlHeader;
            logger.info("ReqXMLString Process  1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("<REQUEST>");
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.2  --->" + lsb_xmlcon);
    Log
    ReqXMLString Process  1  ---><?xml version="1.0" encoding="utf-8" ?>
    ReqXMLString Process  1.1  ---><?xml version="1.0" encoding="utf-8" ?>[[
    ReqXMLString Process  1.2  ---><?xml version="1.0" encoding="utf-8" ?>[[
    <REQUEST>
    Thanks,
    Message was edited by: 996913
    This issue is observed only while running the code in server, not from Jdev.
    When we append the additional tags without new line character, "\n", there are no extra characters being added. Also, in other case also. where we used "Marshaller" to prepare the XML, we have seen this issue.
    After we set the below property to false, we got rid of the extra characters.
                            jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, false);
    Apparently the insertion of new line when the code runs on server(Weblogic 10.3.6.0) is creating the issue.
    Please let me know if anyone has come across a similar scenario.
    Thanks,

    I am building this XML in a servlet so ,right, DOM does process XML (even though a valid HTML file can be loaded into a DOM object) but if you build XML using DOM then write the XML out using PrintWriter and Transformer objects this will cause the XML to print out in your browser. If you view source on this XML you will see that the DOM object has translated all special characters to there &xxxx; equivalent. For a example: when the string (I know "cool" java) gets loaded into a attribute using the DOM object then wrote back out it looks like (I know &xxx;cool&xxx; java) if you view the source in your browser. This is what it should do, but the DOM object is not change the � to the "&xxxxx;". This servlet is acting as a gateway between a Java API and a windows asp. The asp will call the servlet expecting to get XML back and load it directly into a DOM object. When the windows DOM object gets the xml that I am returning in this servlet is throws a exception "invalid character" because the � was not translated to &xxxx; like the other characters were. According to the book HTML 4 in 24 hours (and other references) the eacute; or #233; are how you say "�" in HTML or XML. How do you say it?

  • How to create a brand new report using xml publisher(BI Publisher)

    Hello Friends,
    I worked on Oracle apps Bi Publisher earlier and used to customize the oracle reports(run the concurrent program to get the xml output ) and then use the xml output in the rtf document to get the bi publisher report. But now I'm working on Oracle Retail and I dont have Report Builder or the apps environment.
    I have to develop a BI publisher report with the rtf document I downloaded the plug in for the word so that it can access the BI Publisher Enterprise...
    Please let me know if we can generate xml out put using this BI Publisher Enterprise... if so let me know how
    your timely response would do a world of good to me
    Thanks in advance
    krishna

    Hello Srini,
    Thank you very much for the reply but I'm not into OBIEE... I want the required query to be processed and the output to be shown in xml layout to load into RTF document. The rest I can manage.. but please let me know how to get the .xml output with out using the report builder or the apps environment(concurrent prg submission)..
    Please let me know if any... urgent
    Thanks in advance
    Krishna

  • How to retrieve information from XML using servlets

    Hi
    I have a scenario like this
    File-->XI-->J2ee application(HTTP Receiver adapter)
    I want to know how XI sends xml file as a query string file name?
    What ever may be the case i just need to retrieve the information from Request object and display the same in browser(JSP).How to do that, I am totally confused, please anyone help me!
    Code help is highly rewarded.
    Thanx

    Hi Rajesh!
    I have tried your code. But some where i went wrong. Please correct me: I am using NWDS2.0.9
    my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                             "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <display-name>WEB APP</display-name>
        <description>WEB APP description</description>
        <servlet>
            <servlet-name>DisplayRes</servlet-name>
            <servlet-class>com.quinnox.DisplayRes</servlet-class>
        </servlet>
        <servlet-mapping>
              <servlet-name>DisplayRes</servlet-name>
              <url-pattern>/DisplayRes/*</url-pattern>
         </servlet-mapping>
    </web-app>
    my application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
                                 "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
        <display-name>ReceiverEntpr</display-name>
        <description>EAR description</description>
        <module>
            <web>
                <web-uri>HttpReceiver.war</web-uri>
                <context-root>/HttpReceiver</context-root>
            </web>
        </module>
    </application>
    and my servlet code:
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.Writer;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.xml.sax.EntityResolver;
    import org.xml.sax.SAXException;
    import com.sun.java_cup.internal.parser;
    import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
    public class DisplayRes extends HttpServlet {
         public void doGet(HttpServletRequest requset, HttpServletResponse response) throws ServletException, IOException
              doWork(requset, response);
         public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
              doWork(req, resp);
         private void doWork(HttpServletRequest req, HttpServletResponse resp) throws IOException
              String path = null;
              PrintWriter out = null;
              PrintWriter p2=resp.getWriter();     
              try
                   resp.setContentType("text/xml");
                   out = resp.getWriter();
                   out.println("hi");
                   path = req.getPathInfo();
                   if(req.getContentLength() != -1){
                   outputURI(req.getInputStream(), out);
              } catch (IOException ioe) {     return;     
         //private void outputURI(InputStream resultStream, Writer out) {
              private void outputURI(InputStream resultStream, PrintWriter out) {
              if (resultStream == null) {
    //             no default file
    //            logger.error("No File to return");
              return;
              try {
              DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    //            Class clazz = loader.loadClass("org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
    //            DocumentBuilderFactoryImpl factory = (DocumentBuilderFactoryImpl) clazz.newInstance();
    //            DocumentBuilder parser = factory.newDocumentBuilder();
              parser.setEntityResolver(new ClassPathEntityResolver());
              printXML(parser.parse(resultStream), out);
              resultStream.close();
              } catch (Exception e) {
    //            logger.error("Trying to parse the output " , e);
         //private void printXML(Document document, Writer writer) throws Exception {
              private void printXML(Document document, PrintWriter writer) throws Exception {
              Transformer transformer = TransformerFactory.newInstance().newTransformer();
              Source source = new DOMSource(document);
              Result output = new StreamResult(System.out);
              transformer.transform(source, output);
    //             Write as XML so that entity references can be resolved.
              if (writer != null) {
              transformer.transform(source, new StreamResult(writer));
    Please tell me how to display in servlet.
    If it is better to display in a browser. Please send me the code.
    Thanks

Maybe you are looking for

  • Pixelated enlarged screen - display issues related to external hard drive

    Hi.  I had an external hard drive plugged into my macbook.  I have a second monitor hooked up.  My screen is pixelated and enlarged (I have to scroll to see the whole desktop).  The icons are rearranged and very blurry. Everything is blurry and enlar

  • Runtime error R6034 related to ITunes in Windows 7

    Hi, How do I sort out the problem of the runtime error message? This started after I downloaded the latest iTunes. Cheers

  • KDE: Setting time and date automatically

    I've never been able to set the time and date automatically in KDE time settings. When I check the "Set time and date automatically" and authenticate myself, I always get the error message "Unable to contact time server: .". I'm wondering whether it'

  • F4 help in modulepool

    Hi Experts,                   i have deleted standard f4 help in my program and i have added  few values in particular field.however if i clicked that f4 help it displayed only  ******  instead of added valus. can anybody help me how to do it. Thanks

  • Oracle Database Vault 11g installation

    Hi, I want to know the installation steps for Oracle Database Vault (11g-version:11.1.0.6). Is there any document which specifies the installation steps. I have the document for 10g - Database Vault installation. But i am not able to find any specifi