Hi,

I downloaded 1.4 and added the following in the generated code near the
end of method:
protected org.apache.axis.client.Call createCall() throws
java.rmi.RemoteException {
...
        Hashtable myhttp = new Hashtable();
        myhttp.put(MessageContext.HTTP_TRANSPORT_VERSION,
HTTPConstants.HEADER_PROTOCOL_V10);
        myhttp.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,
false);
        _call.setProperty(HTTPConstants.REQUEST_HEADERS, myhttp);
...

Now it works ... Cool ;)
Thanks for the help.


Regards,

Kenneth

> -----Original Message-----
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Sent: 31 May 2006 18:10
> To: [email protected]
> Subject: Re: Problem with 'httpChunkStream = true' through VPN
> 
> Good Morning Ken-
> 
> I dont know if that particular feature is available in the 
> 1.2.1 distro- I would recommend downloading and implementing 
> with Axis 1.3 or if you want to incorporate WSS4J features 
> possibly latest and greatest distro axis 1.4 Anyone else know 
> if this feature is available in 1.21???
> 
> Thanks,
> 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" <[EMAIL PROTECTED]>
> To: <[email protected]>; "Martin Gainty" <[EMAIL PROTECTED]>
> Sent: Wednesday, May 31, 2006 10:30 AM
> Subject: RE: Problem with 'httpChunkStream = true' through VPN
> 
> 
> So I followed the example. In my generated stub I added:
> ...
>         setRequestHeaders(_call);
>         setAttachments(_call);
>         
>         Hashtable myhttp = new Hashtable();
> 
>         myhttp.put(MessageContext.HTTP_TRANSPORT_VERSION,
> HTTPConstants.HEADER_PROTOCOL_V10);
>         _call.setProperty(HTTPConstants.REQUEST_HEADERS, myhttp); 
> 
> Cool, so I started debugging and arrived in CommonsHTTPSender:
>         Hashtable userHeaderTable =
>             (Hashtable)
> msgContext.getProperty(HTTPConstants.REQUEST_HEADERS);
>         
>         if (userHeaderTable != null) {
>             for (Iterator e = userHeaderTable.entrySet().iterator();
>                  e.hasNext();) {
>                 Map.Entry me = (Map.Entry) e.next();
> 
> This userHeaderTable does not contain any of the properties I set. So
> how can I propagate my properties to the CommonsHTTPSender. Note, this
> is axis 1.2.1. Is this a bug?
> 
> > -----Original Message-----
> > From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> > Sent: 30 May 2006 15:00
> > To: [email protected]
> > Subject: Re: Problem with 'httpChunkStream = true' through VPN
> > 
> > Good Morning Ken-
> > download Axis 1.3 and look at the example in 
> > .\samples\attachments\EchoAttachment.java
> > Let me know if you need any help,
> > 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" <[EMAIL PROTECTED]>
> > To: <[email protected]>; "Martin Gainty" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 30, 2006 1:43 AM
> > Subject: RE: Problem with 'httpChunkStream = true' through VPN
> > 
> > 
> > Thank you for the quick reply. However, I don't have the
> > setscopedproperty method. In which version of Axis is this 
> available.
> > I'm running 1.2.1. How can I do this in 1.2.1?
> > 
> > > -----Original Message-----
> > > From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> > > Sent: 29 May 2006 17:21
> > > To: [email protected]
> > > Subject: Re: Problem with 'httpChunkStream = true' through VPN
> > > 
> > > 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,Ht
> > > tpConstants.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" <[EMAIL PROTECTED]>
> > > To: <[email protected]>
> > > 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: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to