You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Christian Bock <ch...@krisbe.de> on 2002/08/07 15:28:31 UTC

[SOLVED] serializer and type casting

just set:

<RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" />

in server.xml

chris
  ----- Original Message ----- 
  From: Christian Bock 
  To: soap-user@xml.apache.org 
  Sent: Wednesday, August 07, 2002 12:34 PM
  Subject: serializer and type casting


  Hi,

  I wrote a Serializer for org.jdom.Document, but problem is, that
  Object src is a Jini-Service with Document from its codebase
  but the serializer does use Document from webapp's lib.
  How to tell the serializer to take Document from Jini's Codebase ?

  public class DocumentSerializer implements Serializer, Deserializer {

    public void marshall(String inScopeEncStyle, Class javaType, Object src,
                         Object context, Writer sink, NSStack nsStack,
                         XMLJavaMappingRegistry xjmr, SOAPContext ctx)
                          throws IllegalArgumentException, IOException  {

  ...

  (  ( org.jdom.Document ) src  ).getBytes();

  ...
   
  }

  I tried to do it via -Djava.rmi.server.codebase=//myserver:8081/ in
  TOMCAT_OPTS ( Tomcat 3.2), but it seems that this option is
  simply ignored, because the 

  <faultstring>Deployment error in SOAP service 'urn:AService':
  class name 'org.jdom.Document' could not be resolved: org.jdom.Document</faultstring>

  stays the same.

  When I put Document.class in webapp lib, it gets a ClassCastException, because
  ( I think so ) of the different VMs.

  any ideas?


  chris