Make html form send xml

hi,
i am facing a bsp-development in XI-context. As the XI expects xml-input via http-channel I need to set up forms which can send the query-string as xml.
eg
thisPageToXI.htm?name=john&job=nap&age=34&...
I was looking in my WAS and found a couple of function modules, which can convert stuff to xml - most of them derived from crm apparently. But they're all a bit unhandy.
How would you deal with that task?
thanx in advance,
matthias

Matthias,
Always in these discussions confusion is abound because questions is not formulated perfectly.
First you write: "I need to set up forms which can send the query-string as xml". In this picture I have a browser, and when the request leaves the browser to go somewhere, you expect the payload to be in XML format.
But then you write this example: "?name=john&job=nap&...". Hmmm.. here things are just simple name/value pairs. No XML.
And then suddenly you write "I was looking in my WAS ...can convert stuff to xml". So now we are suddenly on the server, without XML in hand, but wanted it.
All confusion. So let we first draw a picture:
(1) browser --XML--> XI
(2) browser --name/values--> WebAS(BSP) --XML--> XI
In scenario 1, the browser prepares the XML document directly, and sends it directly to the XI server. I know of no technique to achieve this form HTML. Your posted examples using the ActiveX XML object in the browser is probably the only way to go. Will just require some JavaScript to find all the correct formfields, and feed all of this into XML object.
In scenario two you just submit a normal request to the server. You use something such as get_form_fields and concatenate to build the XML string. Then you make an outgoing HTTP connection to XI using the HTTP Client. Somewhere we have examples of how this can be done.
But first, for me at least, is the question of what you wish to achieve.
b.

