XML in HTML form parameter

Hi,
I would like insert records into database by HTML form, where one parameter (text field) is XML (which will be - after transforming via XSL - compatible with database schema). Is it possible with insert-request? Have you any ideas?
Thanks in advance,
Tom

Hi,
Could you help me more? I've found only example with parameters as fields. Can I use one parameter (XML) as entire rowset?
Thanks,
Tom

Similar Messages

  • XML query results in HTML form parameter

    Hi,
    I would like insert records from a query result (raw XML) into HTML form tags, using the XSL stylesheet. Here is the code I am trying to use, but obviously it is not working.
    <INPUT TYPE="hidden" NAME="te_hb_strdEntryId"
    VALUE="<xsl:value-of select="ID"/>">
    Are there any other options to put a result of a query in a hidden tag, using XSL?
    Any help will be appriciated.

    <INPUT TYPE="hidden" NAME="te_hb_strdEntryId"
    VALUE="<xsl:value-of select="ID"/>">
    The correct syntax would be:
    <INPUT TYPE="hidden" NAME="xxx">
    <xsl:attribute name="VALUE">
    <xsl:value-of select="ID"/>
    </xsl:attribute>
    however, there is a shortcut syntax
    when you are using XPath expressions
    in literal attribute values:
    XSLT attribute value templates. They are
    XPath expressions inside curly braces.
    So, you can achieve your desired result
    with the shorter form:
    <INPUT TYPE="hidden" NAME="xxx" VALUE="{ID}">
    as well.

  • Passing through XML in HTML forms without it being displayed in Web Browser

    Dear all
    I have some MapViewer XML stored in a variable, which I wish to pass through a HTML form. However whenever I insert the variable into the form and run the procedure, my web browser starts reading the actual XML and treating it as HTML, since it is only part of a complete XML script. Even if it was a complete XML script, it would still try and display it. Is there away of making sure the value is passed through without being read by the browser?
    For example:
    PROCEDURE DISPLAY
    AS
    var_xml VARCHAR2(32767) :='<theme name="theme_county"/>';
    htp.print('<INPUT TYPE = "hidden"
                      NAME ="var_xml"
                      VALUE = "' || var_xml || '" />Then causes the output to the browser to become:
    htp.print('<INPUT TYPE = "hidden"
                      NAME ="var_xml"
                      VALUE = "<theme name="theme_county"/>" />The browser is of course reading the XML as HTML.
    Kind regards
    Tim

    Dear all
    I have now resolved the problem by submitting values which can then be used to recreate the xml in another function, rather than actually submitting the xml itself through the forms. This makes more sense and avoids people having to see any of the xml.
    Kind regards
    Tim

  • How to search xml file data based on the given keyword from html form

    hi,
    i'm new to XML. I have this problem regarding searching within a XML file.
    the
    idea is that my search will be based on the keyword entered
    in
    by the user from a HTML form. the keyword is then used to search all
    the
    question nodes and the choice nodes within a XML file. once the match
    is
    found, i will have to display the results.
    But i don't know how to do so - especially the part of searching xml file.
    Can
    anyone help me in this? Your help is much appreciated.
    Edited by: Moti_Lal.D on Apr 4, 2008 7:28 AM

    yeah.. what i was trying to do is
    i have one xml fine. then i have to read all the tag values say
    <book>
    <title>Java</title>
    <author>agarwal</author>
    <price>200</price>
    </book>
    <book>
    <title>Xml</title>
    <author>saxmann</author>
    <price>300</price>
    </book>
    i can read the tag values like this
    File file = new File("dom.xml");
    try {
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document doc = builder.parse(file);
    NodeList nodes = doc.getElementsByTagName"book");
    for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);
    NodeList title = element.getElementsByTagName("title");
    Element line = (Element) title.item(0);
    what i want is i may give any xml file
    like File file = new File("xxx.xml");
    (it may be one level/two level/3level tagged one)
    then the i should read all the tag values and store them in some array. Then when i enter some character from keyboard (say "a") then it has to show all the tag values starts with "a" and display them.
    i guess u understand my problem.

  • Urgent :post xml for xsql difference with html form post

    Hi,
    We are developing an application to process xml request
    posted by external party. The requests arrive by
    http-post operation
    We developed and tested with an html-form.
    Now we encounter problems in testing with http-post
    The xsql page is processed correctly but
    insert only fixed text when formatting xml-data as input for
    the insert-request, string inserted is empty.
    Everything is by the book and html-forms works great.
    Is anybody else using xsql to insert xml data in the database on this version? Maybe can you help by looking into a testcase ? Issued a tar but am on terrible deadline
    so need help very soon.
    Details: HP-UX 11.11 Oracle 9.2.0.4 java1.4 ojdbc 1.4
    Tnx in advance,
    Jeroen

    Mark,
    Have an external partner which sends xml-requests.
    Have to read those, store them and process them.
    Idea is let them
    1)post the xml at a url where an xsql page is reading the xml
    2) transforming this for an insert into
    the database. The column is defined to store the complete xml-message.
    3) A trigger takes care of processing the stuff and preparing the output
    4) and a query in the xsql-page reads the output from an output table
    When developing and testing this with an html-form that posts the xml is works great.
    $ cat newclobins.xsql
    <?xml version="1.0"?>
    <page connection="demo" xmlns:xsql="urn:oracle-xsql" >
    <xsql:set-session-param name="id">
    select msgid.nextval from dual
    </xsql:set-session-param>
    <xsql:dml>
    delete cbs_msg_in where id={@id}
    </xsql:dml>
    <xsql:insert-request table="cbs_msg_in" column="id,msg" transform="cbsform_1.xsl"/>
    <data>
    <xsql:query null-indicator="yes">
    select msgid,msg from cbs_xml_out where msgid={@id}
    </xsql:query>
    </data>
    </page>
    $ cat cbsform_1.xsl
    <?xml version="1.0"?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request">
    <ROW>
    <MSG><xsl:value-of select="parameters/doc" /></MSG>
    <ID><xsl:value-of select="session/id" /></ID>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    1) When using a tool like
    http://www.programmersheaven.com/articles/adrian/getpost/article.html it fails with
    No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.
    2) When using the commandline utility like
    xsql jeroen5.xsql posted-xml=test3.xml
    this works great when inserting plain text but not
    when inserting xml-format data into a column
    So problem 1 is why external tools like above or my partner that uses .net to do something similar gives this strange error?
    Problem nr 2 is should I stick to just the data in xml and forget about storing the xml-formatted data?
    Hope you can help because I am getting quite desparate here.
    Regards,
    Jeroen

  • Update XML files with HTML forms...

    Hi,
    I would like to know if its possible to update or insert data
    to XML files from a HTML form? And how can I do it?
    Does dreamweaver have any extension that does this?

    hi bregent!
    im using php.
    i have a xml flash slide show script, and i want to insert
    this slide show on a site. No problem here, but i would like to
    create a backoffice were i can update or insert the pictures of the
    xml slide show.
    can you help me on this?

  • Html form xml xml db

    Hi,
    Is there a sample that does this simple process:
    1. Extract xml content from xml db table (via a PK key)
    2. Transform it into html form input (via xsl)
    3. Process the request from the submit action and update the original XML content
    4. Update the xml db table with the updated xml content
    Thank you for your help

    Hi,
    You could also refer to the XML News Sample Appliation which demonstrates various XML DB features and is available at http://otn.oracle.com/sample_code/tech/xml/xmlnews/content.html
    The same page has a tutorial which explains the
    Oracle XML DB features used in the application -
    http://otn.oracle.com/sample_code/tech/xml/xmlnews/News_OracleXMLDB.html
    For more XML DB Samples visit - http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    HTH.
    Sujatha,
    OTN Group@IDC

  • Create an XML document from a HTML form???

    Good morning, is it possible to create an XML document from a HTML form
    if yes, can someone tell me how to proceed exactely, I would be very thankful!

    Hi,
    A very simple intro at this link. Apologies for anything unclear.
    http://cswww.essex.ac.uk/TechnicalGroup/TechnicalHelp/xmlCreate.htm
    best
    kev

  • Convert XML Schema Files (XSD) in HTML Forms

    Hi Everybody,
    I am new in the topic of the XML, XSD, the situation is the following , I have a few files .XSD and need to generate automatic html forms based on these .XSD to gather information and later convert them into XML files and save them in a repository and later a middleware will process this information.
    My first serious question if it is possible to develop the above mentioned task automatic? And the second one where you recommend to me to start investigating?.
    Thanks in advance for your answer
    Regards from Peru.

    There are products which do that already, I think. XMLSpy is one. Check that out to see if I'm right (not sure about the HTML part). Otherwise, welcome to the club of several hundred people who have asked basically that same question (only not with the HTML part) here.

  • Convert XML payload to HTML form data in Receiver HTTP Adapter

    Hi,
    I want to make a HTTP request ( Receiver HTTP Adapter ) to a servlet where I need to send the payload in HTML form format ( name=value ). As per the help document:
    A typical HTML form comprises named fields. When transferring a completed form to the server or a CGI program, the data must be transferred in such a way that the CGI script can recognize the fields that make up the form, and which data was entered in which field.
    The plain HTTP adapter constructs this format using a prolog and an epilog
    Has anyone done this before? I looked through all help documents and forums but in vain. I can resort to Java Mapping to do this but I do not want to re-invent the wheel if I can do it easily using HTTP Adapter Configuration. Please help.

    The parameters available in HTTP adapter for message header are:
    HeaderFieldFive     http://sap.com/xi/XI/System/HTTP
    HeaderFieldFour     http://sap.com/xi/XI/System/HTTP
    HeaderFieldOne     http://sap.com/xi/XI/System/HTTP
    HeaderFieldSix     http://sap.com/xi/XI/System/HTTP
    HeaderFieldThree     http://sap.com/xi/XI/System/HTTP
    HeaderFieldTwo     http://sap.com/xi/XI/System/HTTP
    HTTPDest     http://sap.com/xi/XI/System/HTTP
    TargetURL     http://sap.com/xi/XI/System/HTTP
    URLParamFive     http://sap.com/xi/XI/System/HTTP
    URLParamFour     http://sap.com/xi/XI/System/HTTP
    URLParamOne     http://sap.com/xi/XI/System/HTTP
    URLParamSix     http://sap.com/xi/XI/System/HTTP
    URLParamThree     http://sap.com/xi/XI/System/HTTP
    URLParamTwo     http://sap.com/xi/XI/System/HTTP

  • Can't pass parameter from HTML form of multipart/form-dta type to JSP

    I am using request.getParameter(passed variable name) to pass data from HTML form to JSP with no problem. WHen I try to pass data from HTML form of multipart/form-dta type to JSP as following:
    < form enctype="multipart/form-data" name="theForm" method="post" ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/ifs-cts/stringsecond.jsp">
    The passed value is null. Why?
    How can I pass data successfully from this form to JSP?
    How can I pass data from JavaScript to JSP?
    Thank you

    I am using request.getParameter(passed variable name)
    to pass data from HTML form to JSP with no problem.
    WHen I try to pass data from HTML form of
    multipart/form-dta type to JSP as following:
    < form enctype="multipart/form-data" name="theForm"
    method="post"
    ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/if
    -cts/stringsecond.jsp">
    The passed value is null. Why?because the jsp most likely does not handling of POST parameters like this.
    How can I pass data successfully from this form to
    JSP?jsp's are not meant to read such amounts of data. this (= uploading) is a typical task for a specialized servlet. there you have full control over input and output. if you need to, you can still forward to a jsp after processing in the servlet.
    How can I pass data from JavaScript to JSP???? i'm not sure what exactly you mean. normally you put it into an url and submit it.
    robert

  • In portlets, how to use a html form passing  values to the another page?

    it is well known that in web developing , we have two methods to pass values to another page.<!--
    1. passing values
    2.<form action="nextPage" method ="post"></form>-->
    but how to use two methods in oracle portal portlets?
    I have got a simple example which submit two values to the page for itself, means a page has a form with submit botton, user input the form with values and then submit them by submit botton, then the page recevice those values and show it .
    this example is powered by oracle ,
    please have a look at these code:
    <br><br>
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@page import="java.util.*, oracle.portal.provider.v2.*" %>
    <%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
    <%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
    <%
    // The form submit URL refers to the current Portal page. All portlets
    // on this page share this URL. This means that the per portlet parameters
    // are in the same request. Portlets must ensure that its paramerters don't
    // collide either with other portlets or other instances of itself. This
    // is generally accomplished by using "fully-qualified" parameter names. A
    // fully-qualified parameter name prepends the (unique) portlet reference to
    // the parameter. The JPDK provides a utility to accomplish this.
    String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    // These are the session attribute names used to store the current values.
    // Because all instances of this portlet share the same user session we must
    // also fully-qualify these names to avoid collisions.
    String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
    String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
    PortletRenderRequest pRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String formName = UrlUtils.htmlFormName(pRequest,null);
    ProviderUser user = pRequest.getUser();
    ProviderSession providerSession = user.getSession();
    if (providerSession == null)
    %>
    Your provider session has been terminated or has timed out
    and you need to logout and then login to re-establish the session.
    <%
    else
    // Record, in session storage, the last values submitted.
    if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
    providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
    providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
    %>
    <!-- Output the HTML content -->
    <center>
    <table width="70%">
    <tr>
    <td>
    <b>This portlet shows how to post and process information from HTML forms.</b>
    </td>
    </tr>
    </table>
    <form name="<%= formName %>" method="POST"
    action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
    <%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
    <table>
    <tr>
    <td>
    <b>Name :</b>
    </td>
    <td>
    <input type="text" size="20" name="<%= fName %>" value="">
    </td>
    </tr>
    <tr>
    <td>
    <b>Age : </b>
    </td>
    <td>
    <input type="text" size="3" name="<%= fAge %>" value="">
    </td>
    </tr>
    </table>
    <br>
    <INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
    </form>
    <%
    if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
    %>
    <b>No values have been submitted yet.</b>
    <%
    } else {
    %>
    <b> Last submitted values:</b><br>
    <table>
    <tr>
    <td>
    <b>Name: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sName) %></b>
    </td>
    </tr>
    <tr>
    <td>
    <b>Age: </b>
    </td>
    <td>
    <b><%= providerSession.getAttribute(sAge) %></b>
    </td>
    </tr>
    </table>
    <%
    %>
    </center>
    <%
    %>
    <br><br>
    <br><br>
    <br><br>
    but I want to write the form in a page , and then show it on another page , how to write it ?
    I have read the pdk:
    oracle.portal.provider.v2.url Classes
    UrlUtils
    then I use these method , as this :
    //frist page:
    <br><br><br><br>
    <%@page contentType="text/html; charset=Big5"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    %>
    <%@ page import="oracle.portal.provider.v2.*"%>
    <%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
    <%
    PortletRenderRequest pReq = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <P>Hello <%= pReq.getUser().getName() %>.</P>
    <P>This is the <b><i>Show</i></b> render mode!</P>
    this is a program to test the passing value
    <%
    String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    PortletRenderRequest pr=(PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String formName=UrlUtils.htmlFormName(pr, null);
    %>
    <form name="<%=formName%>" method="post" action="<%=UrlUtils.htmlFormActionLink("/htdocs/passingvalues4/getValues.jsp")%>">
    <%= UrlUtils.htmlFormHiddenFields("/htdocs/passingvalues4/getValues.jsp") %>
    name:<input type="text" size="20" name="<%= fName %>" value="">
    p w :<input type="text" size="3" name="<%= fAge %>" value="">
    <INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
    </form>
    //getValues.jsp<br><br>
    <br><br>
    <%@page contentType="text/html; charset=Big5"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    %>
    <%@ page import="oracle.portal.provider.v2.*"%>
    <%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
    <%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
    <% String portletParamName = "mName";
    String portletParamAge = "mAge";
    String portletParamSubmit = "mSubmit";
    String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
    String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Big5">
    <title>untitled</title>
    </head>
    <body>
    Name:<%=fName%>
    Age :<%=fAge%>
    </body>
    </html>
    <br>then I deployed them on the portal , run it , the result is :after I submit it , the browser give me : http 404 page not found!
    [b]here is the provider.xml<br>[b[i]]<?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>PassingValues4</name>
    <title>PassingValues4</title>
    <description>PassingValues4</description>
    <timeout>60</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>/htdocs/passingvalues4/PassingValues4InputPage.jsp</showPage>
    <showPage>/htdocs/passingvalues4/getValues.jsp</showPage>
    </renderer>
    </portlet>
    </provider>
    <br><br><br>
    <br><br>
    would you kind enough to help me ? thanks!!!
    Message was edited by:
    moonsoft

    Hi Moonsoft,
    I have already answered this query in the other post at Re: how to link more than one links in portlet?(jsp develop)
    <form name = "showPageForm" method = "POST" action = "<%= UrlUtils.htmlFormActionLink(pReq,UrlUtils.PAGE_LINK) %>">
      <%= UrlUtils.htmlFormHiddenFields(pReq,UrlUtils.PAGE_LINK, "showPageForm") %>
      <input type="text" name="param1">
      <input type="text" name="param2">
      <input type="hidden" name="myPPN" value="/htdocs/page2.jsp">
    </form>then in your jsp code on page2.jsp, you will extract the parameters by specifying
    <%
      String p1 = request.getParameter("param1");
      String p2 = request.getParameter("param2");
    %>
    >>this is easy common jsp or asp development, but in oracle is too diffcult!!!!
    :-) .. there is a difference between web-applications and portlets, you just need to get used to it once. I hope this does clarify your doubts.
    thanks,
    Harsha

  • UTL_DBWS, XML Document as a parameter

    I'm struggling with using a fully formed xml document as a parameter to a web service.
    Using this code I'm able to connect to the web service and sans the arg1 argument everything works.
    When I as in the code below use xmltype.toStringValue() or xmltype.toClobValue() charachters like < and > is replaced with the html encoded version (&lt; and &gt;) which does'nt work very well with the recieving web service.
    All three parameters is defined as string on the recieving web service.
    I've been searching this forum and using google, but can't find any examples doing something like this.
    Any help or pointers appreciated.
    procedure forwardToQueue is
    svc_ sys.utl_dbws.service;
    call_ sys.utl_dbws.call;
    svc_qname sys.utl_dbws.qname;
    response sys.xmltype;
    request sys.xmltype;
    utMelding sys.xmltype;
    t1 sys.xmltype;
    t2 sys.xmltype;
    doc xmldom.DomDocument;
    fListe xmldom.DOMNodeList;
    tmpL xmldom.DOMNodeList;
    fElement xmldom.domNode;
    tmp xmldom.domNode;
    meldingId strliten;
    arg0_node xmldom.domnode;
    arg0_elmt xmldom.domelement;
    arg0_text xmldom.domtext;
    arg1_node xmldom.domnode;
    arg1_elmt xmldom.domelement;
    arg1_text xmldom.domtext;
    arg2_node xmldom.domnode;
    arg2_elmt xmldom.domelement;
    arg2_text xmldom.domtext;
    child_doc xmldom.domdocument;
    main_node xmldom.domnode;
    root_node xmldom.domnode;
    root_elmt xmldom.domelement;
    x sys.xmltype;
    c varchar2(32000);
    bs_chr strmax;
    l_service sys.UTL_DBWS.service;
    l_call sys.UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean?wsdl';
    l_namespace strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean';
    l_service_qname sys.utl_dbws.qname;
    begin
    procName := 'hentQueue';
    pl('*************** '||procName||' ***************');
    svc_qname := sys.utl_dbws.to_qname(null, 'SIMSFacadeBeanService');
    svc_ := sys.utl_dbws.create_service(svc_qname);
    call_ := sys.utl_dbws.create_call(svc_);
    sys.utl_dbws.set_target_endpoint_address(call_, 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'sendMessage');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'document');
    x := genererSvar;
    doc := xmldom.newDOMDocument;
    main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createelement(doc, 'q0:sendMessage');
    xmldom.setattribute(root_elmt, 'xmlns:q0', 'si.sims.intern.service');
    root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
    -- Adding arg 0 as a string
    arg0_elmt := xmldom.createelement(doc, 'arg0');
    arg0_node := xmldom.appendchild(root_node, xmldom.makenode(arg0_elmt));
    arg0_text := xmldom.createtextnode(doc, '2');
    arg0_node := xmldom.appendchild(arg0_node, xmldom.makenode(arg0_text));
                   -- Adding arg 1 as a string
    arg1_elmt := xmldom.createelement(doc, 'arg1');
    arg1_node := xmldom.appendchild(root_node, xmldom.makenode(arg1_elmt));
    arg1_text := xmldom.createtextnode(doc, x.getClobVal());
    arg1_node := xmldom.appendchild(arg1_node, xmldom.makenode(arg1_text));
    -- Adding arg 2 as a string
    arg2_elmt := xmldom.createelement(doc, 'arg2');
    arg2_node := xmldom.appendchild(root_node, xmldom.makenode(arg2_elmt));
    arg2_text := xmldom.createtextnode(doc, 'false');
    arg2_node := xmldom.appendchild(arg2_node, xmldom.makenode(arg2_text));
    request := xmldom.getxmltype(doc);
    pl('Request:');
    pl(request.getStringVal());
    response := sys.utl_dbws.invoke(call_, request);
    pl('Showing respons');
    pl(response.getStringVal());
    doc := DBMS_XMLDOM.newDomDocument(response);
    sys.utl_dbws.release_call(call_);
    sys.utl_dbws.release_service(svc_);
    end forwardToQueue;

    Is the Document well defined via schema? You might be able to use the autotype
    ant task to generate a serializer.
    Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
    on the return. The calling app will need to understand that the string is xml,
    and then desrailize it manually.
    Mike
    "Surya" <[email protected]> wrote:
    >
    I have web service which has to retuen an XML document (org.w3c.dom.Document)
    as
    a paramter. Since this is not a supported data type for in-out paramaters,
    I will
    have to serialize and write my own converter. What is the best solution?
    Is there
    any class/library that can convert the document into String which I can
    return
    as a parameter and again get create a XML document in the client side.
    Thanks -Surya

  • Question about running a servelt using HTML form.

    Hi, Im new to Servlets , I have created a servelt with this code :
    package oracle.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        private static final String DB_URL = "jdbc:oracle:thin:@localhost:1521:ahmaddb";
        private static final String DB_USERNAME = "fundinfo";
        private static final String DB_PASSWORD = "tadapps";
        private static Connection con;
        private String pass;
        private String name;
    /*init() : invoked by the servlet engine before the servicing of client requests
    - Can be used to retrieve initialization parameters
    – Takes a ServletConfig object as a parameter
    – Is invoked when the servlet instance is created
    – Is useful for obtaining database connections from a connection pool*/
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
            //config.getInitParameter(arg0);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
    response.setContentType(CONTENT_TYPE);
            //PrintWriter : Print formatted representations of objects to a text-output stream.
            //getWriter() : Returns a PrintWriter object that can send character text to the client.
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>My First Servlet</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a GET. This is the reply.</p>");
            out.println("</body></html>");
            out.close();
        public void doPost(HttpServletRequest request,
                           HttpServletResponse response) throws ServletException,
                                                                IOException {
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            name = request.getParameter("user_name");
            pass = request.getParameter("user_password");
            boolean result = verifyPassword(name, pass);
            out.println("<html>");
            out.println("<head><title>LoginServlet</title></head>");
            out.println("<body>");
            if (result == true){
            out.println ("Hello " + name + ": Your login module is working great!");
            else{
            out.println ("Invalid user name or password");
            out.println ("</body></html>");
            out.close();
            // out.println("<p>The servlet has received a POST. This is the reply.</p>");
            //out.println("</body></html>");
            //out.close();
        public void configureConnection() throws SQLException {
        try{
        Class.forName("oracle.jdbc.OracleDriver");
        con = DriverManager.getConnection(DB_URL, DB_USERNAME,DB_PASSWORD);
        con.setAutoCommit(true);
        catch (Exception e){
        System.out.println("Connection failed: " +e.toString());
        public Connection getConnection() throws SQLException
        configureConnection();
        return con;
        protected boolean verifyPassword(String theuser, String password) {
        String originalPassword = null;
        try {
        con = getConnection();
        Statement stmt = con.createStatement();
        stmt.executeQuery("select password from login where uname='"+theuser+"'");
        ResultSet rs = stmt.getResultSet();
        if(rs.next())
        //>>
        originalPassword = rs.getString(1);
        stmt.close();
        if(originalPassword.equals(password)) {
        return true;
        else {
        return false;
        catch (Exception e){
        System.out.println("Exception in verifyPassword()="+e.toString());
        return false;
    }and created an HTML form to target this servlet
    <form action="/loginservlet" method="post">,
    when I enter the the credintials I get this output in the webpage :
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

    Thanks , yes it is added to the web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
        <description>Empty web.xml file for Web Application</description>
        <servlet>
            <servlet-name>LoginServlet</servlet-name>
            <servlet-class>oracle.servlets.LoginServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>LoginServlet</servlet-name>
            <url-pattern>/loginservlet</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>35</session-timeout>
        </session-config>
        <mime-mapping>
            <extension>html</extension>
            <mime-type>text/html</mime-type>
        </mime-mapping>
        <mime-mapping>
            <extension>txt</extension>
            <mime-type>text/plain</mime-type>
        </mime-mapping>
    </web-app>Anymore suggestions?

  • Render xml and html content type in single jsp

    I have 2 jsps, one jsp(a.jsp) is throwing content-type as HTML and other JSP(b.jsp) is throwing content-type as xml. I am making use of xsl to render the xml content in html format. But the problem is that i want to include b.jsp in a.jsp, and when i do so b.jsp doesn't make use of xsl for its rendering rather it displays the contents haphazardly.
    Plese help if somebody knows the solution.

    Below the following line ..
    <html:form action="addContact">Add this new form field..
    <html:hidden name="flag" value="0"/>Needless to say that this String variable flag should be defined in your ActionForm.
    Next, instead of ...
    <html:submit property="parameter"><bean:message key="ok.company" /></html:submit>Put this ...
    <input type="button" name="xyz" onClick="callSubmit(1);" value='<bean:message key="ok.company" />'>Then add a JS function as below ...
    <script>
    function callSubmit(flg)
         document.forms[0].flag.value=flg;
         document.forms[0].submit();
    </script>Finally in your ActionServlet, you need to find the value of the ActionForm variable flag via request.getParameter("flag").
    In case the value is set to 1, then it means that you need to send the particular row to DB. You may add additional flag values to correctly identify theparticular row which you may want to send to DB.
    Hope you got it.
    -Rohit

Maybe you are looking for

  • Posting period price valuse of the stock

    Hi We are customize the report refer to MB5B. in mb5b it show the total value and the stock for the material for the date that we gvien. ( even in the old date) we trying to capture the value for stock for the sto loca wise. we need to know that how

  • How do I get all of my calendar events back, 7 years worth?  I just lost them...

    I've been trying to get my calendar to update on my iphone since I updated to Maverick.  I finally started using iCloud again and now I have lost ALL of my calendar information on my computer from the past 7 years.  It can't be gone, gone, can it?  H

  • 6140 and Linux woes

    Hi, I have a 6140 array attached to 2 McData 4400 (4 connections - each controller connects to each 4400). Attached to the the 4400s i have several boxes, namelly some x4100s. the 4100s have each a dual port QLogic QLA2462 (sun branded). Those boxes

  • Help, PC crashed

    help help help. My PC crashed and I have had to restore everything. My mini iPod only had around 300 songs on it, but after installing the iTunes CD again it is not allowing me to update my new tunes. Can someone please tell me whta to do.. i have do

  • Backup without time machine ?????

    Can a time capsule be used as an automatic backup, if there is no macs with time machine connected? We have a mac with retrospect on it which i heard could work????????? What about on a pc, is there any software which would run with bonjour to make t