Results 1 to 4 of 4

Thread: SOAP failed to respond with a valid HTTP response

  1. #1
    3RiversTechAdmin's Avatar
    3RiversTechAdmin is offline Special Member
    Join Date
    Oct 2006
    Posts
    100
    Rep Power
    8

    Unhappy SOAP failed to respond with a valid HTTP response

    Hey everyone,

    I'm getting an "org.apache.commons.httpclient.ProtocolExcepti on: The server badgerdev.3riverstech.com failed to respond with a valid HTTP response" when I attempt to start communications with the Zimbra SOAP interface. Does anyone know what I may be doing wrong? I'm running this against 5.0 beta.
    The code for my very small Java program is included below:
    I am connecting to http://myServer.myDomain.com:7071/service/soap
    Any ideas would be great

    Code:
    package com.zimbra.cs.client.soap;
    
    import com.zimbra.common.util.CliUtil;
    import com.zimbra.cs.client.LmcSession;
    
    
    public class Test
    {
        public static void main(String args[])
        {
            CliUtil.toolSetup();
            if (args.length != 3)
            {
                System.out.println("Usage: Tester <serverURL> <username> <password>");
                System.out.println("where:");
                System.out.println("<serverURL> is the full URL to the SOAP service");
                System.out.println("<username> is the name of the user to log in as");
                System.out.println("<password> is that user's password");
                System.exit(0);
            }
            String serverURL = args[0];
            try
            {
                // ping
                System.out.print("Connecting to " + serverURL + " as " + args[1] + ".... ");
                LmcPingRequest ping = new LmcPingRequest();
                LmcPingResponse pingResponse = (LmcPingResponse)ping.invoke(serverURL);
                System.out.println("OK");
                
                // auth
                System.out.print("connected\nAuthenticating... ");
                LmcAuthRequest authRequest = new LmcAuthRequest();
                authRequest.setUsername(args[1]);
                authRequest.setPassword(args[2]);
                LmcAuthResponse authResponse = (LmcAuthResponse)authRequest.invoke(serverURL);
                LmcSession session = authResponse.getSession();
                System.out.println("OK");
            }
            catch (Exception e)
            {
                System.err.println();
                e.printStackTrace(System.err);
            } 
        }
    }
    Full stack trace:
    Code:
    org.apache.commons.httpclient.ProtocolException: The server XXXX.XXXXXX.com failed to respond with a valid HTTP response
            at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1846)
            at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
            at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
            at com.zimbra.common.soap.SoapHttpTransport.invoke(SoapHttpTransport.java:200)
            at com.zimbra.common.soap.SoapTransport.invoke(SoapTransport.java:278)
            at com.zimbra.common.soap.SoapTransport.invoke(SoapTransport.java:229)
            at com.zimbra.cs.client.soap.LmcSoapRequest.invoke(LmcSoapRequest.java:148)
            at com.zimbra.cs.client.soap.Test.main(Test.java:27)

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default

    Try connecting to port 7070. Port 7071 is the admin port and hence requires https.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    3RiversTechAdmin's Avatar
    3RiversTechAdmin is offline Special Member
    Join Date
    Oct 2006
    Posts
    100
    Rep Power
    8

    Default Re:

    Quote Originally Posted by dkarp View Post
    Try connecting to port 7070. Port 7071 is the admin port and hence requires https.
    Thanks for the quick response. I tried your suggestion, but now the exception is Java.net.ConnectException: Connection Refused.

  4. #4
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default

    OK. Send the request to whichever port the web client runs on.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Lotus migration
    By babou in forum Migration
    Replies: 15
    Last Post: 03-05-2007, 10:33 PM
  2. Import PST failed
    By undertoe in forum Installation
    Replies: 2
    Last Post: 06-21-2006, 10:16 AM
  3. SOAP post HTTP error
    By MichaelA1 in forum Developers
    Replies: 6
    Last Post: 04-19-2006, 05:16 PM
  4. Replies: 18
    Last Post: 03-20-2006, 02:22 PM
  5. Replies: 13
    Last Post: 10-31-2005, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •