Thanks again Jeff. I am currently using/modifying the stub code that is 
generated from the WSDL, so I was trying to only modify as little as necessary, 
and that seemed to be setting properties and elements on the Call object.

I will try it out and look up other items that can be set within the 
EngineConfiguration as well on the client side.

For the server side, it is being configured by the wsdd, is the  <transport 
  name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" 
  /> block sufficient and correct?

Thanks!

M-


----- Original Message ----
From: "Walker, Jeff" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, September 20, 2007 2:14:39 PM
Subject: RE: Axis 1.4 CommonsHTTPSender question



 
DIV {
MARGIN:0px;}



So,

you have a bunch of questions, and I have only a 
suggestion, or two.

I'm not convinced the way you programmatically setup the 
sender is correct. Perhaps your way is right (or almost right) but I would have 
approached it like this:

 

...

EngineConfiguration defaultConfig = (new 
DefaultEngineConfigurationFactory()).getClientEngineConfig();
SimpleProvider 
config = new SimpleProvider(defaultConfig);
SimpleChain c = new 
SimpleChain(new CommonsHTTPSender());
config.deployTransport("http", 
c);

...

Service service = new Service(config);
Call call = 
(Call)service.createCall();
...

 


then set the bewielding array of parameters on the 
Call object. (This is why most people don't do dynamic clients, these 
parameters 
are too hard to get right). Now, I did not test the above code, so I 
have no real idea if it is correct.

 

Yes, CommonHTTPSender seems to use 1.1 by default. Which makes me 
think the two handlers you setup are in fact using CommonsHTTPSender (because 
they sent their requests using 1.1) and the middle request was sent by the 
default HTTPSender, which I suspect still uses HTTP 
1.0.


-jeff

 

 

 

Now, since it is a 
programmatically defined client, I activate the
CommonsHTTPSender by adding 
the following lines to the client:

CommonsHTTPSender reqHandler = new 
CommonsHTTPSender();
CommonsHTTPSender respHandler = new 
CommonsHTTPSender();
_call.setClientHandlers(reqHandler, 
respHandler);

The following line is added to the 
server-config.wsdd:

<transport 
name="http"
pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" 
/>


 



  
  
  From: Mario Felarca 
  [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 20, 2007 
  1:09 PM
To: [email protected]
Subject: Re: Axis 1.4 
  CommonsHTTPSender question



  

  
  Once 
  more...


  ----- 
  Original Message ----
From: Mario Felarca 
  <[EMAIL PROTECTED]>


  
  Ugh...once 
  again, had some of the code eaten. Putting it back in under the first 
Request: 
  block.

Thanks,

Mario-



  ----- 
  Original Message ----
From: Mario Felarca 
  <[EMAIL PROTECTED]>


  
  Thanks for the feedback Jeff! That helps. I do have a follow up question 
  for you or anyone else in the group. Is the way I am setting the client to 
  programattically utilize CommonsHTTPSender for the transport correct? I 
  believe it is, or at least it has an effect, since without it, the connection 
  works fine. I have tried setting the chunked property to false with the 
  following code and it does not appear to be 
  working:

        Hashtable 
  httpHeaders = new Hashtable();       
  
        
  httpHeaders.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED, 
  false);
        
  _call.setProperty(HTTPConstants.REQUEST_HEADERS, httpHeaders);

Also, if 
  it is using CommonsHTTPSender, I should not have to set a property to get it 
  to use HTTP 1.1, correct? However, in the tcpmon output, for some reason the 
  second connection (which I still don't know where the second and third 
  attempted connections are coming from) clearly uses 1.0, while the other two 
  use 1.1. Is this an automatic retry under 1.0 if the 1.1 connection fails for 
  some reason? I have tried adding in the following line with no discernible 
  effect.

httpHeaders.put(MessageContext.HTTP_TRANSPORT_VERSION, 
  HTTPConstants.HEADER_PROTOCOL_11);

