Http post and Alfresco web script

Hi all,
I'm wondering how to send the content of an XFA form into an Alfresco ECM instance. So far, I've been using "email submit buttons" by mail, but I think submitting the xml content directly into an Alfresco space could be feasible without too much trouble.
I'm trying to adapt the online script fromLiveCycle documentation
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=001677.html
same in version 9 : http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=001303.html
which are about the same docs as the ones on Alfresco wiki (http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload) although LiveCycle is only based on Alfresco AFAIK.
I don't want to use an HTML form, but directly send my form from my pdf xfa form. I made a small test using a fixed url on an HttpSubmitButton
http://localhost:8080/alfresco/s/upload?guest=true&fileName=liveCycleDocument&title=myTitl e&description=myDescription&content=myContent
On Alfresco, the document is created with the correct args values. But I still don't know how to send the real form content to the URL.
I checked on this document http://partners.adobe.com/public/developer/en/livecycle/lc_understanding_submit_tip.pdf where I discovered I can use a custom submit button to send the datasets, but still cannot get my form xml data.
I hope someone will have a clue about LiveCycle/Alfresco communication.
Thx
Best regards,
jgrd

@Srini
Yes of course :
in Data Dictionary/Web Scripts (or Web Scripts extensions): create the 3 files
You may use spaces for package/subpackages:
- pdfform.post.desc.xml
     <webscript>
     <shortname>pdf form</shortname>
     <description>processing pdf form</description>
     <url>/pdfform</url>
     <authentication>guest</authentication>
     </webscript>
- pdfform.post.js :
upload = companyhome.createFile("form." + companyhome.children.length + "." + args.fileName) ;
upload.properties.content.content = requestbody.content;
upload.properties.encoding = "UTF-8";
upload.properties.title = args.title;
upload.properties.description = args.description;
upload.save();
model.upload = upload
-pdfform.post.html.ftl (freemarker)
<html>
<head>
   <title>Test pdf form</title>
  </head>
<body>
done !
</body>
</html>
- Register the script by refreshing the page http://localhost:8080/alfresco/s/index
or with curl -X POST "-uadmin:admin" -d "reset=on" http://localhost:8080/alfresco/s/index (as mentioned by Jeff Potts)
- try it with from a pdf
use a plain button, select "Submit", Submit to URL = "http://localhost:8080/alfresco/s/pdfform?guest=true&fileName=myFileName.xml&title=myTitle& description=myDescription", Sumit As = XDP
Test done with Alfresco 3.3CE, LiveCycle 8.2.1/Adobe 9.3
Hope all this will is correct as I'm learning web scripts,
Regards,
jgrd

