To answer Santosh's question, no, I have not received a 
satisfactory answer from any of the related mailing lists.
This seems to be a chronic problem, worthy of inclusion in the
SOAP FAQ.  And I've been getting asked directly about it at 
least once a week.    I would be most happy to write an
addition for the FAQ if I understood the problem thoroughly. 

On tomcat-user, the problem was described like this:

"Craig R. McClanahan" wrote:
> 
> I haven't had a chance to run your test case yet, but I suspect the cause
> might be related to a feature allowed in a Servlet 2.3 environment.  From
> Servlet 2.3, Section 9.7.2:
> 
>    "It is recommended also that the application class loader
>     be implemented so that classes and resources packaged within
>     the WAR are loaded in preference to classes and resources
>     residing in container-wide library JARs."
> 
> Tomcat 4 implements this "SHOULD" feature, as will most other Servlet 2.3
> implementations.  What it means is that, if you have a class
> org.apache.soap.Foo in *both* the web app (under WEB-INF) and in the
> shared "lib" directory, Tomcat 4 will load the version from WEB-INF.
> Tomcat 3.2 loads the one from "lib" in this scenario.
> 
> Applications that intend to be portable across servlet versions need to
> recognize this difference in order to operate correctly.  Of course,
> you shouldn't have a problem if you only have the classes one place or the
> other (and not both).
[...]

What I don't understand is why having 2 copies of 
the same class files is an issue.  The Servlet 2.3 
spec quoted above says classes "within WAR are loaded
in preference to...container-wide library JARs".
The key phrase is "in preference to".  This means that
if the classes are provided as a WAR, then the JAR 
should be *ignored*, not loaded.

And why does this manifest itself as a seemingly-unrelated 
fault and other bizarre behavior?

I'm also not convinced that one can simply remove either
set of class files.  If I remove lib/soap.jar and keep
the class files under webapps/soap, then it does not work.
I've only managed to get things to work by doing what 
Santosh described below (though I put soap.jar in lib,
not common/lib).

In addition to the problem Sandeep experienced, this also 
breaks the ability to receive SOAPContext for getting at 
HTTP request details.

Most frustrating...

-Chris



C Santosh wrote:
> 
> Guess:
> Include soap.jar in $TOMCAT_HOME/common/lib and remove
> org directory in $TOMCAT_HOME/webapps/soap/WEB-INF/classes/.
> If this works, ask for the reason in the tomcat mailing list,
> and if it doesnt work, let me know.
> 
> Santosh
> Chris malley: did u get any answer to this question from
> the tomcat list ?
> 
> ---------- Original Message ----------------------------------
> From: "Sandeep Heer" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 13 Dec 2001 10:14:05 +0000
> 
> >Help!
> >
> >I have a client and soap service. The soap service is on Catalina. The
> >client is sending a soap envelope but i get an error saying the the
> >message could not reach the service:
> >
> ><faultcode>SOAP-ENV:Server</faultcode>
> ><faultstring>Exception while handling service request:
> 
>>qService.requestit(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.rpc.SOAPContext)
> >-- no signature match</faultstring>
> ><faultactor>/soap/servlet/messagerouter</faultactor>
> ></SOAP-ENV:Fault>
[...]

-- 
Chris Malley
PixelZoom, Inc.             Voice: +1.303.494.8849
835 Orman Drive             EMail: [EMAIL PROTECTED]
Boulder CO 80303-2616

Reply via email to