Can't send HTTP POST requests
Hi,
Flex3 Pro vs. J2EE
All HTTP requests with method=POST are received by server as
GET requests.
At first I thought the problem was with the app server -
WebLogic - but the same happens with Tomcat.
Any idea what could be causing this?
Thanks!!!
Tracy,
By "sending name value pairs" did you mean object properties
and sending the object?
This works only when you know the property name in advance.
We have a generic function that gets all the values from the
controls and builds XML on the fly. This way you don't need to know
the property name in advance and it works on any screen/form.
Setting content type to "application/xml" did the trick for
us - but you put us on the right track.
Thanks!
Similar Messages
-
Query regarding sending XML over HTTP Post request
Hello,
I am trying to send XML data from a server to client via HTTP Post request
And vice versa � receive the data by a client
Assume that the xml data looks something like
<?xml+version="1.0"?>
So my post query will look like
http://<IP Address>:<port>/
POST /MessageReceiver.jsp HTTP/1.0
Host: www.SomeHost.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 38
%3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+
This information will be received by the client and converted back to xml data.
My query is - is there some library/open-source stuff that
does the process of transcoding the entity's non-ASCII characters
at the server side
and decoding the URL back to human-readable form at the client side?
i.e. I need a simple mechanism to convert
<?xml+version="1.0"?>
to
%3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+
at the server side, while sending data
and do the opposite at the client side to get the xml back.
Also could some one confirm if JTidy is a right tool to check if the xml is well-formed?
Or is there any other standard tool that checks for well-formed properties of xml?
regards,
Deepak.java.net.URLEncoder / URLDecoder?
Also could some one confirm if JTidy is a right tool to check if the xml is well-formed?No, it's for parsing HTML. An XML parser is checking for well-formedness in any case. -
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 tipsI 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 send HTTP Post to URL (third party software) in JSP/JSPDynpage
Hello,
we want to integrate a third party application in our Portal Component (JSPDynpage using JSP and HTMLB). This third party component is called like this:
http://servername:port/cgi-bin/cgi.exe?request=map&format=html&swldy_ace=GDF&swldy_image_format=p n g&width=525&height=375
How can we do this in the JSP using HTMLB?
Thanks for your help.
Best regards,
DanielHi Detlev,
thanks for your hint regarding the App. Integrator, but it seemn not to be what we want to do: We call a CGI and get a JEPG Image back as request.
Now we used the java.net.URLConnection to do the HTTP post in the JSPDynpage:
// send HTTP POST
try {
u = new URL("http://server/path/ourcgi.exe");
} catch(MalformedURLException ex) {
System.err.println("MalformedURLException");
// build query sting
String query = "request=plot&format=jpeg&template_name=......."
int cl = query.length();
try {
// open the connection and prepare it to POST
URLConnection uc = u.openConnection();
uc.setDoOutput(true);
uc.setDoInput(true);
uc.setAllowUserInteraction(false);
DataOutputStream dos = new DataOutputStream(uc.getOutputStream());
dos.writeBytes(query);
dos.close();
} catch ...
Best regards,
Daniel -
HTTP POST Request with XML file in
Hi @ all,
I would like to send an HTTP Request with an XML File in the body to an SAP System
I have the target URL and the a XML File.
Now the question is. Is it possible to use something like the HTTP_POST FuBa to send an url post request with an xml file?
If yes can anybody give me a hint?
I have a php script which exactly do this coding. But to integrate it all in one system it is necessary to transform it into ABAP and call it there.
// compose url and request and call send function
function test($productID, $categoryID) {
// create url
$PIhost = "XXX.wdf.sap.corp";
$PIport = "50080";
$PIurl = "/sap/xi/adapter_plain";
$PIurl .= "?sap-client=800";
$PIurl .= "&service=XXX";
$PIurl .= "&namespace=XXX";
$PIurl .= "&interface=Frontend_Interface";
$PIurl .= "&qos=EO";
$PIurl .= "&sap-user=XXX";
$PIurl .= "&sap-password=XXX";
// create xml
$request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$request .="<n1:FrontendInbound_MessageType xmlns:n1=\"http://crmpiebay.com\">\n";
$request .= "\t<FrontendInbound>\n";
$request .= "\t\t<ProductName/>\n";
$request .= "\t\t<ProductCategory>".$categoryID."</ProductCategory>\n";
$request .= "\t\t<ProductID>".$productID."</ProductID>\n";
$request .= "\t\t<MessageID/>\n";
$request .= "\t</FrontendInbound>\n";
$request .= "</n1:FrontendInbound_MessageType>";
// send http request
postToHost($PIhost, $PIport, $PIurl, $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"]."/".$_SERVER["PHP_SELF"], $request);
// send post request to PI server
function postToHost($host, $port, $path, $referer, $data_to_send) {
$fp = fsockopen($host, $port);
if($fp) {
$res="";
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Referer: $referer\r\n");
fputs($fp, "Content-type: text/plain\r\n");
fputs($fp, "Content-length: ". strlen($data_to_send) ."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
$res .= fgets($fp, 128);
fclose($fp);
return $res;
Would be great if anybody could give me a hint how to solve such a HTTP Post request with XML body data.
Thanks in advance.
Chris
Edited by: Christian Kuehne on Feb 26, 2009 4:32 PMhi friend could you please share your solution regarding this query if u got it already?
-
Sending consecutive POST requests
Hello, I am having a little problem with sending consecutive POST requests to a site. I am new to networking and sorry if this is the wrong forum to post in.
I am trying to retrieve some data from a site that requires a login. However, you enter in the username and password on different pages, one following the other. I can send one POST request to a page and retrieve the output, but I'm confused as to how to send another request to a page found in the page returned by the first request.
If that confused you, here's a rough diagram of the site viewed from a web browser:
login1.phtml --- POST username ---> login2.phtml --- POST password ---> some page --- redirect ---> destination
Basically, enter in a username in login1.phtml. That will lead you to login2.phtml where it prompts for the password for the given username. If password is correct, login2.phtml will bring you to a page where it will redirect you to your destination (one of the POST parameters).
Thankschange
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());to
DataOutputStream dos = new DataOutputStream(conn.getOutputStream());
dos.writeBytes(URLEncoder.encode(data,"UTF-8"));
dos.close();
//You must read the input data
con.doInput(true);
InputStream in = con.getInputStream();
byte[] b = new byte[1024*128];
int i;
while ((i = in.read(b)) != -1){
in.close();OutputStreamWriter writes chars based on your platforms char encoding but in HTTP protocole you must use 8bit chars with URLEncodeing -
How can I send an XML request to the server using servlets
How can I send an XML request to the server using servlets
http://forum.java.sun.com/thread.jspa?threadID=5158333
http://forum.java.sun.com/thread.jspa?threadID=5158705
Crossposting is lame. -
How can I send a post query with attached data using Labview?
Hi,
I need to send data (a file of 5KB) to a php server.
In order to do it, I need to send a post request with attached data.
I'm using Labview 6.1 and I have the Internet Toolkit.
But I just see the Get Method. Isn't implemented the post method in Labview?
Thanks for your help
Best regardsHi,
In order to use the POST request method as opposed to the GET request method I used a VI set up as shown in the attached GIF.
From the front panel you need to provide values for the 3 inputs. "Bytes to read" is an arbitrarily large number that meets or exceeds the maximum number of bytes you expect as a response from your server. "Address" is just the URL of the server, e.g. "10.90.1.1" or "localhost" or "www.google.com". "Data in" is the actual request you're sending with the data included.
"Data in" would be in a format similar to everything in the quotes below (important to have 2 carriage returns to finish the request);
POST /phppage.php HTTP/1.1
Content-Length: ??
Host: http://www.mywebserver.com
Content-Type: application/x-www-form
-urlencoded
email=[email protected]&password=mypassword
For sending your data file you just have to set the requisite MIME-type and then include the file data in place of the form data in the example above.
Hope this helps,
Neil
Attachments:
LV_TCP_code.gif 4 KB -
Extract Portal User Name From HTTP POST Request (WSRP SOAP)
How can we extract the user name from the HTTP POST Request (*WSRP SOAP*) from the Portal to the Portlet Provider (Producer)?
We are load balancing between the Portal (10.1.14.2) and the providers (OC4J 10.1.3.3) and would like to extract the user name within the load balancer so we can create session affinity based on it.
BTW, we already tried using TCP Flow but were unable to see the user name.From the documentation, it seems that you need to use
HttpURLConnection.setRequestMethod("POST"); // "GET" is the defaultalthough I have seen examples on the web without it.
Try!
Edit: Also the single quotes around userid and password may be a problem.
Use the previous poster suggestion, but do not include the single quotes.
Edited by: baftos on Aug 6, 2008 4:27 PM -
after updating to firefox 8.0, can not send gifts or requests from farmville or cityville on facebook. (When I hit the send button I get an empty window titled "about:blank", which disappears and nothing gets sent. It works under internet explorer but not under firefox 8.0
Old Toad wrote:
I got that message with all of my libraries. Do see if the galleries are still on your iDisk mount your iDisk and go to the iDisk/Web/Sites folder and look for a folder titled "_gallery". Inside of it should be folders for each of your galleries. The folders are titled with 6 digit numbers which makes it difficult to know which folder is for which gallery.
Thanks. "_gallery" is empty
Have you tried re-syncing as Larry suggested?
I'm sure it will work, but I'm perplexed as to how this could happen.
Do you find that iPhoto now launches faster? Perhaps it's because my web galleries are gone? -
It will load Requests page, but there aren't any names showing in the box (you have to choose the friends name in order to send them something). Can't send gifts or requests because of this.
You are waiting for an apology to something that happened over a year ago? Really? This is why there is a manager in the store. You have a problem with an employee you speak to the manager. Just like you did on the phone. You would have gotten your apology in July 2013.
Here is the information about your upgrade fee.
Upgrade Fee
It is because when you have a problem you (customers) go running to the store and want to take up the time of the reps to fix it. Other carriers have third parties that deal with technical support and those locations are few and far between. VZW provides this directly through their stores. Also, when you subsidize a $650 and pay $200 VZW has to pay $400. Your monthly service fee doesn't begin to scratch the surface of paying that back. Not with all the money that is put into the network and its improvements.
Then over a year later you get someone on the phone who apologized and offered to waive the fee on your phone and you didn't take it? That offer won't come down the pike again.
One thing you should know is that all these employees are people and as such they sometimes come off cross. I doubt that you speak to everyone so sweetly all the time. Cut them a little slack and put this whole thing behind you after 15 months. Either upgrade with VZW or move on. -
How to send HTTP POST message using Business Service ?
Hi all,
I need to call a service which accepts HTTP post, how can I achieve this using OSB Business Service ? Kindly post any documentation link related to this.
Thank You
ArunBasically to to create a business service to send to a HTTP post all you need to do to point the business service to the desired URL.
In the OSB console you can test using the debug option. All you need to do is paste the XML you require and execute.
If this works then you know your business services is sorted. Can you confirm you can complete up to this point?
As Anuj correctly states you need to populate the body variable. This is the fundamental concept of OSB. All service calls request and respond using the body variable. So if you create a proxy service and route to the business service and provide NO routing. The proxy service will pass the input of the Proxy service to the input of the business service as the body has been populated by the Proxy service.
cheers
James -
Suppose there is form in a web page and it submits data in HTTP POST method. After submitting the form, if I reload the page [either by the refresh button or back button; whichever applicable], firefox asks permission to resend the form data by saying "To display this page, Firefox must send information that will repeat any action...". Now if the user clicks on the resend, firefox resubmits the form data.
So where does firefox store this from data for such future resending/resubmission?
Is it possible to retrieve/manipulate those stored form data?I thought I'd tried that, as tried lots of other things like encoding URL, but obviously not as this works.
Thanks for the quick reply.
We also have an issue with the people results not being able to be refined by Department or Job Title now we have connected the SP2010 farm to use the service applications from a SP2013 farm.
Any ideas on this? I've started a new thread as its unrelated though:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/c89d5463-4531-4a28-9586-1f690c7b580d/can-you-refine-people-search-results-using-a-sharepoint-2013-search-service-application-connected-in?forum=sharepointsearch -
How can I send an XML request to the server using JSP
Can anybody say how to send a xml request
For ex:
Address:__________
City: ________
State:__________
Country:________
and a Submit Button.
By clicking on the Submit Button -- xml request had to go to the server.
Please send the detailed code for itxml http request..is that wat your are looking for?
-
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
-
ZX_TAX_RATE_NOT_EXIST when importing lease payment invoices from Assets
All, I am on 12.1.2 I have created a lease agreement in oracle assets and run the export lease rentals to payables program. Then, I ran the "Payables Open Interface Import" program. The invoices fail import with error "ZX_TAX_RATE_NOT_EXIST - This Ta
-
I need some help with some of the basic playlists please?!
Basically, I always enjoyed using the playlists 'recently added' and 'most played' that originally were on my ipod touch but suddenly they have gone off my ipod but have remained on my itunes! I have tried syncing my ipod many times but nothing has
-
How to include DBID in controlfile backup filename
Hi, I've googled over this issue a lot...actually, for disaster recovery purposes, I want to have dbid somewhere "visible" (I know there are some workarounds to find the dbid of the db, also I log the RMAN execution and the dbid is there, but i prefe
-
Info on creating business cards in pages
In creating business cards using pages, how do copy and paste? Doesn't seem to work as normal.
-
Help with controlling a flash video in director
I have imported a flash file into my director movie and would like a replay button but can not find the correct lingo. The flash file is called equation. Any help appreciated!! thank you