Post HTTP and XML DB?

Hello

Can I make a post HTTP of a document XML directly to the XML DB basically? Or I have to use a servlet as a listener.

Thanks in advance!

Here is an example of using a Servlet to handle a PUT option

SQL> spool testcase.log
SQL> --
SQL> connect sys/oracle as sysdba
Connected.
SQL> --
SQL> set define on
SQL> set timing on
SQL> --
SQL> def USERNAME = SERVLET
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> -- def XMLDIR = &1
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
  2  /
old   1: drop user &USERNAME cascade
new   1: drop user SERVLET cascade

User dropped.

Elapsed: 00:00:00.29
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
  2  /
old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to SERVLET identified by SERVLET

Grant succeeded.

Elapsed: 00:00:00.03
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
  2  /
old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new   1: alter user SERVLET default tablespace USERS temporary tablespace TEMP

User altered.

Elapsed: 00:00:00.01
SQL> /*
SQL> **
SQL> ** 11.1.x only
SQL> **
SQL> ** call DBMS_XDB.DELETESERVLET(NAME => 'sample')
SQL> ** /
SQL> ** call DBMS_XDB.DELETESERVLETMAPPING(NAME => 'sample')
SQL> ** /
SQL> ** call DBMS_XDB.DELETESERVLETSECROLE(SERVNAME     => 'sample', ROLENAME  => 'anonymousServletRole' )
SQL> ** /
SQL> ** call DBMS_XDB.ADDSERVLETMAPPING(PATTERN => '/sys/servlets/&USERNAME/sample/*', NAME => 'sample')
SQL> ** /
SQL> ** call DBMS_XDB.ADDSERVLET
SQL> ** (
SQL> **         NAME     => 'sample',
SQL> **         LANGUAGE => 'Java',
SQL> **         DISPNAME => 'Sample Servlet',
SQL> **         DESCRIPT => 'Sample Servlet',
SQL> **         SCHEMA   => '&USERNAME',
SQL> **         CLASS    => 'com.oracle.st.xdb.pm.examples.servlets.SampleServlet'
SQL> ** )
SQL> ** /
SQL> ** call DBMS_XDB.ADDSERVLETSECROLE
SQL> ** (
SQL> **    SERVNAME     => 'sample',
SQL> **    ROLENAME     => 'anonymousServletRole',
SQL> **    ROLELINK     => 'anonymousServletRole'
SQL> ** )
SQL> ** /
SQL> **
SQL> */
SQL> call xdb_configuration.addServletMapping
  2       (
  3         '/sys/servlets/&USERNAME/sample/*',
  4         'Sample Servlet',
  5         'Sample Servlet',
  6         'com.oracle.st.xdb.pm.examples.servlets.SampleServlet',
  7         '&USERNAME',
  8         'Java',
  9         null,
 10         xmltype('anonymousServletRoleanonymousServletRole
 11       )
 12  /
old   3:        '/sys/servlets/&USERNAME/sample/*',
new   3:        '/sys/servlets/SERVLET/sample/*',
old   7:        '&USERNAME',
new   7:        'SERVLET',

Call completed.

Elapsed: 00:00:00.09
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> VAR JAVA_SOURCE       CLOB
SQL> VAR JAVA_SOURCE_PATH  VARCHAR2(700);
SQL> --
SQL> begin
  2    :JAVA_SOURCE_PATH := '/public/SampleServlet.java';
  3          :JAVA_SOURCE :=
  4  'package com.oracle.st.xdb.pm.examples.servlets;
  5
  6  import java.io.IOException;
  7  import java.io.OutputStreamWriter;
  8  import java.io.Reader;
  9  import java.io.StringReader;
 10  import java.io.Writer;
 11  import java.sql.DriverManager;
 12  import java.sql.PreparedStatement;
 13  import java.sql.SQLException;
 14
 15  import javax.servlet.ServletException;
 16  import javax.servlet.http.HttpServlet;
 17  import javax.servlet.http.HttpServletRequest;
 18  import javax.servlet.http.HttpServletResponse;
 19
 20  import oracle.jdbc.OracleConnection;
 21  import oracle.jdbc.OracleDriver;
 22
 23  import oracle.jdbc.OraclePreparedStatement;
 24
 25  import oracle.sql.CLOB;
 26
 27  import oracle.xdb.XMLType;
 28
 29  public class SampleServlet extends HttpServlet {
 30
 31      private OracleConnection dbConnection;
 32
 33      public SampleServlet() {
 34      }
 35
 36      private void initializeDatabaseConnection() throws SQLException {
 37          DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
 38          OracleDriver ora = new OracleDriver();
 39          this.dbConnection = (OracleConnection) ora.defaultConnection();
 40      }
 41
 42      public void doGet(HttpServletRequest request, HttpServletResponse response)
 43      throws ServletException, IOException
 44      {
 45          try {
 46            response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
 47          }
 48          catch (Exception e) {
 49            System.out.println("SampleServlet.doGet() : Caught Exception.");
 50            e.printStackTrace(System.out);
 51            System.out.flush();
 52            try {
 53              this.dbConnection.rollback();
 54            }
 55            catch (SQLException sql) {
 56              System.out.println("SampleServlet.doGet() : Rollback Exception.");
 57              sql.printStackTrace(System.out);
 58              System.out.flush();
 59            }
 60            finally {
 61              response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 62              e.printStackTrace(System.out);
 63              System.out.flush();
 64           }
 65         }
 66      }
 67
 68      public Reader doPutImpl(HttpServletRequest request, HttpServletResponse response)
 69      throws SQLException, IOException {
 70
 71          OraclePreparedStatement statement =  (OraclePreparedStatement) this.dbConnection.prepareStatement("insert into MY_XML_TABLE values (:
 72          XMLType myXML = new XMLType(dbConnection,request.getInputStream());
 73          statement.setObject(1, myXML);
 74          statement.execute();
 75          statement.close();
 76
 77          String responseText = "Upload Complete
Successfully uploaded document into MY_XML_TABLE declare 2 V_RESULT BOOLEAN; 3 begin 4 if (DBMS_XDB.existsResource(:JAVA_SOURCE_PATH)) then 5 DBMS_XDB.deleteResource(:JAVA_SOURCE_PATH); 6 end if; 7 V_RESULT := DBMS_XDB.createResource(:JAVA_SOURCE_PATH,:JAVA_SOURCE); 8 end; 9 / PL/SQL procedure successfully completed. Elapsed: 00:00:00.04 SQL> -- SQL> undef JAVA_SOURCE_PATH SQL> -- SQL> column JAVA_SOURCE_PATH new_value JAVA_SOURCE_PATH SQL> -- SQL> select :JAVA_SOURCE_PATH JAVA_SOURCE_PATH from dual 2 / JAVA_SOURCE_PATH -------------------------------------------------------------------------------- /public/SampleServlet.java Elapsed: 00:00:00.01 SQL> def JAVA_NAME = SampleServlet SQL> def JAVA_SOURCE_PATH DEFINE JAVA_SOURCE_PATH = "/public/SampleServlet.java" (CHAR) SQL> -- SQL> create or replace and resolve java source 2 named "&JAVA_NAME" 3 using CLOB (select xdburitype('&JAVA_SOURCE_PATH').getClob() from dual); 4 / old 2: named "&JAVA_NAME" new 2: named "SampleServlet" old 3: using CLOB (select xdburitype('&JAVA_SOURCE_PATH').getClob() from dual); new 3: using CLOB (select xdburitype('/public/SampleServlet.java').getClob() from dual); Java created. Elapsed: 00:00:00.56 SQL> show errors No errors. SQL> -- SQL> declare 2 shortname varchar2(128); 3 begin 4 select dbms_java.shortname(NAME) 5 into shortname 6 from USER_JAVA_CLASSES 7 where SOURCE = '&JAVA_NAME'; 8 execute immediate 'grant execute on "' || shortname || '" to public'; 9 end; 10 / old 7: where SOURCE = '&JAVA_NAME'; new 7: where SOURCE = 'SampleServlet'; PL/SQL procedure successfully completed. Elapsed: 00:00:00.06 SQL> create table MY_XML_TABLE of XMLTYPE 2 / Table created. Elapsed: 00:00:00.06 SQL> select * 2 from MY_XML_TABLE 3 / no rows selected Elapsed: 00:00:00.01 SQL> VAR RESPONSE VARCHAR2(4000) SQL> -- SQL> DEF HOSTNAME = ORA10200 SQL> -- SQL> DECLARE 2 V_SERVLET_URL VARCHAR2(4000) := 'http://&USERNAME:&PASSWORD@&HOSTNAME/sys/servlets/&USERNAME/sample/upload.xml'; 3 V_MESSAGE VARCHAR2(4000) := 'World'; 4 V_REQUEST UTL_HTTP.REQ; 5 V_RESPONSE UTL_HTTP.RESP; 6 V_BUFFER VARCHAR2(32000); 7 V_RESPONSE_TEXT CLOB; 8 V_RESPONSE_XML XMLTYPE; 9 V_WSDL XMLTYPE; 10 BEGIN 11 DBMS_LOB.CREATETEMPORARY(V_RESPONSE_TEXT, TRUE); 12 13 begin 14 V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => V_SERVLET_URL, METHOD => 'PUT'); 15 -- UTL_HTTP.SET_AUTHENTICATION(V_REQUEST, '&USERNAME', '&PASSWORD' ); 16 UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0'); 17 UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => LENGTH(V_MESSAGE)); 18 UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_MESSAGE); 19 V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST); 20 LOOP 21 UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE); 22 if (LENGTH(V_BUFFER) > 0) then 23 DBMS_LOB.WRITEAPPEND(V_RESPONSE_TEXT,LENGTH(V_BUFFER),V_BUFFER); 24 end if; 25 END LOOP; 26 UTL_HTTP.END_RESPONSE(V_RESPONSE); 27 EXCEPTION 28 WHEN UTL_HTTP.END_OF_BODY THEN 29 UTL_HTTP.END_RESPONSE(V_RESPONSE); 30 END; 31 32 :RESPONSE := V_RESPONSE_TEXT; 33 34 DBMS_LOB.FREETEMPORARY(V_RESPONSE_TEXT); 35 36 END; 37 / old 2: V_SERVLET_URL VARCHAR2(4000) := 'http://&USERNAME:&PASSWORD@&HOSTNAME/sys/servlets/&USERNAME/sample/upload.xml'; new 2: V_SERVLET_URL VARCHAR2(4000) := 'http://SERVLET:SERVLET@ORA10200/sys/servlets/SERVLET/sample/upload.xml'; old 15: -- UTL_HTTP.SET_AUTHENTICATION(V_REQUEST, '&USERNAME', '&PASSWORD' ); new 15: -- UTL_HTTP.SET_AUTHENTICATION(V_REQUEST, 'SERVLET', 'SERVLET' ); PL/SQL procedure successfully completed. Elapsed: 00:00:00.62 SQL> set long 100000 SQL> -- SQL> select :RESPONSE 2 from dual 3 / :RESPONSE -------------------------------------------------------------------------------- Upload Complete
Successfully uploade d document into MY_XML_TABLE
Elapsed: 00:00:00.01 SQL> select * 2 from MY_XML_TABLE 3 / SYS_NC_ROWINFO$ -------------------------------------------------------------------------------- World Elapsed: 00:00:00.00 SQL>

Tags: Database

Similar Questions

  • You have Firefox OS for Windows 7-64 bit? If so can you please post clear and label Firefox OS? I sincerely thank you.

    You have Firefox OS for Windows 7-64 bit? If so can you please post clear and label Firefox OS? I sincerely thank you.

    BONES of Firefox is a new operating system for mobile devices. As far as I know, it cannot replace Windows on a PC. If you are looking for a simulator get a peek, see this article: https://developer.mozilla.org/docs/Tools/Firefox_OS_Simulator

  • sites like yahoo, google, facebook, see the https and the padlock, but sites like amazon, ebay, where I need to enter my credit card information show the grey globe?

    Recently, I noticed that some sites like yahoo, google, facebook, bing still show the https and the lock that indicates a secure link/site. However, sites like amazon, ebay, where I need to enter personal and financial information shows the grey world, as I understand is not sure. How can I fix it? I read the posts related to this topic, but none of the suggestions to solve my problem.
    Thank you!

    Hi lisa14, gray globe corresponds to HTTP, because HTTP is not secure. You should see a padlock for HTTPS pages.

    For Amazon, I think that they go back to HTTP on the product pages and only use a secure connection on the account and payment pages.

    I don't know about eBay, sorry.

  • Re: HTTPS and certificate trust

    Hello everyone. I read a lot of posts in this forum on the theme of the HTTPS and I think I understand the different ways to obtain certificates on a device to avoid the message "you are trying to open a secure connection, but the server certificate is not approved.".

    My question is whether it is possible for an application to trust all certificates via APIs, in order to avoid the certificate trust whole-problem?

    In Windows Mobile and iPhone OS, you can override the logic of acceptance of certificate in the API so that an application trusted all certificates. This is useful in cases where an application needs to connect only to a private server. Is it possible in sib to override the logic of certificate, or certificate statement stuff above, outside of the app? (More precisely, I'm just using a simple object of HttpConnection MDS etc..)

    Thank you!

    -Tom B.

    There is no API that allows you to trust a certificate.  This must be done by the user or the administrator of the BlackBerry Enterprise Server.

  • Problem with spark list and XML dataProvider

    I am VERY new to Flex so I'm probably doing something wrong, but I hope it means this will get a quick response.

    I use a list of spark related to a data provider. On the actions of the user, the list will be filtered. The problem I encounter is that when the xml result is one, she will eventually launch an error:

    Has no type constraint: cannot convert mx.utils::ObjectProxy to mx.collections.IList.

    Here is the code to reproduce the problem...

    Main.MXML

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application
     xmlns:fx="http://ns.adobe.com/mxml/2009" 
     xmlns:s="library://ns.adobe.com/flex/spark" 
     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
     <fx:Script>
     <![CDATA[
      
     protected function singleItemButton_clickHandler(event:MouseEvent):void
     {    
      ItemService.send();    
     }
     protected function mutliItemButton_clickHandler(event:MouseEvent):void
     {
      var dataObject:Object = new Object();
      dataObject.multi = "yes";
      ItemService.send( dataObject );
     }
     ]]>
     </fx:Script>
    
     <fx:Declarations>
      <s:HTTPService    
       id="ItemService" 
       url="http://myserver/xml/itemXML.cfm" />   
     </fx:Declarations>
    
     <s:List id="theList" 
      x="60" y="29" width="200" height="251" 
      dataProvider="{ItemService.lastResult.items.item}" labelField="name"/>
    
     <s:Button x="77" y="287" label="Single Item" click="singleItemButton_clickHandler(event)"/>
     <s:Button x="172" y="287" label="Multi-Item" click="mutliItemButton_clickHandler(event)"/>
    
    </s:Application>
    

    itemXML.cfm

    <cfsetting showDebugOutput="No">
    <cfxml variable="result">
     <items>
            <item>
                <name>Item One</name>
            </item>
      <cfif isDefined('url.multi') AND '#url.multi#' EQ 'yes'>
                <cfoutput>
                <item>
                    <name>Item Two</name>
                </item>
              </cfoutput>
            </cfif>
       </items>
    </cfxml>
    <cfoutput>#result#</cfoutput>
    

    http://blogs.Adobe.com/aharui/2007/03/arraycollection_arrays_and_ser.html

  • All tables and xml are be NULL problem

    Hello guys

    I'm working on a project that uses the format of loading xml, e4x and intensively, table manipulation and it was fine but now I'm stuck on a strange problem.  All code was beautiful and application work and respond in a desired way, but then mystourisly it stopped working and started to return NULL values in almost all the tables of the (internal) actionscript and XML varibales.

    Now every time I have to load the xml file and set the loaded xml internal variables, internal values get only NULL instead of data.
    The same is the situation with the berries, I created a few components in mxml, and when I passed them to reference tables, the code gets compiled successfully, but again Array has only null values [that code worked very well too]

    I wonder if Adobe Flex did an update reduced to silence or something similar and it's the result of this things!

    I use Adobe Flex 3.2 SDK 3.3 on windows Vista Ultimate Edition.

    Please check this project attached, import it and see if you face the same problem

    Thank you

    Link to the problematic project

    http://isolatedperson.googlepages.com/problemXperiment.zip

    Problem screenshot

    http://isolatedperson.googlepages.com/xmlissue.jpg

    HTTPService to load the data. You will have less problems.

    
    
         
              
         
         
         
    
    
  • AS2, HTTPS and AS2 + HTTP

    Hi all

    Can someone help me understand this please.

    AS2 is a message encryption protocol
    HTTP and HTTPS are the transport protocol
    What happens when I select AS2 + HTTP and what happens when I select AS2 + HTTPS
    And what haapen if I select the Protocol of business as EDIx12 Exchange credits and Exchange as 'Generic' Protocol, HTTP and HTTPS transport protocol

    Can B2B pick up OAGIS 9.0 (IN.) FTP file and drop an OAGIS 9.0 (BOD confirmed) in a FTP?
    You can enqueue OAGIS 7.2 B2B (IN.) transaction by you connecting to XML Gateway and Dequeue a 7.2 OAGIS (consistent DBO) on Oracle advance queue?
    Can B2B pick up a flat-file delimited pipe of FTP?

    Global B2B, kind of like we have an MDN to the AS2, do we have a similar setup when we connect to a SFTP trading partner?


    Thanks in advance
    CNU

    Hi Alain,

    The main difference is that there is no support acknowledgement with the generic Exchange Protocol but AS2 supports the recognition level Exchange (DND). Second is that in Exchange for the AS2, you are using AS2 for TP identifiers in generic Exchange, he must use generic identifiers. In AS2, you can keep the name of file (part of AS2 header), but this support is not there in generic Exchange.

    Kind regards
    Anuj

  • Http and Appmodule session timeout issue

    Hello

    I use ADF 11 g with ADF Faces and ADFBC.
    In the store before the application module, we don't need no connection or time-out logic. We want the user to see the same page and continue to work even after a few days or weeks. Is it possible to do? How?

    If I set the session expires in the web.xml file - 1, I get null pointer exception after awhile, due to the jbp.ampool.timetolive parameter (by default it is Ms. 3600000)

    If the two session http and jbo.ampool.timetolive-1 should solve my problem? If so, it will cause performance problems?

    Thank you.

    No, the settings that you play with are not intended to hold sessions for ever. This is a very bad design anyway. At some point, you keep millions of sessions open for users who are unable to return.

    Normally, you store a cookie on the users machine long life (if it allows you to do so) and session information (current state you must rebuild the current page and or graphic) into a database (i.e. MDS be useful). When a user comes back after a while read you the cookie and get information for the user of the db.

    Timo

  • DataGrid and HttpService and XML

    Hello

    I get the following Http service XML. I'm fighting to display it in a Datagrid control. Help, please.
    < results >
    < result >
    < row >
    < cell name = "CLASS_GROUP" > cash and equivalents of < / cell >
    < cell name 'CLASS' = > Cash < / cell >
    < name of cell 'STYLE' = > Cash < / cell >
    < / row >
    < row >
    < cell name = "CLASS_GROUP" > cash and equivalents of < / cell >
    < cell name 'CLASS' = > Cash < / cell >
    < name of cell 'STYLE' = > Sweep funds < / cell >
    < / row >
    < row >
    < cell name = "CLASS_GROUP" > equity < / cell >
    < cell name 'CLASS' = > Asia Equity < / cell >
    < name of cell 'STYLE' = > Asia Pacific ex Japan Equity < / cell >
    < / row >
    < / result >
    < / results >

    The code to get the xml code is:

    < mx:HTTPService
    ID = "photoService".
    ' URL =' http://somehttpservice '
    resultFormat = "e4x".
    result = "photoResultHandler (Event); »
    Fault = "photoFaultHandler (Event); »
    / >
    < mx:XMLListCollection id = source="{photoService.lastResult.result.row}"/ "myXC" >

    Sorry I misread your message.

    Here's what you can do:







    and then, inside the extracted display function the value of xml. as:

    protected function displayClassGroup (subject: line, column: DataGridColumn): String {}
    var xmlObj:XMLList = row.cell;
    return xmlObj. (@name is "CLASS_GROUP");
    }

    Thank you
    Gaurav Jain
    Flex SDK Team

  • When you try to check my e-mail acct sync, I get an error message that the URL is not valid. When I check the link, everything that comes is http / / and nothing el

    When I check the link all that shows is http / / and nothing else. She does several times. I use Outlook for Windows 8.1. I have not tried the links embedded to see if this is a universal or just isolated problem to this email in particular.

    You can follow the discussion in the bug.

    • bug 1003082 - check/verification link broken in emails for confirming registration accountant Firefox sync if reading mail in Outlook

    Please, do not comment in bug reports
    https://Bugzilla.Mozilla.org/page.cgi?id=etiquette.html

  • Will not be put into service, but going through post-test and shuts down again.

    I have a Dell 2400 Dimension that I am having trouble with. I just clean with a can of air that own security that is supposed to be a dust collection system free of moisture. I don't know what happened, but I unplugged the power supply before as I have even try to clean it up. I put back together and he started upward, but the only thing it will do is to start up and go through the post test and fill the bar at the dell logo screen and then power that is auto off, but that's all I can get it to do.

    I don't know even where to start start troubleshooting, but it does not work with Vista and it's 32-bit, but for this, it's all I know about it right now. especially sense I can't turn it on.

    Quantum K

    You will need to test the connection (hard disk, RAM, graphics, connectors, etc.) in your Machine to make sure they are all secure.

    Working in here can get accidentally flipped a connection or a card and it loosened.

    See you soon.

    Mick Murphy - Microsoft partner

  • Automatic logout after inactivity of 180 seconds (http and https)

    All of my N4032 and N3024 switches with 6.2.7.2 firmware automaticlly break http and https session after ~ 180 seconds of inactivity. Controls:

    line telnet
    exec-timeout x

    do not work
    Does anyone have a similar experience?
    Is this a known issue?

    Looking through the firmware release notes, it looks like it was a known, only http/https problem did not follow the exec-timeout parameter. # Ip http timeout-political order, has been added to 6.2.6.6. I would test change the time-out setting by using the command # ip http timeout policy.

    Example of release notes:

    Console (config) #ip http idle timeout-political 3600 life 86400

    Let us know if it works.

  • POST questions and outputstream

    Hello world
    I am trying to send data using POST method and using an outputstream. This data is supposed to be sent to a php script
    in a web server. I can't send any data, when I check my php script echoing a $_POST ['content'], that is not
    show anything. BUT if I return data to my app, I can read it using an inputstream, no problem with that. I can't
    see what is the problem with my code. I hope that there, could someone help me find the error.

    So my code looks like this:

    It is inside some {class

    String storeSelected = "SomeStore";
    URLEncodedPostData encodedData = new URLEncodedPostData (null, false);
    encodedData.append ("content", storeSelected);
    Dispatcher AppConnThread = new AppConnThread ("my url", "POST", this, encodedData.getBytes ());
    Dispatcher.Start ();

    }

    It is inside the appconthread class

    {

    public AppConnThread (String url, String, screen ResultPage method, postData byte [])
    {
    This.url = url;
    This.Method = method;
    This.screen = screen;
    this.postData = postData;
      
    }

    HttpConnection connection = null;
    String connectString = url + connectionParameters;
    connection = (HttpConnection) Connector.open (connectString, Connector.READ_WRITE);
    connection.setRequestMethod (method); Maybe best to use argument HttpConnection.POST

    If (method.equals ("POST") & postData! = null) {}

    () connection.setRequestProperty

    'User-Agent', ' profile/MIDP-2. ("0 configuration/CLDC - 1.0");

    () connection.setRequestProperty

    'Content-Language', 'en-US');

    () connection.setRequestProperty

    'Content-type', "application/www-formulaires-urlencoded");

    () connection.setRequestProperty

    ('Content-Length', (new Integer (postData.length)) m:System.NET.SocketAddress.ToString ());

    OutputStream requestOutput = connection.openOutputStream ();
    requestOutput.write (postData);
    requestOutput.close ();
    }

    }

    What do you think guys? I don't know what else to do

    Looks well isn't?  However, I would use a standard content type, rather than xwww.  Maybe php does not recognize that.

    If you think that the interface

    HttpProtocolConstants

    is very useful for the definition of the attributes and the header values rather than hard-coding them yourself and maybe hurt them.  just a thought.

  • HTTP and without using the APN settings

    Hello

    Is there a way I can get my application, use internet using HTTP and without using the settings APN and GPRS for. Please note that this should work on both BES and BIS.

    Applications like Google maps and Facebook on Blackberry using internet, but,.

    -They do not need any APN settings

    -They don't need to be active GPRS BlackBerry

    Thanks in advance,

    Naveen

    You have a chance to go through this sticky thread.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=29103

  • Change the default ports for http and https

    Hello

    I'm trying to change the default ports for http and https

    I have a 506th PIX (which does NOT of NAT)

    I have the following: -.

    static (inside, outside) tcp 192.168.10.2 601 192.168.10.2 http netmask 255.255.255.255 0 0

    static (inside, outside) tcp 192.168.10.2 602 192.168.10.2 443 netmask 255.255.255.255 0 0

    access-list acl permit tcp any 192.168.10.2 eq 601

    access-list acl permit tcp any 192.168.10.2 eq 602

    Access-group acl in interface outside

    where 601 and 602 are the http port and https to be redirect to respectively.

    I changed the webserver accordingly

    I get the error message

    "No group of translation not found for tcp src outside:189.x.x.x/50232 dst inside:192.x.x.x/80" (trying to access port 80)

    "I also have ' fixup protocol http 601.

    I had access to the internal and external web server before attempting to change the default ports

    Any ideas where I'm wrong?

    See you soon.

    I apologise for not thinking correctly.

    the static method must be:

    static (inside, outside) tcp 192.168.10.2 80 192.168.10.2 601 netmask 255.255.255.255 0 0

    static (inside, outside) 192.168.10.2 tcp 443 192.168.10.2 602 netmask 255.255.255.255 0 0

Maybe you are looking for

  • iPhone 6s making random functions without touching.

    iPhone, 6, is random, making phone calls, for, people, list of contacts, or myself, with, touch, IT., he, too, plays, music, without touching, she and opening another, Lapps., all, have, been, made updates,., what, other solutions, can, any who do?

  • Manufacturer of dough/paste heat stock in Mac

    Hello! Anyone know who is the manufacturer of thermal paste stock, apple uses in Mac, especially in the MacBook Pro since their introduction? And Apple provides their service centers all over the world with it?

  • Apple Watch activity

    My exercise rings are going crazy today.  ICH have multiples of everything. 383 exercise minutes, 1350 cal 10 hours standing. And I've not done something today. Can anyone help? Helga

  • error 1136 When adding FPGA in SysDef

    I have a PXI-7854R multifunction RIO installed in my SMU-1075 chassis. When I add it to the system under the FPGA node definition file, the RIO node is created with all its subnodes - as expected - but the attached dialog pop error. Whenever I highli

  • HP Deskjet 2620 all-in-one

    I want to you use the USB connection. But the printer doesn't have a device for the USB cable. I have received didn t the USB cable from the company. As I have already that I wonder how I can connect the USB cable with the printer to connect to the c