users@jax-rpc.java.net

Re: Serializers & Deserializers

From: YAWN,MICHAEL (HP-Cupertino,ex1) <"YAWN,MICHAEL>
Date: Wed, 17 Apr 2002 12:03:32 -0400

This did the trick, thanks! I've now made successful
calls with each of these signatures:
    void init()
    String[] getKeyNames();
    MyObject[] getValues(String keyName);


Now just one follow-up, to make sure I describe this
correctly:

- Access to the TypeMapping registry should be standard
  across all JAX-RPC implementers.
- The TypeMapping.register() call should also be standard,
  although the implementation of the SerializerFactory
  and DeserializerFactory is left to implementers.
- All of the code used to produce these factories --
  the various com.sun classes -- is specific to the
  reference implementation, so the process for
  creating the factory objects passed to mapping.register()
  can be completely different across implementations.

Do I have this right?

Is there any indication at this point what 'portable
serializers and deserializers' will look like in a future
release? Is the current implementation likely to be
selected, or does it have known portability issues that
will force another approach to be used instead?

Thanks for all your help.
Mike

> -----Original Message-----
> From: Arun Gupta [mailto:arun.gupta_at_SUN.COM]
> Sent: Tuesday, April 16, 2002 3:43 PM
> To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> Subject: Re: Serializers & Deserializers
>
>
> Hi Michael,
>
> I'm attaching files to demonstrate the usage of String[] and
> an array of
> a complex type in a DII client. The files are:
>
> - service endpoint interface
> - service endpoint class
> - DII client to invoke the service
> - config.xml
> - web.xml
>
> I ran these file on JWSDP EA2 and the client printed all the results
> successfully.
>
> Thanks for your interest in JAX-RPC.
>
> Thanks,
> -Arun
>
> YAWN,MICHAEL (HP-Cupertino,ex1) wrote:
>
> >Hi,
> >
> >I'm having difficulty getting serializers and deserializers
> to work. I'm
> >using the code provided
> >by Arun last week as a guide, but also looking at the code
> generated by
> >XRPCC to help
> >resolve some questions.
> >
> >Task 1: Need to serialize a String[].
> >- Arun's example code created a SimpleTypeSerializer, but
> XRPCC uses an
> >AttachmentSerializer
> > to handle the String. Is there a reason to prefer one
> over the other?
> >- What is the rule for using ENCODE_TYPE vs DONT_ENCODE_TYPE in the
> >serializer constructor
> > calls? Arun's code uses DONT_ENCODE for the String,
> ENCODE for the array.
> >The xrpcc-generated
> > code has ENCODE_TYPE for both.
> >- What is the first parameter to the
> SimpleTypeArraySerializer constructor?
> >Arun's code passes a
> > QNAME_TYPE_INT, but the xrpcc-generated code uses the QName for
> >'ArrayOfstring'. The type
> > of the sixth parameter seems similarly confused.
> >- Why does XRPCC use the constant NS_SOAP_ENCODING, while
> Arun's code uses
> > URI_ENCODING for the same purpose, and in my code neither
> will work -- I
> >must use
> > URI_NS_SOAP_ENCODING.
> >- What is the rule for using SERIALIZE_AS_REF vs.
> DONT_SERIALIZE_AS_REF in
> >the
> > ReferenceableSerializerImpl constructor?
> >- My code as written fails with 'Illegal MimeHeader name or
> value'. Does
> >this provide any
> > insight into where my problem is likely to be?
> >
> >Task 2: Need to serialize an array of a complex type
> >- Is there an example available for serializing a complex
> type? I have a
> >type which consists
> > of an int[], a String, and a float. It's hard to follow
> exactly how this
> >is being done in the
> > xrpcc-generated code since it seems to be spread across
> several classes.
> >
> >Any available documentation on these constructor calls would
> go a long way
> >toward
> >helping me get these examples working. I can send (via list
> or separately)
> >source for
> >the client program if desired.
> >
> >Thanks,
> >Mike
> >
>
> --
> =============================================
> There is only one me, I must live myself!
> There is only one today, I must live itself!
> =============================================
> http://members.tripod.com/~apgupta/index.html
> =============================================
>
>
>