I am including the output below from 
  tcpmon for what is a SINGLE call to invoke on my _call object. You can see it 
  results in 3 connections, and for some reason, it doesn't seem to be taking 
  the headers. At the very bottom, I include the output from the successful 
  Request (not using CommonsHTTPSender) for reference.

Thanks again in 
  advance!

Mario-


From the table:

State   
  Time               
                 Request 
  Host    Target Host   Request
Done   
  2007-09-20 10:48:34   localhost      
        127.0.0.1      POST 
  /axis/services/USERSERVICE HTTP/1.1
Done   2007-09-20 10:48:36 
    localhost            
  127.0.0.1      POST /axis/services/USERSERVICE 
  HTTP/1.0
Done   2007-09-20 10:48:36   localhost   
           127.0.0.1      
  POST /axis/services/USERSERVICE HTTP/1.1

The Request and Response 
  headers for each of the above, in 

#1
Request:
POST 
  /axis/services/USERSERVICE HTTP/1.1
Content-Type: text/xml; 
  charset=utf-8
SOAPAction: ""
User-Agent: 
  Axis/1.4
axis.transport.version: HTTP/1.1
Host: 
  127.0.0.1:8888
Content-Length: 1221

Response:
HTTP/1.1 500 
  Internal Server Error
Content-Type: 
  text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 20 Sep 2007 
  15:48:35 GMT
Server: Apache-Coyote/1.1
Connection: 
  close

