You must have your de-serializer under WEB-INF/classes, since it uses 
classes from your webapp.  The class loader for classes in shared 
does not "see" the classes in your webapp.

Your errors are because in your deployment descriptor, the 
encodingStyle within your mapping should be

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";

not

enncodingStyle="http://schemas.xmlsoap.org/soap/encoding";

i.e. fix the spelling of encodingStyle and don't forget the trailing 
slash in the URI (which *is* significant).

On 25 Jun 2003 at 22:15, Andrew McCready wrote:

> I'm using tomcat 4.1.24 and apache soap 2.3.1 (and I
> have soap deployed as a webapp), and I'm trying to
> write a custom serializer/deserializer. It works fine
> on the client side (or at least appears to thanks to
> tcptunnel), but I get one of two errors from the
> server:
> 
> If the class for the deserializer (and the object to
> be deserialized and the class that services the
> request) is in shared/classes, I get this error:
> 
> Deployment error in SOAP service 'urn:TestService':
> class name 'org.test.TestSerializer' could not be
> resolved as a serializer: null
> 
> I assumed this was because it couldn't find the
> serializer class in the classpath for some reason, but
> it has no problem finding the class that services the
> request, which is in the same package (and therefore
> same directory).
> 
> OTOH, if I put the classes in
> webapps/soap/WEB-INF/classes/, I get the following
> error:
> 
> (on serialization) 
> java.lang.IllegalArgumentException: No Serializer
> found to serialize a 'org.test.TestDAO' using encoding
> style 'http://schemas.xmlsoap.org/soap/encoding/'.
> 
> (on deserialization)  No Deserializer found to
> deserialize a 'urn:TestService:data' using encoding
> style 'http://schemas.xmlsoap.org/soap/encoding/'.
> 
> 
> 
> ??? In both cases, the service is deployed with the
> following deployment descriptor:
> 
> <isd:service
> xmlns:isd="http://xml.apache.org/xml-soap/deployment";
> id="urn:TestService" >
>   <isd:provider type="java"
>                 scope="Application"
>                 methods="insertTest selectTest">
>     <isd:java class="org.test.DbTest" 
> static="false"/>
>   </isd:provider>
> 
> 
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
>  <isd:mappings>
>    <isd:map
> enncodingStyle="http://schemas.xmlsoap.org/soap/encoding";
> 
>      xmlns:x="urn:TestService" 
>      qname="x:data"
>      javaType="org.test.TestDAO" 
>      java2XMLClassName="org.test.TestSerializer" 
>      xml2JavaClassName="org.test.TestSerializer" />
>  </isd:mappings>
> </isd:service>
> 
> 
> Can anyone tell me what I'm doing wrong? Since the
> serializer/deserializer works on the client side, and
> since the DbTest class works find with
> primitives/strings, I assume the problem is with the
> deployment descriptor. 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.


Reply via email to