POST in Java

Hello,
I am trying to read a web page in Java that requires a POST. I can read normal web pages but I cannot determine how to POST data to a page.
I am trying to read is:
http://www.ohr.psu.edu/EMPLMENT/faculty.cfm
If you use the drop down menu at the top you will notice you can select job descriptions based on the locations listed in the drop down menu.
However when you select on these pages and click the Change button, you are redirected to the same URL but with different results. According to the HTML, this new page depends on a POST. How do I access the new pages requiring the post methods?
I can see in the HTML the values passed to the POST page. However, I cannot figure out how to pass these values to the URL in java. I have attached my code below. Again, I can connect to the first page, collect the POST required values from the drop down menu, but cannot determine how to post one of these values.
What I am attempting to do in the code below is use a regular expression to extract the POST values from the drop down menu and then connect to the POST page using the value. However, I have not met success. The problem arise where I begin to comment my code : ( I would really appreaciate any help.
import java.net.URLConnection.*;
import java.net.HttpURLConnection.*;
import java.net.*;
import java.io.*;
import java.util.regex.*;
public class test
    private StringBuffer hyperStringBuff;
    private URL url;   
    private URLConnection urlConn;   
    private BufferedReader buffReader;
    private String allHtml;
    private StringBuffer secHyperStringBuff;
    private URL secUrl;
    private HttpURLConnection secUrlConn;
    private BufferedReader secBuffReader;
    private String secAllHtml;
    public String doIt() throws MalformedURLException, UnknownHostException, IOException
        hyperStringBuff = new StringBuffer();
        url = new URL("http://www.ohr.psu.edu/EMPLMENT/faculty.cfm");
        urlConn = url.openConnection();
        urlConn.connect();
        buffReader = new BufferedReader(new InputStreamReader((urlConn.getInputStream())));
        String line;
        while((line = buffReader.readLine()) != null)
        { hyperStringBuff.append(line); }
        buffReader.close();    
        allHtml = hyperStringBuff.toString();
        //get the options
        Pattern optionPatt = Pattern.compile("<OPTION VALUE=(.+?)>(.+?)\\s*?<");
        Matcher optionMatch = optionPatt.matcher(allHtml);
        //output all matches
        while(optionMatch.find())
            //System.out.println(optionMatch.group(1) + " " + optionMatch.group(2));
            //attempt to post with the option value (group 1)
            //create a new URL connection
            secUrl = new URL(url.toString());
            secUrlConn = (HttpURLConnection)secUrl.openConnection();
            //try to post
            secUrlConn.setDoInput(true);
            secUrlConn.setRequestProperty("name", optionMatch.group(1));
            secUrlConn.setRequestMethod(secUrlConn.getRequestMethod());
            //read the hypertext into a buffer
            secBuffReader = new BufferedReader(new InputStreamReader((secUrlConn.getInputStream())));
            //read line by line
            String secLine;
            while((secLine = secBuffReader.readLine()) != null)
                { secHyperStringBuff.append(secLine); }
        }   //end while find()       
        return allHtml;
    public static void main(String args[])
        test testObj = new test();
        try
        { testObj.doIt(); }
        catch (Exception e)
        { System.out.println(e); }
        System.out.println("Done ; )");
    }   //end main
}   //end class test

