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 Samuel Kerrien <sk...@ebi.ac.uk> on 2002/10/08 16:58:37 UTC

how write a Serializer

Hi all,

How to send send and receive an Object for which no Serializer had been 
previously written ?
I mean : I had created an Object as follow :

public class Container {
  private int id;
  private float x;
  private float y;

  public Container (int id, float x, float y) {
    this.id = id;
    this.x  = x;
    this.y  = y;
  }

  (...)
} // Container

but when I try to receive one of them from my web service, I get the 
following exception :

Exception in thread "main" java.io.IOException: No serializer found for 
class collection.Container in registry 
org.apache.axis.encoding.TypeMappingImpl@2d15a9
java.io.IOException: *No serializer found for class collection.Container 
in registry* org.apache.axis.encoding.TypeMappingImpl@2d15a9
        at 
org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1037)
        at 
org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:633)
        at 
org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:685)
        at 
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:387)
        at 
org.apache.axis.message.MessageElement.output(MessageElement.java:651)
        at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:379)
        at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:306)
        at org.apache.axis.Message.getContentLength(Message.java:334)
        at 
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:382)
        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:174)
        at org.apache.axis.client.Call.invoke(Call.java:1905)
        at org.apache.axis.client.Call.invoke(Call.java:1690)
        at org.apache.axis.client.Call.invoke(Call.java:1608)
        at org.apache.axis.client.Call.invoke(Call.java:1169)
        at 
collection.client.CollectionSoapBindingStub.getArray(CollectionSoapBindingStub.java:118)
        at Client.main(Client.java:31)



So my question is how to write the corresponding Serializer ?

If anyone had an idea ...

Thanx

Sam



-- 



 __________________________________________________________________

  Samuel Kerrien                            skerrien@ebi.ac.uk
  EMBL Outstation                         
  The European Bioinformatics Institute   
  Wellcome Trust Genome Campus             
  Hinxton, Cambridge, CB10 1SD, UK          
 __________________________________________________________________