Similar Messages

  • Render html form & send forms's input values as params via HTTP POST

    Hello,
    I'm using appache commons http client to send HTTP post queries to a given url and receive HTTP response then process it.
    one of the requirements of my Application is the following: one of these HTTP Post requests is supposed to return an HTML form with different html types (text filed, text area etc..) that i will need to display in my swing application. one important requirement is that i can't know in advance what the html form field types will be.. it depends on a given parameters that my application send as part of HTTP Post method (using apache http client).
    I Longly searched for a simple solution to this problem . There are many solutions but each one has it's limitations :
    1-i can render the html form inside a JEditorPane .but how can I collect the user entered data inside JEditorPane ? i'm not sure this swing component offers the capability to detect its html contents and more it will be difficult to know what are the values entered by user inside html form rendered by JEditorPane.
    2-are there any Java Embedded browsers that offer some API to enable me detect the html form fields ,capture the data entered by user inside the html form ?
    3-the solution i currently opted for is : parse html & convert html form to swing dialog. currently this solution i use works well but the cost of implementing it is high : it involves difficult parsing logic. this makes me worried .I'm not sure if i'm now using the right & easiest solution.
    I need some advice on What is the simplest and clean solution to render a html form & yet be able to collect user entered inputs & send the user input values as params via java HTTP POST request ?

    dragzul wrote:
    In my opinion, your actual solution is what you need to do. You're trying to "merge" two different kinds of view. Actually, the "easiest" way may be: if you have your data to display, you decide to show it on html or swing.Yes i believe that my current solution may be the unique one for my special requirements. when doing research about this problem i found a multitude of java libraries to convert xml to swing (ex: www.swixml.org) .However i was surprised there are no java libraries to convert HTML forms to swing dialogs -as far as i know-. this is a bit strange. The Limitation is that the developers of the server API are not Java guys and are reluctant to use an xml format that i can easily convert to swing . probably they have their own reasons as they might be using the HTML Response for some other server side work. So I was obliged to deal with an HTML stream that i need to display in my client application and process its data. in my opinion the only way to do this is by developing a HTML form to swing converter package. that's what i did now. i was only worried if i'm complicating things and if there are some easier solutions to this issue.
    thanks

  • Can a HTML form send data to two servlets?

    I would like to know if an HTML Form can send data to two servlets, I guess I am askin is that can the parameters be passed to two ACTION attributes??

    Hmmmm, well I'm not sure if that is possible, but you could do something of the sort on the server side by chaining them.... the technieque is called Servlet Chaining
    Hope this helps
    Omer

  • Creating dynamic HTML form from XML data in session

    I'm a bit new to servlets, please bear with me if I don't make myself clear.
    currently i have a HttpServlet that extracts a XML document into a jdom Document.
    this is done within the doGet() method as the XML document is in the session object.
    i would like to create a popup window (a JSP or servlet) that can access the same session, convert some of the data in the XML to a submit form that users can put input into, and have the JSP(or maybe servlet) send the form data and the XML back to the original HttpServlet (through the session object).
    i have a few questions on how to make this happen:
    1.how to create a popup window (JSP or servlet) in a servlet, and forward the session data as well?
    2.if the popup window has a submit form that submits some extra data back to the original httpservlet, will the XML document still be retained in the session?
    and any advise on how to go about this problem is highly appreciated!

    Hi,
    This is my first time posting a reply. Hope this helps.
    I am assuming that you are hitting the servlet from a link. This is one way of doing it. You can create a new window using Javascript. like this.
    <script language="javascript">
    var popupWin
    function openWindow(page){
    popupWin=window.open(page,"","width=800,height=600,resizable,scrollbars");
    </script>
    link
    The response of your servlet will be in the new pop-up window.
    2.if the popup window has a submit form that submits
    some extra data back to the original httpservlet,
    will the XML document still be retained in the
    session?The session should be retained as long as you are hitting the same servlet container . You should be able to access the seesion variable in the original servlet if the form in the pop-up window calls the original servlet.
    --mv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to make submit form submit xml differently

    Hello,
    The acrobat built in submit form button which submits xml expects the receiving server to be able to read the XML unlimited. Unfortunately I can't do this with Lotus Domino server 6.5.
    I am looking for a way to save the XML data to a file and upload it to a website as if the user had saved and uploaded it themselves, but automated using some javascript on a button. Is this possible? Any examples/help/pushes in the right direction greatly appreciated.

    Looks like my problem was just the TARGET=_blank> stuff. I change the code to the following:
    DECLARE
    l_url VARCHAR2(200);
    begin
    l_url:=
    '/portal/page?_pageid=154,107011&_dad=portal&_schema=PORTAL';
    PORTAL.wwa_app_module.set_target(l_url,'CALL');
    exception
    WHEN OTHERS then
    htp.p(SQLERRM);
    end;
    That works fine and instead of putting it in place of the INSERT button code I left that alone and put it in the "After form processing" pl/sql code. Now it works pretty well. The only thing left to fix is that it loses all my current Page Parameter values when forwarding the url like that.
    David

  • Jsp/html form- servlet- xml parsing

    does anyone have an example or know of a place where I can get code
    which passes XML from jsp/html to servlet which parses the xml???
    will be appreciated..........thanks

    Hi,
    Are u trying to acheive indpendent of browser solution or just want to know the things..
    well,I have one idea ok.
    Using JavaScript Constructs the XmL as u want, "let say
    <root><name>Lokesh</name><age>25</age></root>" before submitting the page(I mean frm.submit()) assign to a hidden variable, since you have post kind of submit back at the servlet from the request object get the value and store it as String and using StringReader you just parse the XML
    Just try the above one the below code
         public org.w3c.dom.Document getXMLDocument() throws IllegalStateException,Exception
                        if (!containsXMLDocument())
                                  throw new IllegalStateException("This request does not contain an XMLDocument");
                   javax.xml.parsers.DocumentBuilderFactory dbf=javax.xml.parsers.DocumentBuilderFactory.newInstance();
                   javax.xml.parsers.DocumentBuilder db=dbf.newDocumentBuilder();
                   java.io.StringReader strRdr=new java.io.StringReader(_xmlString);
                   org.xml.sax.InputSource ipSrc=new org.xml.sax.InputSource(strRdr);
                   org.w3c.dom.Document doc=db.parse(ipSrc);
                   return doc;
    best of luck..
    With Regards
    Lokesh T.C

  • How can I change the order of html form data submitted to me via email?

    I am having customers contact me via an html form posted on my website using the "sendtoemail" command. When I receive the data in an e-mail it  is not presented in the order it appears on the web page and I can't seem to find out what dictates the order the data is presented in or how I can change it.
    Anyone have any ideas on how I can make HTML form data elements appear in the order I want?
    Thanks,
    Andy

    Or find a commercial form-to-email script that is compatible with your server's configuration (PHP, ASP, Perl...) and customize it to your needs.
    Formm@ailer PHP from DB Masters
    http://dbmasters.net/index.php?id=4
    FormToEmail.com (free & pro versions available)
    http://formtoemail.com/formtoemail_pro_version.php    
    Tectite
    http://www.tectite.com/formmailpage.php
    Forms to Go from Bebosoft (script generating software)
    http://www.bebosoft.com/products/formstogo/overview/
    Nancy O.

  • 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

  • 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

  • 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

  • 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.

  • 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

  • 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?

  • Send.Asp File error does not send html form

    Hi,
    on my site I have a "contact us" page that contains an html form which I would like to be sent to a specific email once the user clicks on "send".
    I'm trying to do so with POST action connected to send.ASP file. but I keep getting this erro:
    CDO.Message.1 error '800401e4'
    Invalid syntax
    /send.asp, line 15
    Here is the Send.ASP code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Message from site"
    myMail.From="[email protected]"
    myMail.To="[email protected]"
    myMail.CreateMHTMLBody "Name: " + Request.Form("Name") + "<br/>tel no: " + Request.Form("Tel_code") + Request.Form("Tel") + "<br/>Cell no: " + Request.Form("Cell_code") + Request.Form("Cell") + "<br/>Email: " + Request.Form("Email") + "<br/>Subject: " + Request.Form("Subject") + "<br/>message: " + Request.Form("Substence")
    myMail.Send
    set myMail=nothing
    %>
    </body>
    </html>
    here is my html form code:
    שם פרטי ומשפחה
    דואר אלקטרוני
    טלפון
    02
    03
    04
    08
    073
    077
    נייד
    052
    054
    057
    נושא
    תוכן ההודעה

    Hi,
    on my site I have a "contact us" page that contains an html form which I would like to be sent to a specific email once the user clicks on "send".
    I'm trying to do so with POST action connected to send.ASP file. but I keep getting this erro:
    CDO.Message.1 error '800401e4'
    Invalid syntax
    /send.asp, line 15
    Here is the Send.ASP code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Message from site"
    myMail.From="[email protected]"
    myMail.To="[email protected]"
    myMail.CreateMHTMLBody "Name: " + Request.Form("Name") + "<br/>tel no: " + Request.Form("Tel_code") + Request.Form("Tel") + "<br/>Cell no: " + Request.Form("Cell_code") + Request.Form("Cell") + "<br/>Email: " + Request.Form("Email") + "<br/>Subject: " + Request.Form("Subject") + "<br/>message: " + Request.Form("Substence")
    myMail.Send
    set myMail=nothing
    %>
    </body>
    </html>
    here is my html form code:
    שם פרטי ומשפחה
    דואר אלקטרוני
    טלפון
    02
    03
    04
    08
    073
    077
    נייד
    052
    054
    057
    נושא
    תוכן ההודעה

  • 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

Maybe you are looking for