axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: Problem with 'httpChunkStream = true' through VPN
Date Mon, 29 May 2006 15:21:06 GMT
Good Morning Ken-

good news you have been able to determine the workaround..
for configuring the chunking capability you will need to set the HTTP transport version back
to 1.0

 Service service = new Service(); //A new axis Service.
 Call call = (Call) service.createCall(); //Create a call to the service.

        /*Un comment the below statement to do HTTP/1.1 protocol (to enable chunking..)*/
        //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION,HTTPConstants.HEADER_PROTOCOL_V11);
        //Hashtable myhttp = new Hashtable();
        //myhttp.put("dddd", "yyy");     //Send extra soap headers
        //myhttp.put("SOAPAction", "dyyy");
        //myhttp.put("SOAPActions", "prova");
        /*Un comment the below to do http chunking to avoid the need to calculate content-length.
(Needs HTTP/1.1)*/
        //myhttp.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED);

//this option will disable chunking..
call.setScopedProperty(MessageContext.HTTP_TRANSPOR_VERSION,HttpConstants.HEADER_PROTOCOL_V10);

HTH
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Westelinck, Kenneth" <WestelinckK@delaware.be>
To: <axis-user@ws.apache.org>
Sent: Monday, May 29, 2006 9:45 AM
Subject: Problem with 'httpChunkStream = true' through VPN


Hi all,

I am using Axis to call webservices storing business objects in
Microsoft CRM (works great!!!). I've been developing and calling
webservices on a server running local on top of vmware. Now I am trying
to call my colleagues development server which I can access through a
VPN tunnel ... But it fails. I get the following exception:

java.net.SocketException: Connection reset

Cool, so I started digging and found that I don't get this exception
when setting 'httpChunkStream = false'. This is the testcode:
        HttpClient httpClient = new HttpClient();
        Credentials credentials = new NTCredentials("user",
                "pwd",
                "localhost",
                "domain");
        httpClient.getState().setCredentials(AuthScope.ANY,
credentials);
        HttpMethodBase method = new
PostMethod("http://localhost/mscrmservices/2006/crmservice.asmx");
        Message reqMessage = new Message("test");
        ((PostMethod)method).setRequestEntity(new
MessageRequestEntity(method, reqMessage, false));

        try {
            int returnCode = httpClient.executeMethod(method);
            String response = method.getResponseBodyAsString();
            System.out.println("Response: " + response);
        } catch (HttpException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

How to propagate this property to Axis (I'm using the stub generated by
wsdl2java).

Thanks.


Regards,

Kenneth

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org

Mime
View raw message