Http connection: POST is not working

This code gives me 500 and I could not post anything to server (AXIS service)
httpConn.setRequestProperty( "Content-Length",String.valueOf( b.length ) );
             httpConn.setRequestProperty("Content-Type","text/xml; charset=utf-8");             
             httpConn.setRequestMethod( "POST" );
             httpConn.setDoOutput(true);
             httpConn.setDoInput(true);
             httpConn.setAllowUserInteraction(true);
             httpConn.setDefaultUseCaches(false);
             httpConn.setUseCaches(false);
             httpConn.connect();
             System.out.println("httpConn.getResponseCode()"+httpConn.getResponseCode());The same code if I change POST to GET, it is OK and then I can get the input stream and print out server response
Please help
Thanks

JoachimSauer wrote:
500 means internal server error, so you should either check any error messages you get back (maybe in the errorStream) or check the logs on the server to see what the problem is.Yeah
I get error stream and the server told me what is wrong in the envelop format
I corrected and it can fly now
My problem is I am one-guy-team now :D
I used to work with a 50 guy java team and we helped each other quickly
Thanks

Similar Messages

  • HTTP Status 405 - HTTP method POST is not supported by this URL

    dear all
    can u solve my problem.am getting the *"HTTP Status 405 - HTTP method POST is not supported by this URL"* msg from the browser when i press the search button in my form.plz suggest me the solution for my fault.these are the following html,xml,class files:
    search.html*
    <html>
    <head>
    <title>Search Page</title>
    </head>
    <body>
    <p align="center"><font size="6" color="#0000FF"><b>Search Module</b></font></p>
    <p align="center"> </p>
    <center>
    <form method="POST" action="./emp">
    <table border="1" width="43%">
    <tr>
    <td width="50%">
    <p align="right">Employee Name</td>
    <td width="50%"><input type="text" name="empname" size="36"></td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <p align="center"><input type="submit" value="Search" name="B1"></td>
    </tr>
    </table>
    </form>
    </center>
    </body>
    </html>
    web.xml*
    <web-app>
    <servlet>
    <servlet-name>jdbc</servlet-name>
    <servlet-class>searchModule</servlet-class>
    <init-param>
    <param-name>driver</param-name>
    <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
    </init-param>
    <init-param>
    <param-name>url</param-name>
    <param-value>jdbc:odbc:first</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>scott</param-value>
    </init-param>
    <init-param>
    <param-name>pass</param-name>
    <param-value>tiger</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>jdbc</servlet-name>
    <url-pattern>/emp</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>search.html</welcome-file>
    </welcome-file-list>
    </web-app>
    SearchModule.java*
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class searchModule extends HttpServlet
    Connection con;
    public void init() throws ServletException
    String d=getInitParameter("driver");
    String u=getInitParameter("url");
    String us=getInitParameter("user");
    String pwd=getInitParameter("pass");
    try
    Class.forName(d);
    con=DriverManager.getConnection(u,us,pwd);
    catch(ClassNotFoundException e)
    System.out.println(e);
    catch(SQLException e)
    System.out.println("Unable to establish the connection");
    }//init
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    String empname=req.getParameter("empname");
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
    try
    pw.println("<html><body><center>");
    Statement st=con.createStatement();
    String sql="select * from employee where empname="+empname;
    ResultSet rs=st.executeQuery(sql);
    if(rs.next())
    pw.println("<h2>Employee Details</h2>");
    pw.println("<table border=1>");
    pw.println("<tr><th>Employee No.</th>");
    pw.println("<th>Employee Name</th>");
    pw.println("<th>Designation</th>");
    pw.println("<th>Department</th>");
    pw.println("<th>Salary</th>");
    pw.println("</tr><tr>");
    pw.println("<td>"+rs.getInt(1)+"</td>");
    pw.println("<td>"+empname+"</td>");
    pw.println("<td>"+rs.getString(3)+"</td>");
    pw.println("<td>"+rs.getString(4)+"</td>");
    pw.println("<td>"+rs.getInt(5)+"</td>");
    pw.println("</tr></table>");
    else
    pw.println("<h2>Employee Record Not Found</h2>");
    pw.println("</center></body></html>");
    pw.close();
    rs.close();
    st.close();
    catch(SQLException e)
    System.out.println(e);
    }//doPost
    public void destroy()
    if(con!=null)
    try
    con.close();
    catch(Exception e)
    System.out.println("Connection Closed");
    }//destroy
    }//searchModule
    in control panel i selected System DNS and created the name as first and driver as Microsoft ODBC for Oracle
    plz suggest me the solution where i committed mistake.

    <form method="*POST*" action="./emp">
    public void doGet (HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    HTTP method POST is not supported by this URL

  • Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    what email service - Yahoo mail have been acting up lately
    you can try setting Mail as your email client - it resolves this pfoblem for some people
    LN

  • Request to post Icloud not working locations. for 2 days almost from Ventura CA. I think they are not being truthful about th eamount of folks affected!

    request to post Icloud not working locations. for 2 days almost from Ventura CA. I think they are not being truthful about the percentage of folks affected!
    and what's with the minimalist response? We're working on it for 2 days? You can do beter than that for exsisting loyal customers can't you?

    I just spoke to a Support person with Apple.  I got the same answer, "We Don't Know", "but they are working on it...Blah, Blah.  I too live in Ventura, and have been without email since yesterday approx. 3:00 pm.
    The guy said, it's the same if you brought your computer into the shop.  We have to determine if it's hardware, or software, then fix the problem.
    Well, What about a BACK UP SERVER?  No real answer to that one.  Just, "Thanks, for your Patience."
    This really blows!!!

  • Wifi connection with 4s not working after installing new software ios6

    wifi connection with 4s not working after installing ios 6.

    Go to Settings > WiFi > Select your network and hit the right arrow to "Forget Network"
    Then go to Settings > General > Reset Network Settings  and try connecting again when the phone restarts.

  • IPhone 4s bluetooth connects but does not work handsfree

    My iPhone 4s bluetooth connects but does not work handsfree.  Has worked fine with My iPhone 3s.  The Light on my VW turns green indicating a connect, but the phone does not work through the VWs audio.

    Fixed by power cycling the iPhone

  • HTTP method POST is not supported by this URL

    Hi everyone,
    I'm having a problem in my application.
    I used the ADF Security Wizard to enable the ADF Security in my application. So, it created the pages login.html, error.html and welcome.jsp.
    The problem is when I try to sign in in my applicaton. On the page login.html I filled in the fields username and password and click on the button to post the form. But when the form is posted I get the message: "HTTP method POST is not supported by this URL".
    The form is posted to the bean j_security_check.
    Does anybody know why is it happening? What should I do to fix it?
    Thanks a lot
    Daniel
    Edited by: [email protected] on 23/02/2010 05:37

    Normally when you get this error, your username/password is not correct.
    It's not a clean way of errorhandling. I have had the same issue and after a while i noticed the password i entered was not correct.

  • 405 HTTP method POST is not supported by this URL

    When I use GET method to browse a servlet by using TOMCAT or Resin, receive the following message:
    405 HTTP method POST is not supported by this URL
    Thanks!

    Just post your question once and be patient:
    http://forum.java.sun.com/thread.jspa?threadID=573890
    %

  • HTTPS sites and services not working on Snow Leopard 10.6.6

    Hi guys, any assistance would be appreciated as I really don't want to reinstall everything again.
    *Problem description:* After reinstalling Snow Leopard after some issues, I am unable to get any https services working (such as the online back up system Carbonite), nor access any https websites. My Macbook Pro and Windows Laptop on the same network have absolutely no issues with it. +Please also note that this problem is not limited to Safari, any software or browser that uses HTTPS to connect will not work.+
    *Attempted fixes:* Repaired Permission errors, deleted keychain and security preferences, and manually configured the network connection. I have also checked to make sure the date/time are correct and created a new user which has also not helped.
    *Recent changes:* My iMac refused to start up after permission errors so I was forced to reinstall Snow Leopard. I did a fresh install after formatting the drive.
    *Operating system:* Snow Leopard 10.6.6
    *System specs:* 2009 24" iMac

    If I was there with you,
    As a "Best Practice"
    #1- I would recommend that we make a FULL Bootable Backup of where you are, and confirm that it is bootable.
    Then
    As another Best Practice you should always have on the ready any and all INSTALLERS of your programs, along with the corresponding serial numbers,
    I feel that being PROACTIVE is a much place to be, then REACTIVE.
    #2 - I would be inclined to do a overlaying install of Snow Leopard, What happens is it will install a new OS while preserving ALL other info/data, including your Applications, Users.
    Please keep me posted as to your results,
    Randy Mac
    RMACS, LLC

  • Post Moved Not working with Xbox

    Post moved  http://community.bt.com/t5/Other-BB-Queries/Not-working-with-xbox/td-p/479565
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    Yea, in my honest opinion the wireless on the HH3 is not the greatest at all, the channel switching for me causes problems which causes my external devices to lose connection for a few seconds at times.
    Is there no way you could just try it? even for long a game or so just to rule out any possibilites? Also, since your at the other end of your house, that is also a problem even when your powerline adaptors.
    If you want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side If the the reply answers your question then please mark as ’Mark as Accepted Solution

  • IPod connection to car not working?!

    My iPod Nano (not sure if it's 4th Gen or not... not sure how to tell sorry) will not work with my car stereo anymore Up to a few days ago we hooked it up to our Honda (has a USB port in the arm rest) and it played through the car stereo. Today we went to use it and it recognizes the iPod, shows the song name on the stereo display but no sound comes out (the volume is up). We tried my nephews iPod and it works with sound, we tried connecting the earbuds to my iPod and there is music... so I'm stuck now because the cord works with another iPod and the headphones work on mine... any suggestions/ideas/help? Am I just not thinking of something? We're travelling so this is important lol
    TIA,
    Sarah

    Hi there, have you guys gotten your problem solved yet?
    If not try to reset your ipod. you can reset it by holding the centre and menu button at the same time until the screen displays an aple logo. try that and see if that fixes your problem.
    oh by the way to tell if your ipod nano is 4th gen it will look like one of these from the following webpage:
    http://www.apple.com/ipodnano/
    Peace!

  • 5800 Connection Manager is not working correctly

    I have my preferred connections setup with my home WLAN as priority, then my cell phone provider (ATT) as the last priority. The connection manager switches from my WLAN to ATT everytime I go out of range of my WLAN fully automatically. So that part is working as designed.
    The problem is when I get back to my home WLAN the connection manager doesn't automatically drop the EDGE or 3G connection and connect to my WLAN.
    To make things worse, even if I kill the EDGE or 3G connection manually, it may or may not pick up my WLAN and start using it.
    Then, if I can get the WLAN to connect, the connection manager will insist on connecting to the EDGE/3G connection and disconnecting the WLAN.
    This is crazy behavior. I've been pretty happy with the phone's stability over my old N78, but I hope to Zeus that a Firmware upgrade will be release that fixes this bug. It drives me nuts.
    So far the only way I can get the connection manager to resume it's expected behavior is to power off the phone and pull the battery. Then it will behave for a few days before becoming schizophrenic.
    If you have any tips on how to correct this behavior, I'd appreciate hearing it.
    cheers,
    mikehd
    5800XM NE
    F/W 40.2.005
    Solved!
    Go to Solution.

    mikehd wrote:
    The problem is when I get back to my home WLAN the connection manager doesn't automatically drop the EDGE or 3G connection and connect to my WLAN.
    Then, if I can get the WLAN to connect, the connection manager will insist on connecting to the EDGE/3G connection and disconnecting the WLAN.
    This is crazy behavior. I've been pretty happy with the phone's stability over my old N78, but I hope to Zeus that a Firmware upgrade will be release that fixes this bug. It drives me nuts.
    So far the only way I can get the connection manager to resume it's expected behavior is to power off the phone and pull the battery. Then it will behave for a few days before becoming schizophrenic.
    First, you may get much better response if you post in the appropriate forum.  in you case, "Connectivity."
    Dropping an active connection & switching to another connection is probably not designed behavior.  So in your case if the 3G connection is active, I can understand why it is not switching to WLAN.  I can also see why it might be a "nice-to-have" feature, but in some cases dropping an active connection may cause problems with applications that are using it, so you may end up with more problems if the connection kept changing (maybe).
    Firmware upgrade will not change as-designed behavior, but what you're describing sounds like there's some application which is configured to use either "default" or the 3G connection.  What I would do is look through all applications that are using the net and check the connection settings in each one and make sure it's set to use "Internet"
    Another thing you can do is set the AT&T connection to "always ask" mode so that it doesn't get used without you clicking OK.
    Lumia 920, Lumia 800
    Nokia N8-00 (NAM, Product Code: 059C8T6), Symbian Belle, Type RM-596, 111.030.0609
    Nokia 5800 XpressMusic (NAM, Product Code: 0577454) Software v51.2.007, Type RM-428

  • OLE DB Connection Build does not work

    Hello All!
    I am in the process of creating an ASP.NET application that
    will initially have an Access database for test purposes on my
    laptop computer. Eventually the database will be MS SQL. When I
    select OLE DB Connection -> Build it does not work. I have
    already tried the "fix" in
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19515
    and it did not work.
    I have also tried MS Access 2000 template and it does not
    work. At this point there is no User ID or Password to this
    database. Here is what is in the web.config file:
    <configuration>
    <appSettings>
    <add key="MM_CONNECTION_HANDLER_ctv"
    value="default_oledb.htm" />
    <add key="MM_CONNECTION_STRING_ctv"
    value="Provider=Microsoft.Jet.OLEDB.4.0;Data
    ource=C:\Inetpub\wwwroot\CTV1_1\database\ctv.mdb;User
    ID=;Password=;" />
    <add key="MM_CONNECTION_DATABASETYPE_ctv" value="OleDb"
    />
    <add key="MM_CONNECTION_SCHEMA_ctv" value="" />
    <add key="MM_CONNECTION_CATALOG_ctv" value="" />
    </appSettings>
    </configuration>
    I have installed IIS on the laptop along with .NET framework
    2.0 - maybe there is an install issue?
    I am using DreamWeaver MX 2004 with MS XP SP2 if that gives
    any further clues.
    Thanks for any help you can give!
    Lisa
    [email protected]

    No errors are thrown.  File I/O does not work.  Can not read or write. 
    PrintPanel() no longer works.
    Outside of my app, File I/O and printing works with other apps.

  • Isqlplus with full connection description does not work in netscape/firefox

    http://machine/isqlplus?userid="user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521))(CONNECT_DATA=(SID=xxx)(SRVR=DEDICATED)))"
    This works in IE, but fails in netscape and firefox with: SP2-0874: URL argument is missing a keyword
    It looks like a URL encoding issue. Has anyone seen this and if so have you found a solution?

    Thanks for the try, but that didn't help. Actually, without the full connection description it works in both browsers, i.e.
    http://machine/isqlplus?userid=user/pass@servicename
    does work in both. isqlplus under firefox appears to not like the encoding as:
    http://machine/isqlplus?userid="user/pass@servicename"
    this does not work under firefox. But with a full connect string it appears I need the quotes as without nether works.

  • SLD connection user/password not working.

    Hello friends,
    I am new bee in SAP Netweaver.
    I installed SAP Netweaver for java.
    Now I want to connect it with BAPI from SAP.
    so, some where i am sucked with SLD. I opened Visula Administrator and nothing there to connect.
    I also tried http://localhost:50000/sld but my user/password not working.
    1. What to do to see/get username/password for SLD?
    2. How to connect netweaver to access SAP ZBAPI?
    Regards,
    RH

    Hello friends,
    I am new bee in SAP Netweaver.
    I installed SAP Netweaver for java.
    Now I want to connect it with BAPI from SAP.
    so, some where i am sucked with SLD. I opened Visula Administrator and nothing there to connect.
    I also tried http://localhost:50000/sld but my user/password not working.
    1. What to do to see/get username/password for SLD?
    2. How to connect netweaver to access SAP ZBAPI?
    Regards,
    RH
    Hi Ronny.
    Where is your UME running? On the java engine, on an ABAP system or at a LDAP?
    What i want to say is that your user has to gain the rights to connect to the SLD. Easiest way is to give you admin rights - to do that you have to know where your userstore is running....
    I am not sure if this is correct http://localhost:50000/sld
    Normally it should look like http://my.sap.com/56600/sld where my.sap.com is a fqdn and 56600 is the port of the java engine. 66 ist the system number of the as java.
    ZBAPI? I do not really know but i think you have to use a jco to connect...
    regards,
    Martin

Maybe you are looking for

  • Central Confirmation (Goods receipient) in SRM 7.0

    Hi We are in Standalone Scenario and Upgrading from SRM 4.0 to SRM 7.0. We want to use the Central Confirmation scenario where for one region (Based on countries) in Org structure we have One Central Goods receipient. I have assigned the role /SAPSRM

  • Field Prof.Segmt is a required field for G/L account SC01 410050

    Hi all, i am getting the following issue when trying to release an SD invoice to FI Field Prof.Segmt is a required field for G/L account SC01 410050 Message no. F5808 Diagnosis The value for field "Prof.Segmt" in the interface to Financial Accounting

  • Mx870 printer not recognized by macbook pro

    The network name/password at my office changed recently and I have been unable to print or scan wirelessly to my MX870 since, even after setting up both my computer and my 3-in-1 on the new network. In addition, after deleting the printer in the Prin

  • How to listen for cell selection changes within a JTable

    Problem: my table has 8 columns, with 4 of them containing very large text (up to 1000 chars). Solution is to set the initial size these columns so that the 1st 20 chars are visible, and if one of these columns gains focus/selection via mouse-clickin

  • Multipe number range for indonesia tax invoice no.

    Hi All, I have one question to confirm with you all: Our indonesia office need to print out tax invoice when billing document is created. The format is TTS.BBB-YY.NNNNNNNN , and only TTS is fixed, the other 13 digits changes. And we can only get one