Similar Messages

  • How to submit both HTTP post and a PDF

    I would like to know how to submit HTTP post and a PDF to a HTTPS web server that will have a php code to parse. Any ideas would be great.
    -Dev

    If you drop a regular button on the form and make it a submit button. In teh Submit panel you can control what is being submitted. One of the options is a PDF and another is an XDP (XML Data Package) where you can control what is in th epackage. One of the options for the package is the completed PDF (base64 encoded). If you use the XDP option you will get all of your data in XML and you will get the completed PDF in a separate node. I believe the node is Chunk. Then you can get the Chunk node an decode it and voila there is your data and completed PDF in a single transmission.

  • Difference between HTTP Post and Webservice call

    Hi,
    Can anybody let me know the difference between HTTP Post and Webservice Calls and also how each one of them is acheived through BPEL.
    Thanks,
    Adi

    Hi Adi,
    The protocol may be the same but the "idea" is different...
    I recommend you reading this:
    http://www.w3schools.com/webservices/ws_intro.asp
    Cheers,
    Vlad
    Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question. If you think this is helpful, please consider giving points.

  • Http Proxy and Java Web Start 1.4.2_08

    Hi All,
    I'm confused as to how Java Web Start is supposed to work with an HTTP proxy. I'm testing an application in an environment which has an http proxy.
    Our application starts successfully with Web Start but the application is failing to connect to URLs. I have dumped the properties right when the app starts and proxyHost, proxyPort, http.proxyHost, http.ProxyPort are all set correctly. But every attempt to connect to URLs timeout.
    Note that running under 1.5, I get the value of the
    javaplugin.proxy.config.list property and use it to set the properties http.proxyHost and http.proxyPort. Then I am able to connect successfully to the same URLs which failed in 1.4.2_08 ( also fails
    with 1.4.2_03).
    Can someone please help me understand what's wrong here?
    Many thanks,
    Jason

    Actually, what I observed, in 1.4.2_08, is that the https.proxy* properties are being set. The http.proxy* properties are not set.
    in 1.5.0_04 none of the properties are set except for
    javaplugin.proxy.config.list, which I use to set http.proxyHost and http.proxyPort.

  • HTTP POST and Internet Explorer

    Sorry for the cross post, but after reading through this newsgroup, it
              seems that this audience is better suited to answer this question...
              ===========================
              We're running across a very strange bug that is happening only in
              Internet Explorer and only when posting form data. Netscape works
              completely fine every single time.
              The user experience is this:
              Using IE, I get to a JSP that's got a form. I click a button on said
              form that performs either a "Save" or a "Cancel" action and am
              immediately hit with the wonderful "This page cannot be displayed(Cannot
              find server or DNS Error)" IE error message.
              What happens on the server side is this:
              User posts a form to a JSP. The JSP does any processing that it needs
              to, which in the case of "Cancel" is nothing, and issues these commands:
              response.sendRedirect("/some/page.jsp");
              return; //exit program immediately!
              I've verified that the server is executing as expected, sending the
              response and returning out of the program. That's where things seem to
              go awry in Internet Explorer. It's as if IE is not interpreting the
              HTTP response header correctly and just dies not knowing where to go.
              The even stranger thing is that, when running WLS on our internal
              network, this does not happen unless your dialed up. However, when
              hitting our servers that are colocated, this happens on a regular basis.
              One more thing to note is that this does not happen every time. It
              happens more than 90% of the time, but not every time, which is why it's
              very hard for me to recreate.
              Another strange thing is that this error seems to depend on the content
              of the form
              variables, for instance I can have a form with check boxes that errors
              out when the
              check boxes are unchecked, but is fine when the boxes are checked, and
              in both
              cases I'm not doing anything at all with the data that is getting
              posted.
              I've tried everything from changing the http headers to changing the
              post to be
              multipart encoded, and nothing works.
              If you've got a clue or a hint or any suggestions where I should be
              looking, then please let me know. I've got a few more things to check
              out, but I'm running out of ideas.
              Our platform:
              - RedHat Linux 6.0
              - WebLogic Server 4.5.1 Service Pack 5
              - JDK 1.2.2 (Sun/Blackdown)
              These JSPs:
              - Are posting form data ("GET" works for some reason)
              - Are not using any JavaScript
              

    Hi Chris/All,
              Following on from this I contacted WebLogic support (Frederic). They
              suggested I downgrade from 4.5.1 sp8 to 4.5.1 sp7. They also suggested I
              use HttpResponse.encodeURL()...
              This did not solve my problem but I went on to discover the following...
              Hi Frederic,
              We tried with sp7
              I thought HttpResponse.encodeURL just encoded session data where no cookie
              support was in the browser, but I tried it anyway.
              Also tried the following to the page I'm redirecting back to (to prevent
              browser cacheing)
              resp.setHeader("Cache-Control","no-cache"); file://HTTP 1.1
              resp.setHeader("Pragma","no-cache"); file://HTTP 1.0
              resp.setDateHeader ("Expires", 0); file://prevents caching at the proxy
              server
              Also added the following to override the standard implementation
              protected long getLastModified(HttpServletRequest req)
              System.out.println("ServletA.getLastModified"); // ensure lastModified is
              always in the future requiring a reload
              return Long.MAX_VALUE;
              The only way I've been able to force this to work is a bit of a cludge and
              is as follows...
              // add time to queryString to fool IE5 into thinking this is a new web page.
              String parentURL = HttpUtils.getRequestURL(req) + "?" + req.getQueryString()
              + "&t=" + System.currentTimeMillis();
              The following is also of interest
              http://forum.java.sun.com/forum?14@@.787c19c1
              HTH, Let me know
              Thanks, Gary
              Gary <[email protected]> wrote in message
              news:[email protected]...
              > This sounds similar to a problem I'm having with straight Servlets.
              >
              > I have a servlet (ServletA) that has a link to another servlet via <a
              href>
              > tags (ServletB). ServletB does some processing and calls ServletA with
              > original parameters to show the user the changed details. This is done as
              > follows...
              >
              > respose.sendRedirect(ServletA?params);
              > return;
              >
              > Once again this is fine in Netscape 4.07 but only works on IE5 machine
              here
              > to date (which unfortunately happens to be mine, leading to my late
              > discovery of this problem).
              >
              > My IE version is 5.00.2314.1003 if that helps.
              >
              >
              > Chris Fraser <[email protected]> wrote in message
              > news:[email protected]...
              > > Sorry for the cross post, but after reading through this newsgroup, it
              > > seems that this audience is better suited to answer this question...
              > > ===========================
              > > We're running across a very strange bug that is happening only in
              > > Internet Explorer and only when posting form data. Netscape works
              > > completely fine every single time.
              > >
              > > The user experience is this:
              > > Using IE, I get to a JSP that's got a form. I click a button on said
              > > form that performs either a "Save" or a "Cancel" action and am
              > > immediately hit with the wonderful "This page cannot be displayed(Cannot
              > >
              > > find server or DNS Error)" IE error message.
              > >
              > > What happens on the server side is this:
              > > User posts a form to a JSP. The JSP does any processing that it needs
              > > to, which in the case of "Cancel" is nothing, and issues these commands:
              > >
              > > response.sendRedirect("/some/page.jsp");
              > > return; file://exit program immediately!
              > >
              > > I've verified that the server is executing as expected, sending the
              > > response and returning out of the program. That's where things seem to
              > > go awry in Internet Explorer. It's as if IE is not interpreting the
              > > HTTP response header correctly and just dies not knowing where to go.
              > >
              > > The even stranger thing is that, when running WLS on our internal
              > > network, this does not happen unless your dialed up. However, when
              > > hitting our servers that are colocated, this happens on a regular basis.
              > >
              > > One more thing to note is that this does not happen every time. It
              > > happens more than 90% of the time, but not every time, which is why it's
              > >
              > > very hard for me to recreate.
              > >
              > > Another strange thing is that this error seems to depend on the content
              > > of the form
              > > variables, for instance I can have a form with check boxes that errors
              > > out when the
              > > check boxes are unchecked, but is fine when the boxes are checked, and
              > > in both
              > > cases I'm not doing anything at all with the data that is getting
              > > posted.
              > >
              > > I've tried everything from changing the http headers to changing the
              > > post to be
              > > multipart encoded, and nothing works.
              > >
              > > If you've got a clue or a hint or any suggestions where I should be
              > > looking, then please let me know. I've got a few more things to check
              > > out, but I'm running out of ideas.
              > >
              > > Our platform:
              > > - RedHat Linux 6.0
              > > - WebLogic Server 4.5.1 Service Pack 5
              > > - JDK 1.2.2 (Sun/Blackdown)
              > >
              > > These JSPs:
              > > - Are posting form data ("GET" works for some reason)
              > > - Are not using any JavaScript
              > >
              >
              >
              

  • HTTP POST and open external result

    Hi
    Now I'm working through payment system.
    I created APEX process like this:
    DECLARE
    post_str VARCHAR2 (4000) := 'p1=A&p2=B';
    req UTL_HTTP.req;
    resp UTL_HTTP.resp;
    v_buffer VARCHAR2 (1024);
    BEGIN
    req :=
    UTL_HTTP.begin_request (url => 'http://www.somesite.com/index.php',
    method => 'POST'
    UTL_HTTP.set_header (r => req,
    NAME => 'Content-Type',
    VALUE => 'application/x-www-form-urlencoded'
    UTL_HTTP.set_header (r => req,
    NAME => 'Content-Length',
    VALUE => LENGTH (post_str)
    UTL_HTTP.write_text (r => req, DATA => post_str);
    resp := UTL_HTTP.get_response (r => req);
    LOOP
    UTL_HTTP.read_line (resp, v_buffer, TRUE);
    DBMS_OUTPUT.put_line (v_buffer);
    END LOOP;
    UTL_HTTP.end_response (resp);
    EXCEPTION
    WHEN UTL_HTTP.end_of_body
    THEN
    UTL_HTTP.end_response (resp);
    END;
    Generaly it works but on the end I have to receive result from external site (http://www.somesite.com/index.php). In this site is PHP FORM wchich a have to manualy submit, according this probably in my process I have to exit from APEX but I don't know how. Of course exit has to be with this same POST session.

    If nobody can halp me, maybe other way will be easier for example:
    I want page created in apex with form, but form has to send value to external Web Page. (One condition I can't use link with values /GET method/)

  • HTTP POST to a php script

    I have a java applet and I need to write to a file, since I can't do that directly, I am calling a php script to write to the file. Here is the relevant code in the .java file
    URL myURL=null;
    URLConnection urlConn=null;
    DataOutputStream printout=null;
    DataInputStream input=null;
    try{
         myURL=new URL(getCodeBase(),"writeFromFile.php");
         }catch(Exception easidghih){JOptionPane.showMessageDialog(null,"WRITETOFILE");}     
    try{
         urlConn=myURL.openConnection();
         }catch(Exception w){JOptionPane.showMessageDialog(null,"openConnection()");w.printStackTrace();}
    try{urlConn.setDoInput(true);
         urlConn.setUseCaches(false);
    catch(Exception a){JOptionPane.showMessageDialog(null,"Exception here");}
    try{
         urlConn.setDoOutput(true);
         PrintWriter out=new PrintWriter(urlConn.getOutputStream());
         out.println("File="+username+"P.txt"+"&text="+(Long.toString(number)));
         out.close();the text of the php file, "writeFromFile.php" is below.
    <HTML>
    <BODY>
    <?php
    print "BOB";
    $File=$_POST["File"];
    $text=$_POST["text"];
    $filename=$File;
    $fp=fopen($filename,"w");
    $string=$text;
    $write=fputs($fp,$string);
    fclose($fp);
    ?>
    </BODY>
    </HTML>The file writing works fine when I have a separate file with a form to fill out in HTML. But when I run the java applet it gives no errors, but the file writing doesn't work.

    have made a php file what will display a number,
    <?
    $brush_price = 5;
    $counter = 10;
    echo "<table border=\"1\" >"."\n";
    echo "<tr><th>Quantity</th>"."\n";
    echo "<th>Price</th></tr>"."\n";
    while ( $counter <= 100 ) {
        echo "<tr><td>"."\n";
        echo $counter;
        echo "</td><td>"."\n";
        echo $brush_price * $counter;
        echo "</td></tr>"."\n";
        $counter = $counter + 10;
    echo "</table>"."\n";
    ?>no i want to get the tables with java
    import java.io.*;
    import java.net.*;
    class URLConnect
       void connection()
         try
         int taken;
         String fileName = "C:/abhishek/connected.txt";
         FileWriter fileWriter = new FileWriter( fileName );
          BufferedWriter bufferedWriter = new BufferedWriter( fileWriter );
          URL url = new URL"http://192.168.1.102/rapidclaims/httpsdocs/test/abhishek/abhi/while.php");
          URLConnection urlconnection = url.openConnection();
          System.out.println("url is: " + url+"\n");
          System.out.println("Type is: " + urlconnection.getContentType()+"\n");
            int length = urlconnection.getContentLength();
            System.out.println("Length is: " + length+"\n");
            InputStream in = urlconnection.getInputStream();
            int i=0;
            while ((taken = in.read()) != -1)
              System.out.print((char) taken);
              bufferedWriter.write(taken );
            bufferedWriter.close();
          catch (Exception ee)
           System.err.println("Got an exception!!!! ");
           ee.printStackTrace();
    class display
      public static void main (String[] args)
        try
           URLConnect test1= new URLConnect();
            test1.connection();
        catch (Exception ee)
        System.err.println("Got an exception!!!! ");
         ee.printStackTrace();
    }but no success . earlier it was working to extract out the strings
    plesase anybody know help with a suitable source code[/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HTTP POST and socket

    Hi,
    I'm trying to post data with the code below, using a Socket.
    The server answers with HTTP/1.1 200 OK, but doesn't get the parameters.
    I don't want to use HttpUrlConnection because I do need a timeout.
    So if anyone feels like checking my code, here it is (sample, i've removed the "try-catches" to reduce it):
    Socket soc = new Socket(host, port);
    soc.setSoTimeout(timeout);
    PrintWriter out = new PrintWriter(new OutputStreamWriter(soc.getOutputStream()));
    BufferedReader b = new BufferedReader(new InputStreamReader(soc.getInputStream()));
    //maybe the line below is wrong... I'm searching...
    String data = "name=krosso\notherParameter=value";
    String outString = "POST /useradm/testComm2.htm HTTP/1.0\nContent-Length: "+data.length()+"\n\n"+data;
    System.out.println("Request = ["+outString+"]");
    out.println(outString);
    out.flush();
    System.out.println("Response = [");
    String s;
    while(true)
         s=b.readLine();
         if (s==null) break;
         System.out.println(s);
    System.out.println("]");
    Thanks!

    POST request are writte like GET requests:
    name=myName&address=myAddress ....
    After the Header there is a linefeed carriage return pair:
    \r\n\r\n
    A Header could look like this:
    POST /file.php HTTP/1.0 //-->"\n"
    Content-length: 35 //-->"\r\n\r\n"
    name=myName&address=myAddress
    But it still doesnt work over Socket, don�t ask me why...
    If there you have found the solution please post it here. THX

  • HTTP Post and Java Stack

    Does the java stack need to be installed for ECC5 to send a message via HTTP?
    Edited by: Kim Holloway on Dec 16, 2010 10:55 PM

    ECC is can send the data through ABAP Stack , No java stack required.
    Regards,
    Ravi.

  • Retrieve data/files fro HTTP POST request in On-Demand process

    Hello,
    I would like to integrate https://github.com/blueimp/jQuery-File-Upload to my APEX 4.2 application inside XE11g. I would like to use this kind of jQuery component, multiple file upload, use Drag & Drop, image resize, size limit, filter extensions etc...
    This jQuery component and also others javascript uploaders sends data files to some defined URL. Developer need to build some servlet, php script or something on server side that will read files from HTTP request and stores it somewhere.
    Do you know how to do it in APEX? How can I read data from HTTP POST request in PL/SQL? Now I can only call my On-Demand application process from javascript, but I am not able to read any data from HTTP POST in it.
    Can I do it in APEX, or using MOD_PLSQL?
    I would like to implement this:
    1) some javascript uploader will call some URL of my application and sends HTTP POST with data files
    2) I will read data files from HTTP POST and store them into database
    3) I will create some HTTP response for javascript uploader
    Thank you for some tips

    I know about that existing plugin " Item Plugin - Multiple File Upload"
    But I doesn't work in IE and has only basic features. Licence for commercial use is also needed. I would like to use some existing jQuery plugin. There are many of these plugins with nice features. And only one problem is that I need to create some server side process/servlet/script.. that can recieve HTTP request, get files from it and stores them into DB.

  • How to Invoke service using HTTP POST in BPEL?

    I have a client using .net service with a web page http://.../httpreceive.aspx which is invoke through an http post. How can we post xml message using http post to the url in BPEL. Are there any documentation on doing this? Will this require writing a java class to do an http post the xml message to the url?
    Edited by: sns724 on Feb 12, 2009 11:56 AM

    I created a wsdl with the http-binding to do a HTTP Post and I'm getting a com.collaxa.cube.ws.wsif.providers.http.WSIFOperation_HTTP@1ac9964 : Could not invoke 'process'; nested exception is: java.lang.NullPointerException.
    Here's my wsdl with the binding:
    <definitions name="TestHTTPost" targetNamespace="http://test.com"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://test.com"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://hyphen.com"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="AddressBookEntry">
    <complexType>
    <sequence>
    <element name="AddressBookNumber" type="string"/>
    <element name="Name" type="string"/>
    <element name="AddressLine1" type="string"/>
    <element name="AddressLine2" type="string"/>
    <element name="City" type="string"/>
    <element name="State" type="string"/>
    <element name="PostalCode" type="string"/>
    <element name="Phone" type="string"/>
    <element name="Fax" type="string"/>
    <element name="Email" type="string"/>
    <element name="ElectDest" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="PostMessageResult">
    <complexType>
    <sequence>
    <element name="Result" type="string"/>
    <element name="Errors">
    <complexType>
    <sequence>
    <element name="Error">
    <complexType>
    <sequence>
    <element name="ErrorDescription" type="string"/>
    <element name="ErrorSource" type="string"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    <message name="HTTPPostServiceRequestMessage">
    <part name="payload" element="tns:AddressBookEntry"/>
    </message>
    <message name="HTTPPostServiceResponseMessage">
    <part name="payload" element="tns:PostMessageResult"/>
    </message>
    <portType name="HTTPPostService">
    <operation name="process">
    <input message="tns:HTTPPostServiceRequestMessage" />
    <output message="tns:HTTPPostServiceResponseMessage"/>
    </operation>
    </portType>
    <binding name="HTTPPost" type="tns:HTTPPostService">
    <http:binding verb="POST"/>
    <operation name="process">
    <http:operation location="/httpreceive.aspx"/>
    <input>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </input>
    <output>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </output>
    </operation>
    </binding>
    <service name="HTTPPostService">
    <port name="HTTPPost" binding="tns:HTTPPost">
    <http:address location="https://testxml.solutions.com"/>
    </port>
    </service>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="HTTPPostService">
    <plnk:role name="HTTPPostServiceProvider">
    <plnk:portType name="tns:HTTPPostService"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

  • How to receive XML from Flex HTTP POST

    Hi,
    We curreontly have a setup where we have a FLEX frontend send an XML through a HTTP POST and awaiting a response also in XML. On the backend this is handled relatively simply by a PHP script that basically does the following:
    read data (in XML)from FlEX HTTP POST into a new temp XML file.
    execute a c++ program with the XML file as one of the parameter.
    return the result to FLEX
    We have decided to move to BlazeDS for various reasons.
    Looking at the examples bundled with BlazeDS they have a jsp example that returns an XML result to FLEX so that part is fine. I am trying to find an example of JSP (or Servlet) that is able to read the XML data from FLEX and write it into a temp XML file. I would then try to use runtime.exec to invoke a local C++ program to process the XML file the result of which will be sent back to FLEX.
    Any help will be very much appreciated!

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I&#8217;d avoid calling an executable just to process XML &#8211;your<br />application server would provide enough support for reading and writing XML, no?<br />Also, if you&#8217;re only planning on working with XML then even BlazeDS might<br />be overkill because its focus is on sending strongly typed ActionScript data efficiently<br />to and from a client (it&#8217;s true that it does have a proxy service, but<br />that is not involved with processing the actual XML data).<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>How complex is your XML? Do you need to resolve ids and<br />references or can you parse it top down in a single pass? There are several<br />well known libraries in Java for dealing with XML &#8211; the choice depends on<br />how you need to interact with the XML. Most of them take an InputStream as a<br />source for reading XML and you can get the InputStream from the servlet<br />request. Googling should turn up numerous examples.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Pete<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><br /><br /><div><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> khwong<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Sunday, September 28, 2008 12:09 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How to receive XML from Flex HTTP POST<o:p></o:p></span></p><br /><br /></div><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />khwong in <br><br /><br><br /><b>General Discussion</b> --<br><br />  How to receive XML from Flex HTTP POST<br><br /><br><br />Hi, <br><br /><br><br />We curreontly have a setup where we have a FLEX frontend send an XML through a<br />HTTP POST and awaiting a response also in XML. On the backend this is handled<br />relatively simply by a PHP script that basically does the following: <br><br /><br><br />read data (in XML)from FlEX HTTP POST into a new temp XML file. <br><br />execute a c++ program with the XML file as one of the parameter. <br><br />return the result to FLEX <br><br /><br><br />We have decided to move to BlazeDS for various reasons. <br><br /><br><br />Looking at the examples bundled with BlazeDS they have a jsp example that<br />returns an XML result to FLEX so that part is fine. I am trying to find an<br />example of JSP (or Servlet) that is able to read the XML data from FLEX and<br />write it into a temp XML file. I would then try to use runtime.exec to invoke a<br />local C++ program to process the XML file the result of which will be sent back<br />to FLEX. <br><br /><br><br />Any help will be very much appreciated! <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b69b23">How to receive XML from<br />Flex HTTP POST</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b69b23!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div><br /><br /></div>

  • Beginner question: support to HTTP POST om Oracle AS

    Hi!
    I don't know if this is a suitable forum but since i use JDeveloper and Oracle BPEL I'll try my luck here :).
    I have a Java web application built in JDeveloper and a couple of BPEL processes.
    In these processes I use Java embedding (a piece of Java code) that opens a connection to a given URL and post a XML message to this URL. I didn't have much problems creating these processes.
    Now I have to provide a support to HTTP POST on my side. Since web application and services development are quite new to me I hope someone can point me the right way to do this. The requirements I have are: I can have a single URL to which the http POSTs will be issued.
    If I understand correctly I cant use a web service since I have to enable different types of XML posts. What are my options? Can I create some kind of listener for http POSTs? Can I create a jspx that will 'wait' for http posts and than call some of mine BPEL processes? Is there a way to create a BPEL process that 'waits' for http POSTs? Are there other options.
    I'd really appreciate any pointers on this.
    Regards,
    BB.

    Frank,
    I've tried creating a Servlet listener that implements HttpSessionListener interface. Now I have two methods, sessionCreated and sessionDestroyed but I don't know where to go next. I can't find any documentation on this issue yet.
    Should I create a jspx page with form node that has method attribute set to POST or maybe I don't even need a web page? I already have a login page that has a form with method set to POSt, will this pose any kind of troubles for me?
    I apologize for any stupid questions but as I said I have no experience in doing this and las couple of days I'm searching and reading different documentation on this topic so any more pointers would be appreciated.
    BB

  • Beginner question: support to HTTP POST at Oracle AS

    I tried same post on Application Server - General forum, but had no success.
    I have a Java web application built in JDeveloper and a couple of BPEL processes.
    In these processes I use Java embedding (a piece of Java code) that opens a connection to a given URL and post a XML message to this URL. I didn't have much problems creating these processes.
    Now I have to provide a support to HTTP POST on my side. Since web application and services development are quite new to me I hope someone can point me the right way to do this. The requirements I have are: I can have a single URL to which the http POSTs will be issued.
    If I understand correctly I cant use a web service since I have to enable different types of XML posts. What are my options? Can I create some kind of listener for http POSTs? Can I create a jspx that will 'wait' for http posts and than call some of mine BPEL processes? Is there a way to create a BPEL process that 'waits' for http POSTs? Are there other options.
    I'd really appreciate any pointers on this.
    Regards,
    BB.

    Frank,
    I've tried creating a Servlet listener that implements HttpSessionListener interface. Now I have two methods, sessionCreated and sessionDestroyed but I don't know where to go next. I can't find any documentation on this issue yet.
    Should I create a jspx page with form node that has method attribute set to POST or maybe I don't even need a web page? I already have a login page that has a form with method set to POSt, will this pose any kind of troubles for me?
    I apologize for any stupid questions but as I said I have no experience in doing this and las couple of days I'm searching and reading different documentation on this topic so any more pointers would be appreciated.
    BB

  • HTTP POST Request? How? Please Help!

    Hi maybe this is a simple question. But I was able to do a GET Request from an applet to an ASP page just fine but I am having problems with the POST Request. How do you do a HTTP POST and put the parameter on the post data?
    This is what I am doing:
    url = new URL(queryParam);
    connection = (HttpURLConnection)url.openConnection();
    connection.setDoOutput(true);
    connection.setRequestMethod("POST");
    // IS THIS CORRECT WAY TO ADD PARAMETER TO POST
    connection.setRequestProperty("name","javaguy");
    BufferedReader in = new BufferedReader( new InputStreamReader( connection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    in.close();

    The setRequestProperty() method is used to add HTTP headers to the request. The way you pass "post" parameters is to send them as the body of the message in "application/x-www-form-urlencoded" form. In other words, create a string of URLEncoded "name=value" pairs delimited by '&', just like you would see in the URL when making a GET request through the browser:
    String paramStr = "name=javaguy&occupation=web+developer" ;
    byte[] paramBuf = paramStr.getBytes("ISO-8859-1") ;
    url = new URL(queryParam);
    connection = (HttpURLConnection)url.openConnection();
    connection.setDoOutput(true);
    connection.setRequestMethod("POST");
    // THIS CORRECT WAY TO ADD PARAMETER TO POST
    connection.setRequestProperty("Content-Length", Integer.toString(paramBuf.length)) ;
    OutputStream out = connection.getOutputStream() ;
    out.write(paramBuf) ;
    out.flush() ;
    out.close() ;
    BufferedReader in = new BufferedReader( new InputStreamReader( connection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)
        System.out.println(inputLine);
    in.close();Good luck!

Maybe you are looking for

  • Is there any way for me to upgrade my software/hardware in Israel if I have a macbook pro 5, 5 with leopard?

    I have a 3/4 year old macbook pro, and am interested in being able to play some new computer games (a la' diablo 3) among my problems are an old graphics card, and the fact that I can't find a retail store which allows me to upgrade my OS to snow leo

  • Final cut pro doubling files

    final cut pro has been basically doubling all of my files. One was the original file straight from the camera and another was a final cut event. if i delete the one from the camera will it effect the final cut event?

  • Search BAPI for BONDS

    Hi All, i have to migrate Bonds & Guarantees, i search now a BAPI for the Bonds, but imk not sure if i have the right one (BUS5200??), i have to migrate the advance payment Bonds, Performance Bonds and other Bonds, this are the Product types. I have

  • Airport Extreme best practice configuration for Sleep Proxy, DHCP/NAT and PPPOE

    Hi I have recently bought a Airport Extreme and it is working well.  One of the reasons I bought is to take advantage of the Bonjour Sleep Proxy on it so I can wake my MAC up remotely from my iPad using the REMOTE app to stream things like iTunes etc

  • Web form integration in CRM

    Hi All,           Can i request for any infomraion on web form integration with CRM? Kind Regards.