Help accessinf Form via HTTP
Hi All,
I am triying to fill an form, without luck.
Some codes blocks my emulator.
Now I have an code which I got problem when I try to pass parameters.
If I use this code without passing paremters (teh variavels of filled in the form) its works ok.
I got the message:
"Uncaught exception java/lang/NullPointerException"
Can somebody help me??
Thanks in advance.
Here�s the code:
import java.io.*;
import javax.microedition.io.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
Tento por um form neste treco
public class HttpContacts extends MIDlet implements CommandListener {
private Display mDisplay;
private Form mMainForm;
private StringItem mMessageItem;
private Command mExitCommand, mConnectCommand;
private TextField username, password;
public HttpContacts() {
mMainForm = new Form("Enter Username and Password");
mExitCommand = new Command("Exit", Command.EXIT, 0);
mConnectCommand = new Command("Connect",Command.SCREEN, 0);
username = new TextField("Username:", null, 30, TextField.ANY);
mMainForm.append(username);
password = new TextField("Password", null, 30, TextField.PASSWORD);
mMainForm.append(password);
mMainForm.addCommand(mExitCommand);
mMainForm.addCommand(mConnectCommand);
mMainForm.setCommandListener(this);
public void startApp() {
mDisplay = Display.getDisplay(this);
mDisplay.setCurrent(mMainForm);
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void commandAction(Command c, Displayable s) {
if (c == mExitCommand)
notifyDestroyed();
else if (c == mConnectCommand) {
Form waitForm = new Form("Waiting...");
mDisplay.setCurrent(waitForm);
Thread t = new Thread() {
public void run() {
try {
connect(username.getString(), password.getString());
//connect();
catch (IOException ioe) {
mMessageItem.setText(ioe.toString());
t.start();
private void connect(String username, String password) throws IOException {
HttpConnection hc = null;
InputStream in = null;
//String url = getAppProperty("HelloMIDlet.URL");
String url = "http://localhost:8080/midp/hits?" + "user=" + username + "&" + "pass=" + password;
try {
hc = (HttpConnection)Connector.open(url);
in = hc.openInputStream();
int contentLength = (int)hc.getLength();
byte[] raw = new byte[contentLength];
int length = in.read(raw);
in.close();
hc.close();
// Show the response to the user.
String s = new String(raw, 0, length);
mMessageItem.setText(s);
catch (IOException ioe) {
mMessageItem.setText(ioe.toString());
mDisplay.setCurrent(mMainForm);
Hi.I'd like to develop an application that interacts with a HTTP server. Can i develop and TEST the application in the UIQ emulator?or the testing part has to be done in the cell phone?Please help me.
Similar Messages
-
Submitting a PDF form via HTTP Post: Beginner's Questions
Hi,
I am completely new to PDF forms, so I have been finding the documentation and options overwhelming.
I am hoping to get pointed to the documentation/tutorials/examples I really need.
I would like to build a "proof of concept" for my boss. I would like to include a screen in our Java ( JSP & Spring ) webapp where either a PDF form is embedded or is accessed via a link.
I have
Adobe Acrobat Distiller X standard license
Adobe Acrobat X Standard
Microsoft Office 2010
I made a small, 3 field Microsoft Word form. I then converted it via DIstiller into a PDF form.
I then found this document about how to submit a PDF form to a server side component:
http://acrobatusers.com/tutorials/form-submit-e-mail-demystified
My big problem with this document it doesn't have an example nor an example showing what is going on in a full HTML page. As I result I have some questions:
Can I see such an example somewhere?
Does the call to the javascript function doc.SubmitForm(urlToMyServerSideComponent) go in a script tag on the HTML page like other javascripts?
Can I execute that submit function from an HTML button or do I need to put a "submit" button on the PDF form?
Do I need Adobe LiveCycle in order to create a PDF form with a "submit" button? Free versions?
Can I send via HTTP POST ?
Do I need Adobe LiveCycle to crate a PDF form with a digital signature?
Is there a document/tutorial that fits where I am starting off from? ( Please no books, I am tyring to show my boss that this is something that can be done, in a reasonable amount of time, not time to get and go through a book ).
Thanks in advance for any tips that get me pointed in the right direction
SteveTo answer some of your specific questions:
2, 3. The submit form button needs to be on the PDF. You can either configure a Submit Form action or use the submitForm JavaScript method.
4, 6: No to both questions. You can create the form in Acrobat. Such forms are knows as Acroforms, as opposed to XFA forms that are created with LiveCycle Designer. Acroforms have wider support.
5: Yes, that's the method that's used when submitting to a web server. You have your choice of formats. The "HTML Form" option causes the form data to be submitted in the same format as an HTML form, so the same type of server-side code can be used to process the data. As Dave's tutorial shows, the server should return an FDF as the response, however, as opposed to HTML content.
It's a mistake to try to embed the PDF in a web page. So much depends on the user's browser, PDF viewer, and how both are configured. PDF forms can be submitted directly from Adobe Reader/Acrobat, so it's not necessary for them to be viewed in a browser. Note that Adobe Reader for iOS/Android don't yet support submitting to a web server (apart from FormsCentral), but that's is supposedly being worked on.
Since you mentioned digital signatures, be aware that for Reader users to be able to sign, the document has to be Reader-enabled, either with Acrobat Pro or LiveCycle Reader Extensions (which is not the same as LiveCycle Designer). Digital signatures in PDF forms are not yet supported on mobile devices. Also, you will want to submit the entire PDF, as opposed to just the form data, when submitting a digitally signed form. -
Form help - receiving responses via e-mail (Acrobat 9 Pro Extended)
I have created a "test" form in Acrobat. The question fields are proprietary content and thus security is set such that the recipient cannot copy, change, or print the form. The answer fields are drop-downs with A - D options. I have sent the form to myself as a test and all that works properly. I need to be able to receive completed forms via e-mail (or just the data if that works) but need to eventually be able to export (or copy) each response set, in order, into MSExcel. When I tried to send the completed form via e-mail, it indicates the form cannot be saved (obviously due to security settings) and thus the changes (answers) will not be part of the form - only the original with the default answers.
How can I enable responders to send me the test answers via e-mail, without compromising the proprietary nature of the form's content?
Also, I would prefer not to use the Adobe on-line repository because, as I understand it, gives the user access to the form via the web.
I do have a web site in which I could host the test and allow users to access it, take the test, and then submit the answers.
THANKS!!!!I finally got our webmaster to put the link to the form online so that I could test the form. It is not sending to the address specified. I have setup the Submit button as follows: in the window under Enter a URL for this link: the URL was input as MailTo: [email protected] (there is a space between MailTo: and the e-mail address). After submitting Outlook 2k3 sends back an undeliverable message. Is the space in the URL causing the issue or is it something I need to run by our security people due to the way the form is being submitted?
Many thanks,
Mike -
File download via servlet doesn't work with IE via https
I have a URL from a jsp page which points to a struts action servlet. This works with firefox via http and https. With IE it works via http but it doesn't work via https. The error message I get is "Internet Explorer cannot download ...File_name.doc from Server_name.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
Here is my code.
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String attachmentURL = AppSettings.get("EAIAttachmentURL");
String encodingScheme = AppSettings.get("EAI_encoding");
String filename = request.getParameter("URL");
String fileStr = URLEncoder.encode(filename, encodingScheme);
fileStr = fileStr.replaceAll("\\+","%20");
URL targetURL = new URL(attachmentURL + "/" + fileStr);
URLConnection connection = targetURL.openConnection();
connection.setDoInput(true);
connection.setDoOutput(false);
connection.setAllowUserInteraction(false);
BufferedInputStream attachmentStream = new BufferedInputStream(
connection.getInputStream());
* Setting the content disposition filename, so that the
* attachment preserves the original filename
response.setHeader("Content-Disposition",
" attachment; filename=" + filename);
if (connection.getContentType() != null) {
response.setContentType(connection.getContentType());
else {
response.setContentType("application/octet-stream");
response.setContentLength(connection.getContentLength());
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "public, max-age=-1, must-revalidate");
if ( connection.getContentEncoding() != null ) {
response.setHeader("Content-Encoding",
connection.getContentEncoding());
BufferedOutputStream responseStream = new BufferedOutputStream(
response.getOutputStream());
byte[] buffer = new byte[4096];
int bytesRead;
try {
while ((bytesRead = attachmentStream.read(buffer)) != -1) {
responseStream.write(buffer, 0, bytesRead);
} catch (Exception e) {
log.error("AttachmentProxy error: " + e.getMessage());
} finally {
if (attachmentStream != null) {
attachmentStream.close();
if (responseStream != null) {
responseStream.flush();
responseStream.close();
return null;
There is a bug with IE when downloading via https according to Microsoft support site. Refer to http://support.microsoft.com/default.aspx?scid=kb;en-us;812935
According to this bug, I have set the response header - "pragma" to public and "cache-control" to public. I've also unchecked the Do not save encrypted pages to disk setting in IE Options, Advanced tab.
Has anyone come across this problem or a similar problem. Any help is appreciated. Thanks.I have a URL from a jsp page which points to a struts action servlet. This works with firefox via http and https. With IE it works via http but it doesn't work via https. The error message I get is "Internet Explorer cannot download ...File_name.doc from Server_name.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
Here is my code.
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String attachmentURL = AppSettings.get("EAIAttachmentURL");
String encodingScheme = AppSettings.get("EAI_encoding");
String filename = request.getParameter("URL");
String fileStr = URLEncoder.encode(filename, encodingScheme);
fileStr = fileStr.replaceAll("\\+","%20");
URL targetURL = new URL(attachmentURL + "/" + fileStr);
URLConnection connection = targetURL.openConnection();
connection.setDoInput(true);
connection.setDoOutput(false);
connection.setAllowUserInteraction(false);
BufferedInputStream attachmentStream = new BufferedInputStream(
connection.getInputStream());
* Setting the content disposition filename, so that the
* attachment preserves the original filename
response.setHeader("Content-Disposition",
" attachment; filename=" + filename);
if (connection.getContentType() != null) {
response.setContentType(connection.getContentType());
else {
response.setContentType("application/octet-stream");
response.setContentLength(connection.getContentLength());
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "public, max-age=-1, must-revalidate");
if ( connection.getContentEncoding() != null ) {
response.setHeader("Content-Encoding",
connection.getContentEncoding());
BufferedOutputStream responseStream = new BufferedOutputStream(
response.getOutputStream());
byte[] buffer = new byte[4096];
int bytesRead;
try {
while ((bytesRead = attachmentStream.read(buffer)) != -1) {
responseStream.write(buffer, 0, bytesRead);
} catch (Exception e) {
log.error("AttachmentProxy error: " + e.getMessage());
} finally {
if (attachmentStream != null) {
attachmentStream.close();
if (responseStream != null) {
responseStream.flush();
responseStream.close();
return null;
There is a bug with IE when downloading via https according to Microsoft support site. Refer to http://support.microsoft.com/default.aspx?scid=kb;en-us;812935
According to this bug, I have set the response header - "pragma" to public and "cache-control" to public. I've also unchecked the Do not save encrypted pages to disk setting in IE Options, Advanced tab.
Has anyone come across this problem or a similar problem. Any help is appreciated. Thanks. -
Hi masters.
I have a adobe interactive form with HTTP submit, it works when it runs online, but when I save the pdf file, open, fill and submit, the server does not recieve any request.
I have read a lot of tutoriais but I still haven´t find a specific tutorial from the begin to the end of this process.
Should I create a Guided Procedure to recieve this form from http submit ? How can I create it ?
NetWeaver CERegardless of whether this bar is displayed or not, you should be able to access what is in the "Favourites" folder in a few ways.
Firstly via the Bookmarks link in Safari. This is the first icon directly to the right of the address bar. Pressing this will open your Bookmarks menu. If you see the word Bookmarks in blue select this and it will take you to the main bookmarks page, and the word Bookmarks will appear in black bold text. If you see Bookmarks in black bold text when first clicking Bookmarks you are where you need to be. The first link on here will be Favourites and have a star icon right next to it, click on Favourites and you will see what has been added to your Favourites folder - if anything. Also there is an Edit button in the bottom right of this screen, if you aren't going where you expected when selecting a URL in here press Edit, press the > arrow to the right of the favourite name, is the URL correct? If not change it, and click DONE on the keyboard - appears where Return key normally shows on the right-hand side.
If you are opening Safari and have no tabs already open or have already closed pages so none are open you will see icons that represent the contents of your Favourites folder displayed at the top of the page.
Also with a page loaded if you click in to the URL field then you will see these icons appear again, together with the keyboard at the bottom of the page.
Hope this helps.
Steve -
I'm having trouble running my forms via the forms builder. Everytime i click "run", a new browser window opens with url like http://127.0.0.1:1917/FYCu0odZTxl42wlbLoQ06rso8zKuYWEVV1TpUq4OddxheEMT
The port and uri is new everytime.
I have tried with and without the "App server URL" setting in the preference. I'm able to go directly to the form servlet. I aslo have installed JInitiator
I have tried with both IE and Firefox and both behave the same way.
My OC4J is up and running.
Am i missing some setup ? I'm out of ideas...please help.Hi,
the OC4j knows this from your default.env file
In this file you can set your forms_path. If your directory is mentioned here than OC4J will pick up your form.
Are you sure it's running on 8819 and not 8889?
What version of windows do you have and of IE and firefox?
So you can access this
http://yourserver:8819/forms/frmservlet
This should give you a forms installed succesfully form at runtime
If it works put this in your edit preferences runtime url in your forms builder
you can also put named configs in your formsweb.cfg and use different env files to have multiple applications starting
if you do so there is an example from webutil
your URL looks like http://yourserver:8819/forms/frmservlet?config=webutil -
Error in trying to access my FORM via browser
Hi, I am new to Oracle Application Development, as a starter I created a sample form in Form builder and compiled it, let say TESTFORM.fmx
I have placed this file in [ C:\DevSuiteHome_1\forms ] as my default location in "default.env" file is this only.
Then I created a tag in "formsweb.cfg" as:
#ETA Report
[TESTFORM]
envfile=default.env
form=TESTFORM.fmx
userid=i-----r/i----r@xii
widith=1500
height=600
imagebase=codbase
archive_jini=frmall_jinit.jar,colorpicker.jar,keyfilter.jar,my_icons.jar
archive=frmall.jar
When I try to access it via my browser [IE6] by going to link: http://pptaw0054.lotte-ppta.com:8889/forms/frmservlet?config=TESTFORM
A grey box of 1500x600 is shown with an error shown in the center: java.lang.ClassNotFoundException: oracle.forms.engine.Main_
Can anyone please help me out with the problem.
Thankyou!Hi Check these -
1. Check these URL's are working
http://pptaw0054.lotte-ppta.com:8889/forms/frmservlet
http://pptaw0054.lotte-ppta.com:8889/forms/lservlet
2.If Webutil installed? Then do proper configuration for "WebutilArchive"
WebutilArchive=frmwebutil.jar,jacob.jar
3.If Jinitiator is used,check if all corresponding jar files are downloaded onto user machine.Because all required class as shown in the error are there in jinitiator jar files.Also check all jar files that you have mentioned in archive_jinit are downloaded onto user machine.
DO like this if using webutil archive_jini=frmall_jinit.jar,colorpicker.jar,keyfilter.jar,my_icons.jar,frmwebutil.jar,jacob.jar
4.Enable all activex settings of your browser and do a proxy bypass setting in the browser as well..
5. Check if you have download rights for downloading JAR files mentioned in archive_jini
Edited by: anandk on Jul 24, 2012 1:18 PM -
Signing or securing XML sent via https
Hi there,
I have designed a form which uses Javascript to submit XML via https to a server. The https provides the appropriate transport level security, but is there a way to sign or encrypt the xml sent using Javascript?
Thanks!Hi Paul,
Is there a way that I can sign the content for a single pdf? I would just like to secure the submission of the XML using a single encryption method even though several different clients will use the pdf for submission purposes.
Also, I have placed a normal button on the form and written Javascript on the click method of the button which validates the form (according to the business logic which I need to perform) and then, upon successful validation, submit the form using this command:
event.target.submitForm({cURL
: URL, cSubmitAs:"XML"});
The submission works using Reader 8, but can I add a cert or some security mechanism into the submitForm method to help ensure the validity of the XML content?
Thx.
Roy -
Using ADFS authentication to perform SSO via HTTP GET request
Hi,
Can i authenticate users (those users are clients, at home) to a web application using ADFS without SAML tokens?
The situation is that i want the clients to perform SSO to the website via a link they receive in their mailboxes.
I thought about a solution that combines JWT in a URL link that each user will get to his private mail. this link will contain the users' claim (such as ID Num, given from AD DS Server dedicated especially for them).
Thus, the user will receive an email with a link that already contains a short period of time JWT to perform SSO to the webapp.
Is it possible ? anybody heard about a similar solution ?Sandra
Thanks for your message
Here is the my requirment
The basic flow of a Where 2 Get It REST API call is:
1) create the required XML structure,
2) URI encode it,
3) make a HTTP GET request,
4) then parse the return XML document.
Currently i have some data in ABAP structure with 5 fields, i need to create XML from the those 5 fields,and needs to be URI
encode it, and then needs to make a HTTP get request to connect Where to Get It REST API, finally it will return XML document via HTTP Get request , and then needs to convert the return XML to ABAP structure for further processing .the above 4 points will be implemented in my report.
Any body could help on this -
Hi,
for some reason unknown to me whenever I try to send a dom via http Post I get the following error:
org.xml.sax.SAXParseException: The root element is required in a well-formed document.
This is the source code:
package com.cyberrein.payunion.transaction;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
//xml lib
import org.w3c.dom.Document;
import org.w3c.dom.Element;
//weblogic xml lib
import weblogic.apache.xerces.dom.DocumentImpl;
import weblogic.apache.xml.serialize.DOMSerializer;
import weblogic.apache.xml.serialize.XMLSerializer;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
public class Xmltest extends HttpServlet {
//Initialize global variables
public void init(ServletConfig config) throws ServletException {
super.init(config);
//Process the HTTP Request
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// Retrieve transaction data from HttpServletRequest.
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
Document docIn = db.parse(request.getInputStream());
String code = "XX";
String tranID = "000000";
String message = "This Card Is Invalid. Transaction Discontinued";
//Output dom
Document docOut = new DocumentImpl();
Element e = (Element)docOut.createElement("TransactionResponseData");
e.setAttribute("Code", code);
e.setAttribute("TransactionID", tranID);
e.setAttribute("Message", message);
docOut.appendChild(e);
FileOutputStream fos;
fos = new FileOutputStream("/victory");
DOMSerializer serX = new XMLSerializer(fos,null);
serX.serialize(docIn);
DOMSerializer ser = new XMLSerializer(response.getOutputStream(), null);
ser.serialize(docOut);
} catch (Throwable e) {e.printStackTrace();}
//Get Servlet information
public String getServletInfo() {
return "com.cyberrein.payunion.transaction.Xmltest Information";
package com.cyberrein.payunion.transaction;
import org.w3c.dom.*;
import org.apache.xerces.*;
import org.apache.xerces.dom.*;
import org.apache.xerces.parsers.*;
import org.apache.xml.serialize.*;
import org.xml.sax.*;
import java.net.*;
import java.io.*;
public class CardClient {
private String sURI;
public BufferedReader in
= new BufferedReader(new InputStreamReader(System.in));
public CardClient(String serverURI) {
sURI = serverURI;
public Document test(){
Document docIn = null;
try
//XML Document impl
docIn = new DocumentImpl();
//Create the root element
Element t = docIn.createElement("TransactionData");
Element k = docIn.createElement("Payunion.com");
k.appendChild( docIn.createTextNode("North American server") );
t.appendChild(k);
//Set attributes
t.setAttribute("cardnumber", "4444444444444444");
t.setAttribute("amount", "3000.67");
t.setAttribute("name", "tolu agbeja");
t.setAttribute("cvv2", "001");
t.setAttribute("pu_number", "ejs:pupk:23456");
t.setAttribute("expirydate", "0903");
t.setAttribute("address", "100 peachtree industrial");
t.setAttribute("zipcode", "30329");
docIn.appendChild(t);
catch (Throwable te)
te.printStackTrace();
return docIn;
public Document sendRequest(Document doc) {
Document docOut = null;
try {
URL url = new URL("http://" + sURI);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setDoInput(true);
conn.setDoOutput(true);
OutputStream out = conn.getOutputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
XMLSerializer ser = new XMLSerializer( out, new OutputFormat("xml", "UTF-8", false) );
ser.serialize(doc);
while(!br.ready()){}
DOMParser parser = new DOMParser();
parser.parse(new InputSource(br));
docOut = parser.getDocument();
catch (Throwable et)
et.printStackTrace();
return docOut;
public static void main(String []args)
CardClient c = new CardClient("cyber1:7001/xmltest");
try
Document doc = c.sendRequest(c.test());
Element responseMessage = (Element)doc.getElementsByTagName("TransactionResponseData").item(0);
String message = responseMessage.getAttribute("Message");
String tranID = responseMessage.getAttribute("TransactionID");
String code = responseMessage.getAttribute("Code");
System.out.println(message);
System.out.println("");
System.out.println("The Response Code Is: "+code);
System.out.println("");
System.out.println("The Transaction ID Is: "+tranID);
catch(Exception ex)
ex.printStackTrace();
All comments will be appreciated!!Hi, thanks for your reply i knew the FileUplaod was the way forward.
I read topics advising to use the FileUpload and tried the following but it did not seem to work ( i get an HTTP Internal Server error when i try that):
try
DiskFileUpload upload = new DiskFileUpload();
boolean isMultipart = FileUpload.isMultipartContent(request);
if( isMultipart )
List items = upload.parseRequest( request );
Iterator iter = items.iterator();
while( iter.hasNext() )
FileItem fileItem = ( FileItem ) iter.next();
File uploadedFile = new File("myreceivedfile.zip");
fileItem.write( uploadedFile );
}catch (Exception e)
System.out.println("RECEIVER: " + e.getMessage());
Also DiskFileUpload,isMultipartContent and parseRequest have a line going through the middle (horizontal middle).
Edited by: Overmars08 on Jun 23, 2009 5:35 AM
Edited by: Overmars08 on Jun 23, 2009 5:36 AM -
Submit button on Android doesn't submit completed form via e-mail
We've created a form in Adobe Acrobat Pro with a submit button using the "mailto:" command. When we are in the android app and click the button, the e-mail script works fine, but it doesn't send the actual file, just a blank e-mail. Any advice? I've seen some older posts saying java scripts aren't supported, but they were older posts. Has this been addressed or is there a workaround to submit the completed forms via e-mail (with an added service or expense)?
When you write this
> but it doesn't send the actual file, just a blank e-mail
do you mean that it sends an email with a blank form attached?
If this is the case, this is currently as-designed, since your button has two actions: one that submits the form and one that resets the form. Because emailing on an Android device is asynchronous, by the time the email is constructed by the mail app of choice, the reset form action has already executed and as a result, you end up sending a blank form.
I will look into the Android mail APIs to find out if we can make the behavior synchronous, that is, the reset form action will not execute until AFTER the submit form action has fully completed. In the meantime, you can work around this by separating the submit & reset button into two separate buttons: one that submits, and one that resets. Users will tap the submit button to submit and then have to tap the reset button after submit completes to reset the form.
Hope this helps,
Darrell -
How to send XML via HTTPS in Servlet
I am new to Java. I need to make a servlet which can send a message via HTTPS with a content type of XML to another web server when it is called. each msg is proceeded with a header in the following format:
requestID=rid&userID=uid&password=mypd
and a detail information in XML:
<S_Request>
<requestControllID>1-rf200</requestControlID>
<zipCode>99012</zipCode>
<orderQuantity>35</orderQuantity>
</S_Request>
I have basic idea of how to send an http post with parameter string by using the Redirect function but don't know how to deal with the XML detail. Any one has idea about this? Any help will be greatly appreciated!This is what I did for one of my projects;
String myXML = "all the xml tags and fields";
URL url = new URL("https://www.somesite.com");
HttpsURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
OutputStream outXML = connection.getOutputStream();
outXML.write(myXML.getBytes());
I think you can add the requestID and all to the begining of the string myXML
Good luck
Rajesh -
Sending UTF-8 data via http post
Hello,
I'm generating an xml to be sent via http post method. Before sending, I'd like to convert it to utf-8, but Oracle converts it to utf-16, no matter what I do.
This is what I send with utl_http.write_text:
convert(l_clob,'AL32UTF8')...but I see utf-16 encoded output on the server side.
NLS_RDBMS_VERSION is 10.2.0.1.0
NLS_CHARACTERSET is EE8ISO8859P2
NLS_NCHAR_CHARACTERSET is AL16UTF16
But I do not use NCHAR variables.
Is http post considered like exporting, where the os's NLS_LANG is important?
Earlier, I managed to save utf-8 xml-files without setting any NLS% params. It was with:
UTL_FILE.PUT_RAW(
file => file_handle,
buffer => UTL_RAW.CONVERT(utl_raw.cast_to_raw(buffer),
'AMERICAN_AMERICA.AL32UTF8',
'AMERICAN_AMERICA.'||charset
);But this does not seem to work here, since I have to send 'text/xml'...
Any help is appreciated.
Thanks,
LaszloNot really the correct forum.. The methods you are using are more a PL/SQL issue than an XML DB issue. In general Oracle will convert the response into the character set requested by the client, are you sure your client is not requesting UTF-16.
Edited by: mdrake on Nov 27, 2010 5:42 PM -
Need to send Smart form via email through Driver program
Hi All,
We need to send smart form via email through a new driver program (z program). Can you please guide me on this.
I have used the following code to achieve this. We are getting message saying 'Mail request has created' when executed, but the mail is not sent.
lvs_comm_type = 'INT'.
lvs_comm_values-adsmtp-SMTP_ADDR = e_mail.
lvs_comm_values-adsmtp-R3_USER = 'X'.
lvs_comm_values-adsmtp-ENCODE = '0'.
call function 'CONVERT_COMM_TYPE_DATA'
exporting
pi_comm_type = lvs_comm_type
pi_comm_values = lvs_comm_values
pi_screen = ' '
pi_newid = 'X'
importing
pe_itcpo = lvs_itcpo
pe_device = lvf_device
pe_mail_recipient = p_mail_recipient
pe_mail_sender = p_mail_sender
exceptions
comm_type_not_supported = 1
recipient_creation_failed = 2
sender_creation_failed = 3
others = 4.
if sy-subrc ne 0.
raise COMMUNICATION_ERROR.
endif.
control_parameters-device = 'MAIL'.
output_options-TDIMMED = 'X'.
output_options-TDDELETE = 'X'.
CALL FUNCTION fm_name
exporting
CONTROL_PARAMETERS = control_parameters
MAIL_RECIPIENT = mail_recipient
MAIL_SENDER = mail_sender
OUTPUT_OPTIONS = output_options
USER_SETTINGS = space
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
Thank youHi,
For sending smartform output into mail you first have to generate spool request and convert it into PDF and then
only it can be sended into mail, please find the sample code in the mail below:
http://wiki.sdn.sap.com/wiki/display/sandbox/ConversionofSpoolRequestDataintoPDFandExcelFormatandSenditintoMail
Mansi
Edited by: Matt on Jan 29, 2010 8:25 AM - removed code, instead point to wiki that Mansi authored. -
Submit Form Via Webmail Is Not Creating Email In Drafts Folder
Bottom Line Up Front: PDF's Submit via Email (Webmail) is not creating the email in the Webmail account.
What I am using:
=============
* Adobe Acrobat Pro XI; however, I have a lot of users using Adobe Reader.
* Yahoo! email
What I am trying to do:
==================
Send the data from a completed pdf to an email address via webmail.
What Works:
===========
Using the default application - Microsoft Outlook, the form's data is placed into an XML attachment and an email is created for review and transmission.
What Isn't Working:
===============
Sending the same form via the Webmail feature. Acrobat first provided the Yahoo account name and password handshake screen, and then I authorized Acrobat to use my Yahoo account. The form provided a status bar that indicated the email was being created and the attachment being added to the email; however, no email was ever created (and placed in my draft folder) and no email was sent (checked there too.)
What I've Confirmed:
================
I've gone to my Yahoo account's "Manage Apps and Website Connections" and confirmed that Acrobat is permitted to create emails (among other things). I've tested the non-webmail (default) email. I've confirmed in my Acrobat Pro XI preferences that the email account is there.
All help is greatly appreciated.Yes. However, if I receive that 500th back I have violated the License. Though I believe you need to go back and read it again It seems to say you can only send out 500 copies.
Either way would be breaking the intent of the license agreement.
WE have fought hard just to get this little change made (for benefit of very small Business or even non-profits). So we don't want to cause Adobe to pull this out of the next version because of misuse.
Maybe you are looking for
-
Mpegs open in webpage and not in quicktime
When I open an mpeg video from the web the video plays in the webpage and not in quicktime. How do I get the video to stream straight threw quicktime and not the webpage. I have a macbook pro with leopard. I just bought the computer in January. I als
-
Java Classes and JSP`s (urgent)
hi, my question is: How can i invoke normal java classes` methods using Jsp`s for this??, is it possible??, if it is, then how do you do this, and where do you have to put the java classes in order to find them from a jsp. thanks
-
Im trying to register my MBP with applecare but i registered it already without applecare. is there anyway i can add applecare to it? it wont let me and has a error message that reads: "hardware already registered"
-
Issue with wallpaper, can someone help?
Hello all. I found a wallpaper that someone posted on reedit that I wanted to use. It is a 1920x1080 resolution wallpaper. When I try to set the wallpaper, sometimes it won't let me crop it correctly, and only allows me to select a small portion of t
-
SPL document numbers for per ledger
HI Gurus, For special purpose ledger I want to assign number ranges per ledger. i.e. number ranges should be different for each ledger or I want to have a SPL document number percompany code. I have around 90 company codes opearting in my system. Ple