You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Juha Kononen <Ju...@savonia-amk.fi> on 2005/08/29 19:49:57 UTC

I can't get CommonsHTTPSender working

Hi,

I'm trying to reuse socket connections in Axis 1.2.1 Final.
I have read from Axis mailing lists about configuring the
client-config.wsdd file and using the Jakarta Commons Http Client
package.

The content of client-config.wsdd I use is following:

<?xml version="1.0" encoding="UTF-8"?>
<deployment name="defaultClientConfig"
            xmlns="http://xml.apache.org/axis/wsdd/"
           
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <globalConfiguration>
   <parameter name="disablePrettyXML" value="true"/>
 </globalConfiguration>
 <transport name="http"
pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>  
 <transport name="local"
pivot="java:org.apache.axis.transport.local.LocalSender"/>
 <transport name="java"
pivot="java:org.apache.axis.transport.java.JavaSender"/>
</deployment>

I have the versions 2.0.2 and 3.0-RC3 of the Jakarta Commons Http
Client package and I have tried both of them in my Java project (i'm
using JBuilder 2005 with JDK 5.0).
I'm also using the DSServiceSOAPBindingImpl and
DSServiceSOAPBindingStub class files generated by Axis.
Everytime I call the server-side with the invoke method I get the
following error message:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/codec/DecoderException
	at
org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:217)
	at
org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(ExpectContinueMethod.java:92)
	at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(EntityEnclosingMethod.java:118)
	at
org.apache.commons.httpclient.methods.PostMethod.<init>(PostMethod.java:105)
	at
org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:150)
	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.client.AxisClient.invoke(AxisClient.java:165)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
	at org.apache.axis.client.Call.invoke(Call.java:2748)
	at org.apache.axis.client.Call.invoke(Call.java:2424)
	at org.apache.axis.client.Call.invoke(Call.java:2347)
	at org.apache.axis.client.Call.invoke(Call.java:1804)
	at
org.dsservice.decisionanalysis.DSServiceSOAPBindingStub.initDS(DSServiceSOAPBindingStub.java:447)
	at
org.dsservice.decisionanalysis.DSServiceSOAPBindingStub.prepareConnection(DSServiceSOAPBindingStub.java:530)
	at
org.dsservice.clientinvoke.DSClientLauncher.main(DSClientLauncher.java:36)

The error message tells that I'm missing a particular class though I
have the Jakarta Commons Http Client package in the classpath (I have
checked that the error comes in both Jakarta Commons Client versions).
Everything works fine if I use the <transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender"/>  definition,
but of course the reuse of socket connections doesn't work then.
So am I missing any additional class files, do I have to write some
special code or am doing all wrong? 

Juha