#2
Request:
POST /axis/services/USERSERVICE 
  HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: 
  application/soap+xml, application/dime, multipart/related, 
  text/*
User-Agent: Axis/1.4
Host: 127.0.0.1:8888
Cache-Control: 
  no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 
  1221
axis.transport.version: HTTP/1.1
chunked: 
  false

Response:
HTTP/1.1 500 Internal Server Error
Content-Type: 
  text/xml;charset=utf-8
Date: Thu, 20 Sep 2007 15:48:35 GMT
Server: 
  Apache-Coyote/1.1
Connection: close

#3
Request:
POST 
  /axis/services/RGCIL HTTP/1.1
Content-Type: text/xml; 
  charset=utf-8
SOAPAction: ""
User-Agent: 
  Axis/1.4
axis.transport.version: HTTP/1.1
Host: 
  127.0.0.1:8888
Content-Length: 1221

Response:
HTTP/1.1 500 
  Internal Server Error
Content-Type: 
  text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 20 Sep 2007 
  15:48:35 GMT
Server: Apache-Coyote/1.1
Connection: close


The 
  contents of each Request and Response are the same except for the fact that 
in 
  the POST HTTP 1.0 version, the chunked string information you talked about is 
  not present in the response. So I am only posting each one 
  once.

Request:
<?xml version="1.0" 
  encoding="UTF-8"?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Body><processMessage
 
  xmlns="urn:US"><in0 soapenc:arrayType="xsd:anyType[1]" 
  xsi:type="soapenc:Array" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";><in0 
  
xsi:type="soapenc:string"><![CDATA[SOMEUSERDATA]]></in0></in0></processMessage></soapenv:Body></soapenv:Envelope>


Response:

1339
soapenv:Server.userException 
  org.xml.sax.SAXException: No deserializer for 
{http://schemas.xmlsoap.org/soap/encoding/}string 
  
org.xml.sax.SAXException'>http://xml.apache.org/axis/";>org.xml.sax.SAXException:
 No 
  deserializer for {http://schemas.xmlsoap.org/soap/encoding/}string
    
  at 
  
org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:453)
    
  at 
  
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
    
  at 
  
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
    
  at 
  org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    
  at 
  
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    
  at 
  org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
    
  at 
  org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    
  at 
  org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
    
  at 
  org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    
  at 
  
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    
  at 
  org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    
  at 
  org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    
  at 
  org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    
  at 
  org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    
  at 
  org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    
  at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
    
  at 
  
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    
  at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    
  at 
  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
    
  at 
  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    
  at 
  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    
  at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    
  at 
  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    
  at 
  
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:199)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    
  at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    
  at 
  org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
    
  at 
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    
  at 
  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    
  at 
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    
  at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    
  at 
  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
    
  at 
  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    
  at 
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    
  at 
  org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
    
  at 
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    
  at 
  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    
  at 
  org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    
  at 
  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    
  at java.lang.Thread.run(Thread.java:595)
USERMACHINE'>http://xml.apache.org/axis/";>USERMACHINE
0


The 
  Request before changing to use CommonsHTTPSender:

POST 
  /axis/services/USERSERVICE HTTP/1.0
Content-Type: text/xml; 
  charset=utf-8
Accept: application/soap+xml, application/dime, 
  multipart/related, text/*
User-Agent: Axis/1.4
Host: 
  127.0.0.1:8888
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: 
  ""
Content-Length: 1088



<?xml version="1.0" 
  encoding="UTF-8"?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";;; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";;; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Body><processMessage
 
  xmlns="urn:US"><in0 
  
xsi:type="xsd:string"><![CDATA[SOMEUSERDATA]]></in0></processMessage></soapenv:Body></soapenv:Envelope>





----- 
  Original Message ----
From: "Walker, Jeff" 
  <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, 
  September 14, 2007 7:47:51 AM
Subject: RE: Axis 1.4 CommonsHTTPSender 
  question


  Mario,
I can answer the "4c5" "0" before and after question, but not 
  the three
firings.
Go here to see why the numbers come out: http://wso2.org/library/952
We get transfer encoding = 
  chunked turned on by default in HTTP 1.1, and
I think you would prefer it 
  turned off.
-jeff


-----Original Message-----
From: Mario 
  Felarca [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 13, 2007 
  10:34 PM
To: [email protected]
Subject: Axis 1.4 CommonsHTTPSender 
  question

Hello all!

I have a client where before setting the 
  client to use
CommonsHTTPSender, it worked fine. The client would post 
  using HTTP 1.0,
and it would do so once only and everything was 
  fine.

Now, since it is a programmatically defined client, I activate 
  the
CommonsHTTPSender by adding the following lines to the 
  client:

CommonsHTTPSender reqHandler = new 
  CommonsHTTPSender();
CommonsHTTPSender respHandler = new 
  CommonsHTTPSender();
_call.setClientHandlers(reqHandler, 
  respHandler);

The following line is added to the 
  server-config.wsdd:

<transport 
  name="http"
pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" 
  />


The behavior I am seeing in tcpmon when NOT using 
  CommonsHTTPSender is:

POST /axis/services/USERSERVICE 
  HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: 
  application/soap+xml, application/dime, 
  multipart/related,
text/*
User-Agent: Axis/1.4
Host: 
  127.0.0.1:8888
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: 
  ""
Content-Length: 1088

<![CDATA[SOMEUSERDATA]]>

The 
  behavior I am seeing in tcpmon when I use CommonsHTTPSender is
listed 
  below, however it is also notable that it fires three times
instead of 
  once, all on its own. The first and third time are HTTP 1.1,
and the middle 
  one is HTTP 1.0. I'm not sure why this behavior exists as
well. 
  

Additionally, there are these strings before and after the soap 
  content,
the string before is 4c5 and the string after is 0. I don't know 
  where
these come from either, and if these are the reasons for the 3 
  seperate
calls.

Anyway, the tcpmon is:

POST 
  /axis/services/USERSERVICE HTTP/1.1
Content-Type: text/xml; 
  charset=utf-8
SOAPAction: ""
User-Agent: Axis/1.4
Host: 
  127.0.0.1:8888
Transfer-Encoding: 
  chunked

4c5
<![CDATA[SOMEUSERDATA]]>
0


Any help 
  or guidance would be greatly appreciated!!

Thanks in 
  advance,

Mario-





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