this worked for me
System.setProperty("http.proxyHost", "proxy");
System.setProperty("http.proxyPort", "82");
URL url;
//communications link between the application and a URL
URLConnection urlConn;
/*A data output stream lets an application write primitive Java
data types to an output stream in a portable way. An application
can then use a data input stream to read the data back in. */
DataOutputStream printout;
DataInputStream input;
url = new URL ("http://tech-supp.esatclear.ie/cgi-bin/dslinfo");
urlConn = url.openConnection();
urlConn.setDoInput (true);
urlConn.setDoOutput (true);
// turns off caches
urlConn.setUseCaches (false);
urlConn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
printout = new DataOutputStream (urlConn.getOutputStream ());
String content = "cli=" + URLEncoder.encode(getNumber());
printout.writeBytes (content);
printout.flush();
printout.close();
input = new DataInputStream (urlConn.getInputStream ());
String str;
String urlString = "\n\n";
while (null != ((str=input.readLine())))
System.out.println (str);
urlString += str;
StringBuffer sb = new StringBuffer(urlString);
if (sb.indexOf("No cli") != -1) {
JOptionPane.showMessageDialog(null, "Error: user does not exist in database","User Details", JOptionPane.ERROR_MESSAGE);          
else { 
createFrame(urlString);
input.close();
searchField.setText("");

Similar Messages

  • Http-adapter: Convert html-post to JAVA-post?

    Hello everybody,
    unfortunately I am not a java programmer. But I am testing the http adapter.
    Is it possible to convert the following html-post into JAVA code?
    <html><head>
    <body>
    <form action="http://myserver" method="post">
    <p>Interface Namespace<br>
    <input name="namespace" value="http://mum.mappings" size="40"></p>
    <p>(Sender-) Service:<br>
    <input name="service" value="MUMHTTP" size="40"></p>
    <p>Interface Name:<br>
    <input name="interface" value="MI_Merge_1" size="40"></p>
    <p>Text:<br>
    <textarea name="Text" rows="5" cols="50"></textarea></p>
    <p><input type="submit" value="Send"></p>
    </form>
    </form>
    </body>
    </head>
    </html>
    For me it is important to send the values of the <input> values.
    How has the code look like?
    Many regards, mario

    Hi Mario,
    I Have once used this code snippet to send a payload to XI engine. Please change the parameters like XI server URL,
    Namespace,senderservice etc..
    Please let me know if you need any further help.
    Regards,
    Ananth
    public static void main(String[] args) throws Exception {
         try {
              URL sapURL = null;
              String urlString = "http://"+serverHost+":"+serverPort+"/sap/xi/adapter_plain?namespace="+senderNamespace+"&interface="
    +senderInterface+"&service="+senderservice+"&party=&agency=&scheme=&QOS="+QOS+"&sap-user="+sapUser+"&sap-password="+
    sapPWD+"&sap-client="+client+"&sap-language=E";
              sapURL= new URL(urlString);
              HttpURLConnection xi = (HttpURLConnection)sapURL.openConnection();
              xi.setRequestMethod("POST");
              xi.setRequestProperty("Content-Type","text/xml");
              xi.setDoOutput(true);
              generateXML(xi.getOutputStream());
              System.out.println(urlString);
              System.out.println("Resp Msg:"+xi.getResponseMessage()+" -- Resp Msg:"+xi.getResponseCode());
              xi= null;
         } catch (Exception e) {
                   e.printStackTrace();
    public static void generateXML(OutputStream out){
         try {
              PrintWriter prt = new PrintWriter(out,false);
              //Create XML tags
              prt.println("<?xml version= "1.0"?>");
              prt.print("<"+resp_MsgType+" xmlns:ns=""+resp_NameSpace+"">");
              prt.print("<"+xml_tag1+">");
              prt.print(xml_tagValue1);
              prt.print("</"+xml_tag1+">");
              prt.print("<"+xml_tag2+">");
              prt.print(xml_tagValue2);
              prt.print("</"+xml_tag2+">");
              prt.print("</"+resp_MsgType+">");
              prt.flush();
              prt.close();
              out.close();
              prt=null;
              out=null;
              }catch(Exception e){
                   e.printStackTrace();

  • Displaying japanese chars using servlet (posted in Java programming too)

    I am trying to display the japanese characters inputed by the user using
    html form and I am using servlet...
    After reading the input and when i try to display i get ????
    how can i solve this.
    It was originally posted in Java Programming forum. but i think the question suits here....heres the link for original post
    http://forum.java.sun.com/thread.jspa?threadID=670419&tstart=0
    sorry for posts at two different forums

    After reading the input and when i try to displayDisplay on what?
    Usually, if request.getCharacterEncoding() doesn't return viable result, then you should call
    request.setCharacterEncoding() with a proper value. If user send Shift_JIS string as form
    input, then the argument value should be also "Shift_JIS". When in doubt, use "UTF-8".
    Then, you call response.setContentType("text/html; charset="Shift_JIS"), etc.

  • Convert html-post to JAVA-post?

    Hello everybody,
    unfortunately I am not a java programmer.
    Is it possible to convert the following html-post into JAVA code?
    <html><head>
    <body>
      <form action="http://myserver" method="post">
        <p>Interface Namespace<br>
        <input name="namespace" value="http://mum.mappings" size="40"></p>
        <p>(Sender-) Service:<br>
        <input name="service" value="MUMHTTP" size="40"></p>
        <p>Interface Name:<br>
        <input name="interface" value="MI_Merge_1" size="40"></p>
        <p>Text:<br>
        <textarea name="Text" rows="5" cols="50"></textarea></p>
        <p><input type="submit" value="Send"></p>
      </form>
    </form>
    </body>
    </head>
    </html>
    For me it is important to send the values of the <input> values.
    How has the code look like?
    Many regards, mario

    mario,
    this is possible if you use something like HttpClient
    check
    http://jakarta.apache.org/commons/httpclient/
    for more details.
    here are few examples of using httpclient for posting data
    http://jakarta.apache.org/commons/httpclient/methods/post.html
    Rgds,
    Amol

  • HTTP POST with Java? (Submit file)

    I want to submit a file to a web service using Java, specifically the JXXX Compiler Service (http://www.innovation.ch/java/java_compile.html). It seems like the page uses HTTP POST. How can I do this?
    Any help would be appreciated.

    I suggest you ask them you question.
    Have you read the instructions on how to use it.
    http://www.innovation.ch/java/java_comp_instr.html

  • Where to post my java package

    Let's say i've written a package and want to get some feedback or whatever. What is the best place on the web to post it (naturally, except my own webpage)?

    No I don't have specific questions. The feedback i'm looking for is what could have been added, changed, etc (and just to see whether ppl find it usefull).. I was just wondering what are the popular places where ppl search for java libraries, utilities, ... and can post their own packages

  • JSP Unable to Load Class (posted in Java Programming for 5 Dukes)

    I hope this isn't a violation of forum etiquette, but I posted my question in Java Programming at http://forum.java.sun.com/thread.jsp?forum=31&thread=203255
    I realize now that it may have been wiser to post it here, but I have some replies already and it makes more sense just to inlcude the link.
    Can anyone assist with the question at http://forum.java.sun.com/thread.jsp?forum=31&thread=203255
    It's worth 5 dukes.

    Try changing <tagclass>E:\Tomcat324\jakarta-tomcat-3.2.4\webapps\examples\WEB-INF\classes\tags.ExampleTag</tagclass> to <tagclass>tags.ExampleTag</tagclass>
    because <tagclass> tag is for the class name and not the location of class file
    And make sure your ExampleTag.class file is in
    \WEB-INF\classes\tag\ExampleTag.class
    B!

  • Problem posting from java app to JRun servlet

    I am trying to write a jsp/servlet that will receive xml data posted to it. I am also trying to write a class that can test this. We are using JRun 3.0 to host the servlets.
    I am having a pig of a time getting this simple thing to work. My jsp code is shown below, followed by the app code. If I call the application with empty arguement (e.g. java PostTester localhost://pub/test.jsp "") it works fine. If I put in any arguements I can see in the JRun log the System.out messages as expected. However, the getResponseCode() returns -1 with a message of null. If I comment out that line, it eventually times out and I get a FileNotFoundException. Incidentally it seems that it works fine from IE.
    Any help much appreciated.
    Thanks - Bryan
    jsp code:
    <%@ page import = "java.io.*" %>
    <HTML> <HEAD> </HEAD>
    <BODY>
    <%
    StringBuffer text = new StringBuffer();
    BufferedInputStream is = new BufferedInputStream(request.getInputStream());
    System.out.println("1a");
    int c = is.available();
    System.out.println ("bytes available are " + c +"<br>");
    if (c> 0) {
    try {
    while ( is.available() > 0 && (c=is.read())>=0) {
    text.append ((char)c);
              System.out.println("2:"+(char)c);
    System.out.println("3");
    is.close();
    } catch (Throwable e) {
    System.out.println("Caught :"+e);
    e.printStackTrace(System.out);
    System.out.println("4:"+text+"\r\n" );
    out.println("'"+text+"'");
    %>
    </BODY>
    </HEAD>
    Test code:
    import java.net.*;
    import java.io.*;
    public class PostTester {
    public static void main(String[] args) {
    URL target=null;
    HttpURLConnection con=null;
    try {
    target=new URL(args[0]);
    con=(HttpURLConnection)target.openConnection();
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    con.setUseCaches(false);
    byte buffer[]= args[1].getBytes();
    System.out.println("Writing: "+args[1]);
    OutputStream os=con.getOutputStream();
    os.write(buffer);
    os.close();
    con.connect();
    if (con.getResponseCode()!=HttpURLConnection.HTTP_OK)
    System.out.println("****InvokeWithHTTP() - HTTP request failed - "+con.getResponseCode()+" "+con.getResponseMessage()+"\n\n");
    return ;
    StringBuffer response= new StringBuffer();
    try {
    InputStream is=con.getInputStream();
    for (int c=is.read();c>=0;c=is.read()) response.append ((char)c);
    is.close();
    } catch (Exception e){
    e.printStackTrace();
    return;
    con.disconnect();
    System.out.println(response);
    } catch (Throwable t) {
    InputStream err = ((HttpURLConnection)con).getErrorStream();
    if (err != null) {
    BufferedReader in = new BufferedReader(new InputStreamReader(err));
    StringBuffer response = new StringBuffer();
    String line;
    try {
    while ((line = in.readLine()) != null) {
    response.append(line + "\n");
    in.close();
    System.out.println(response);
    } catch (Exception e){
    e.printStackTrace();
    t.printStackTrace();
    con.disconnect();
    }

    other question:
    is your "argument" file contents URLEncoded ?
    if some of these arguments are \n or \r or else... the server may mess the message...

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

  • Post causes java error in otn server

    On or about August 21 this year I posted a message on the OA Framework forum with a title like "Network Adapter could not establish the connection". I included parts of a jsp. Apparently this causes the OTN server to choke.
    I subsequently posted the message again without the jsp, renaming the title "Again: Network ..."
    If you do a search of OA Framework forum for "Network Adapter" you will see the server fail.
    Please remove this message, so I can search!
    Thanks,
    Bob N

    Dear Vincent
    Its already set the Parameter rdisp/j2ee_start = 0. last week we are upgrade the kernel from 173 to 221. after that this problem was started.
    Regards
    Sriram

  • Kerberos Ticket via Java to BW to access BW Querys with HTTP POST

    Hi and thanks for reading,
    im Working with 2004 and the NWDS SP10. We have a project which must show some reports from the HR system via backend and some BW Reports done with Web Application Designer 3.5.
    The user of the project application is able to select personnel numbers or org units in a tree UI element. At design time we do not know hwo many of each he might select (could be a couple of hundreds or even more).
    A URL isn't long enough to support our needs (255 characters border)
    A consultant said that we should use HTTP Post with a Form. He gave me an example like this
    <HTML>
    <BODY>
    <form name="querySelektion" action="<system name>" method="POST">
              <input type="submit" value="Formular senden" />
              <!-- Template Parameter -->
              <input name="SAP-LANGUAGE" type="hidden" value="D" />
              <input name="PAGENO" type="hidden" value="1" />
              <input name="CMD" type="hidden" value="LDOC" />
              <input name="TEMPLATE_ID" type="hidden" value="Z_TEST_AX" />
              <!-- Selektionsparameter -->
              <input name="var_name_1" type="hidden" value="H1_ORGST" /></td>
              <input name="VAR_NODE_IOBJNM_1" type="hidden" value="0ORGUNIT" />
              <input name="var_value_ext_1" type="hidden" value="50058503" />
         </form>
    </BODY>
    </HTML
    This is working beside the fact that i have to fill in my BW username and password. I translated this to Java with  the Jakarta HTTP Librarys into the following code.
    try
                HttpClient httpClient = new HttpClient();
                PostMethod post = new PostMethod("http://<system name>");
                NameValuePair[] data =
                        new NameValuePair("SAP-LANGUAGE", "D"),
                        new NameValuePair("PAGENO", "1"),
                        new NameValuePair("CMD", "LDOC"),
                        new NameValuePair("TEMPLATE_ID", "Z_TEST_AX"),
                        new NameValuePair("var_name_1", "H1_ORGST"),
                        new NameValuePair("VAR_NODE_IOBJNM_1", "0ORGUNIT"),
                        new NameValuePair("var_value_ext_1", "50058503")};
                post.setRequestBody(data);
                int iReturnCode = httpClient.executeMethod(post);
                wdContext.currentContextElement().setTextView(Integer.toString(iReturnCode ));
                post.releaseConnection();
            } catch (IOException ioe)
                wdContext.currentContextElement().setTextView(ioe.getMessage());
    All i get is an Error 401 which means "Not Authorized". The Portal (where the application is running) and the BW do both support Single Sign On and the BW System is configured in the Portal.
    I think the HTTP Post is to generic. I also think that i need to make a authorization before and post the Kereberos Ticket to the BW before.
    But how can i accomplish that? Is there a SAP HelperClass to configure or establish system connections of SSO enabled systems?
    Or is the approach with the HTTP Post in java wrong, maybe there is an easier way to do transfer a lot of personnel or orgunit numbers to the BW Query?
    Thanks in advance,
    Kai Mattern

    Since you mentioned, I now tried to modify the writeToFile method in a few ways (closing the streams, directly setting them to null...), but the "java.lang.IllegalStateException: Already connected" exception remains there
    Actually I suppose this has no effect on the originally reported cookie problem, because if I just completely remove this logwriting (+ the following URL disconnect-reconnect) from the code, the situation is the very same
    I paste my modified writeToFile method anyway, maybe you can tell what I do wrong here, and I can learn from that
        public void writeToFile ( HttpURLConnection urlConnection, String filename ) {
          try {
            BufferedReader bufferedReader = null;
            InputStreamReader inputStreamReader = null;
            // Prepare a reader to read the response from the URLConnection
            inputStreamReader = new InputStreamReader(urlConnection.getInputStream());
            bufferedReader = new BufferedReader(inputStreamReader);
            String responseLine;
            PrintStream printStream = new PrintStream(new FileOutputStream (filename));
            // Read until there is nothing left in the stream
            while ((responseLine = bufferedReader.readLine()) != null)
                printStream.println(responseLine);
            inputStreamReader.close();
            bufferedReader.close();
            inputStreamReader = null;
            bufferedReader = null;
            printStream.close();
          catch (IOException ioException) { /* Exception handling */ }
        } //writeToFile()

  • Java.security.cert.CertificateException: Untrusted Cert Chain

    Hi all,
    While sending transaction to our supplier I am facing below error, Actually Our trading partner has given .p7b cert, I converted it into base 64 and i m using in b2b server. I am doing the same with all the suppliers but I am facing issue with only this trading partner. I asked him to send a new trusted certificate but he said that he is having 100's of customers, all are using the same certficate.
    Error
    http.sender.timeout=0
    2010.05.20 at 10:52:20:711: Thread-19: B2B - (DEBUG) scheme null userName null realm null
    2010.05.20 at 10:52:22:159: Thread-19: B2B - (WARNING)
    Message Transmission Transport Exception
    Transport Error Code is OTA-HTTP-SEND-1006
    StackTrace oracle.tip.transport.TransportException: [IPT_HttpSendHttpResponseError] HTTP response error :java.security.cert.CertificateException: Untrusted Cert Chain.
         at oracle.tip.transport.TransportException.create(TransportException.java:91)
         at oracle.tip.transport.basic.HTTPSender.send(HTTPSender.java:627)
         at oracle.tip.transport.b2b.B2BTransport.send(B2BTransport.java:311)
         at oracle.tip.adapter.b2b.transport.TransportInterface.send(TransportInterface.java:1034)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1758)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequest(Request.java:976)
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1167)
         at oracle.tip.adapter.b2b.transport.AppInterfaceListener.onMessage(AppInterfaceListener.java:141)
         at oracle.tip.transport.basic.FileSourceMonitor.processMessages(FileSourceMonitor.java:903)
         at oracle.tip.transport.basic.FileSourceMonitor.run(FileSourceMonitor.java:317)
    Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Untrusted Cert Chain
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
         at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:112)
         at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:3018)
         at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2843)
         at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2635)
         at HTTPClient.HTTPConnection.Post(HTTPConnection.java:1107)
         at oracle.tip.transport.basic.HTTPSender.send(HTTPSender.java:590)
         ... 8 more
    Caused by: java.security.cert.CertificateException: Untrusted Cert Chain
         at oracle.security.pki.ssl.C21.checkClientTrusted(C21)
         at oracle.security.pki.ssl.C21.checkServerTrusted(C21)
         at oracle.security.pki.ssl.C08.checkServerTrusted(C08)
         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
         ... 21 more
    2010.05.20 at 10:52:22:164: Thread-19: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.TransportInterface:send Error in sending message
    2010.05.20 at 10:52:22:168: Thread-19: B2B - (INFORMATION) oracle.tip.adapter.b2b.msgproc.Request:outgoingRequestPostColab Request Message Transmission failed
    2010.05.20 at 10:52:22:170: Thread-19: B2B - (DEBUG) DBContext beginTransaction: Enter
    2010.05.20 at 10:52:22:173: Thread-19: B2B - (DEBUG) DBContext beginTransaction: Transaction.begin()
    2010.05.20 at 10:52:22:176: Thread-19: B2B - (DEBUG) DBContext beginTransaction: Leave
    2010.05.20 at 10:52:22:179: Thread-19: B2B - (DEBUG) oracle.tip.adapter.b2b.msgproc.Request:outgoingRequestPostColab [IPT_HttpSendHttpResponseError] HTTP response error :java.security.cert.CertificateException: Untrusted Cert Chain.
    Untrusted Cert Chain
    2010.05.20 at 10:52:22:226: Thread-19: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:notifyApp retry value <= 0, so sending exception to IP_IN_QUEUE
    2010.05.20 at 10:52:22:232: Thread-19: B2B - (DEBUG) Engine:notifyApp Enter
    2010.05.20 at 10:52:22:248: Thread-19: B2B - (DEBUG) notifyApp:notifyApp Enqueue the ip exception message:
    <Exception xmlns="http://integration.oracle.com/B2B/Exception" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <correlationId>543222</correlationId>
    <b2bMessageId>543222</b2bMessageId>
    <errorCode>AIP-50079</errorCode>
    <errorText>Transport error: [IPT_HttpSendHttpResponseError] HTTP response error :java.security.cert.CertificateException: Untrusted Cert Chain.
    Untrusted Cert Chain</errorText>
    <errorDescription>
    <![CDATA[Machine Info: (usmtnz-sinfwi02)Transport error: [IPT_HttpSendHttpResponseError] HTTP response error :java.security.cert.CertificateException: Untrusted Cert Chain.
    Untrusted Cert Chain ]]>
    </errorDescription>
    <errorSeverity>2</errorSeverity>
    </Exception>
    2010.05.20 at 10:52:22:298: Thread-19: B2B - (DEBUG) Engine:notifyApp Exit
    2010.05.20 at 10:52:22:301: Thread-19: B2B - (DEBUG) DBContext commit: Enter
    2010.05.20 at 10:52:22:307: Thread-19: B2B - (DEBUG) DBContext commit: Transaction.commit()
    2010.05.20 at 10:52:22:310: Thread-19: B2B - (DEBUG) DBContext commit: Leave
    2010.05.20 at 10:52:22:313: Thread-19: B2B - (DEBUG) oracle.tip.adapter.b2b.msgproc.Request:outgoingRequest Exit
    2010.05.20 at 10:52:22:317: Thread-19: B2B - (INFORMATION) oracle.tip.adapter.b2b.engine.Engine:processOutgoingMessage:
    ***** REQUEST MESSAGE *****
    Exchange Protocol: AS2 Version 1.1
    Transport Protocol: HTTPS
    Unique Message ID: <543222@EMRSNS>
    Trading Partner: ZZEASY_PROD
    Message Signed: RSA
    Payload encrypted: 3DES
    Attachment: None

    Hi CNU,
    1st they has given me in .p7b certificateIs it a self-signed certificate? If no then do you have the CA certs as well?
    Open the certificate by double clicking on it. If "Issued To" and "Issued By" fields are same then it is a self signed cert and you need to import only this cert (in base64 format) into wallet.
    If it is not a self-signed cert then open the certificate and click on "Certification Path" tab. You should be able to see the issue's certificate here. Make sure that you have imported all issuers certificate along with your TP's cert in the wallet. Moreover, check that all the certs (TP cert and it's issuer cert's) are valid in terms of dates. You can see the "Certificate status" in "Certification Path" tab of certificate.
    Please provide the certificate chain details here along with list of certs in wallet (you may mail it to my id as well - [email protected])
    Regards,
    Anuj

  • JAVA CODE  NOT CREATING IDOC

    Hi all
    I m facing problem to upload data through idoc.the scenario is like we receive electric meter reading in flat file format. And to upload that data JAVA code is written which will create an IDOC FILE this authorization is only give to 2-3 person in organization and to basis guy also as user changed it’s password in SAP and in JAVA the java code is not going to create the IDOC file and data is not going to upload. after changing user password in sap system ,user not able to upload the data.
    ISU_MR_UPLOAD01 is the idoc file generated. So is there any authorization issue, password issue how to see and view IDOC IN SAP, can any one help me out into this.
    The error with java throws is as;
    1ST ERROR IN TRACE FILE
    ERROR file opened at 20061109 133610 India Standard, SAP-REL 640,0,59 RFC-VER 3  MT-SL
    T:2736 ======> User TR has no RFC authorization for function group SYST .
    T:2736 <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    2ND ERROR ON COMMAND PROMT
    C:\j2sdk1.4.2_07>cd bin
    C:\j2sdk1.4.2_07\bin>java sandsupload
    Creating IDoc...Exception in thread "main" com.sap.mw.idoc.IDoc$Exception: (2) I
    DOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "ISU_MR_UPLOAD01
    " is unavailable.
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:233)
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:187)
            at com.sap.mw.idoc.jco.JCoIDoc.createDocument(JCoIDoc.java:10521)
            at sandsupload.main(sandsupload.java:35)
    the part of java code
    try {
                //create a JCo client pool
                JCO.addClientPool( "MyPool",    //pool name
                                   3,           //maximum pool connections
                                   "333",       //SAP client
                                   " TR",    //user ID
                                   " XYZ",  //password
                                   "EN",        //language
                                   " 1.1.1.1   ", //app server host name
                                   "00" );   //system number
                //create an IDoc repository
                IDoc.Repository idocRep = JCoIDoc.createRepository("MyIDocRepository", "MyPool");
                //create a new and empty MATMAS02 document
                System.out.print("Creating IDoc...");
         Line where it shows error
                IDoc.Document doc = JCoIDoc.createDocument(idocRep, "ISU_MR_UPLOAD01");
                //get the root segment from the document
                //The root segment does not contain any fields or data. It is only
                //used as the standard parent segment and won't be transmitted when
                //the document is sent to an SAP system.
                IDoc.Segment segment = doc.getRootSegment();
                //create and add a new and empty child segment of type E1MARAM
                //and fill the segment data

    Hi Gaurav,
    Same exception on the same line has been reported and marked as solved here :
    IDOC_ERROR_METADATA_UNAVAILABLE:
    Btw, I think this forum is not visited often by JCO and ABAP connectivity experts, so maybe you could get a faster response to your problems while posting in "Java Programming" or maybe in some forum under the category ABAP Development.
    HTH
    Peter

  • Error while loading loading a xml file using a batchxmlloader.java file

    Hi All,
    I am trying to to load the data of an xml to the order management and configurations tables of 11i. While doing this i am using a java program batchxmlloader.java while executing it its giving me the errors as shown below. can anyone help me to remove these errors?
    java.lang.NoClassDefFoundError: javax/jms/JMSException
    at oracle.apps.fnd.wf.bes.ConnectionManager$1.run(ConnectionManager.jav)
    at oracle.apps.fnd.wf.bes.Utilities$1.run(Utilities.java:558)
    at java.lang.Thread.nextThreadNum(Unknown Source)
    Failed to establish Java Business Event System control connection: databaseId =n
    java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnv)
    at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:68)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.awt.Toolkit$2.run(Toolkit.java:512)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:503)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1176)
    at java.awt.EventQueue.invokeLater(EventQueue.java:511)
    at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1091)
    at javax.swing.Timer.post(Timer.java:342)
    at javax.swing.TimerQueue.postExpiredTimers(TimerQueue.java, Compiled C)
    at javax.swing.TimerQueue.run(TimerQueue.java, Compiled Code)
    at java.lang.Thread.nextThreadNum(Unknown Source)
    Exception in thread "main" java.lang.UnsatisfiedLinkError: XstartUnsatisfiedRels
    at oracle.apps.cz.logic.Engine.modifyBOM(Engine.java, Compiled Code)
    at oracle.apps.cz.logic.LogicConfig.assertDefaults(LogicConfig.java, Co)
    at oracle.apps.cz.cio.Configuration$UnsatisfiedRulesIterator.<init>(Con)
    at oracle.apps.cz.cio.Configuration.addCompInstancesInOrder(Configurati)
    at oracle.apps.cz.cio.InstanceBase.hasUnsatisfiedRules(InstanceBase.jav)
    at oracle.apps.cz.cio.BomInstance.getSelectableChildren(BomInstance.jav)
    at oracle.apps.cz.cio.Configuration.saveInternal(Configuration.java, Co)
    at oracle.apps.cz.cio.Configuration.createRuntimeTree(Configuration.jav)
    at oracle.apps.cz.cio.xml.CzXmlConfiguration.<init>(CzXmlConfiguration.)
    at oracle.apps.cz.cio.xml.CzXmlLoaderEventListener.processDocumentEleme)
    at oracle.apps.util.dataload.xml.BatchXmlLoaderHandler.endElement(Batch)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingP)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidat)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidating)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java, Compiled Code)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.log(BatchXmlLoader.java)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.<init>(BatchXmlLoader.j)
    at oracle.apps.util.dataload.xml.BatchXmlLoader.initialise(BatchXmlLoad)
    Thanks in well advance.
    Regards,
    Sarang.A.Mehta

    I feel th entry in the property file is wrong....
    it should be name=abc.xml dont enclise in quotes...

  • Error while compiling java class (ora-29535 source requires recompilation)

    Hello. I`m new with oracle and i`m having a problem with java classes. Few days ago i loaded java classes (loadjava) from jar file(biojava3-structure-3.0.2.jar) and compiled ( everything compiled with status valid). Now i`m writing my own class and i can`t import classes from biojava3. I`m getting error:
    Projekt:7: cannot access org.biojava.bio.structure.Atom
    bad class file: null
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import org.biojava.bio.structure.Atom;
    I have tryed to change jdk version in netbeans from 1.7 to 1.6. I created java class in sql plus That still not resolved my problem.
    Please help me.

    consider posting in Java forum instead of Database forum
    https://forums.oracle.com/forums/category.jspa?categoryID=285

Maybe you are looking for

  • How to get the original query string in an event receiver when dialogs are enabled

    I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The genera

  • Error when creating spatial index in 10g

    Hello. I have a problen when I try to create a spatial index. The strange thing is that the same commands always works fine in some machines, but if always fails in others. I tryed in diferent versiones of Oracle, but I have the error in al of them.

  • How do I prevent the ping sound in Firefox 4.0?

    Since recently upgrading to Firefox 4.0 I have been hearing a loud 'ping' type sound when certain websites are visited eg Google Mail. This is a new and unwelcome distraction! How can I stop it?

  • Receipt from Vendor

    Hi I have received one credit note from Vendor. I posted it into SAP. Now my Vendor has debit balance because of that credit note issued to me. Now vendor has paid that debit amount to me by check. Now i want to make that posting for the receipt from

  • External material number with trailing spaces

    Hi , One of our users created a material number(external number range) by copying it  from a spreadsheet. The value he copied had trailing spaces and when he copied it on to material number field the trailing spaces were not removed by SAP conversion