If your object can be represented as a 'JavaBean', then you can use
Java2WSDL and WSDL2Java to create client and server code to perform the
communications - and it automatically defines the WSDL to use a serializer
that works.

In other words, if your object can be represented as a bean then a
Serializer does exist.

I actually put a pretty detailed example of this in my Struts book -
"Struts Kickstart" by SAMS publishing.








Samuel Kerrien <[EMAIL PROTECTED]> on 10/08/2002 10:58:37 AM

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:     (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:    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                            [EMAIL PROTECTED]
  EMBL Outstation
  The European Bioinformatics Institute
  Wellcome Trust Genome Campus
  Hinxton, Cambridge, CB10 1SD, UK
 __________________________________________________________________








---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------


Reply via email to