users@jax-rpc.java.net

Re: Dynamic proxy serialization problem.

From: Hall, Joe <Joe.Hall_at_avnet.com>
Date: Mon, 31 Mar 2003 07:31:30 -0700

Well, since I haven't got a response, I'll also include my stack trace.

Any suggestions would be greatly appreciated.

serialization error: no serializer is registered for (class
[Lcom.avnet.pours.util.channel.receipt.standard.SendReceiptVO;,
{http://www.pours.com/types/PoursReceipt}ArrayOfSendReceiptVO)
        at
com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer(Dy
namicInternalTypeMappingRegistry.java:75)
        at
com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.getParameterSerializer(S
OAPRequestSerializer.java:130)
        at
com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.doSerializeInstance(SOAP
RequestSerializer.java:84)
        at
com.sun.xml.rpc.encoding.ObjectSerializerBase.serialize(ObjectSerializerBase
.java:100)
        at
com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:45
4)
        at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:61)
        at
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:56)
        at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:281)
        at
com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandle
r.java:98)
        at
com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandle
r.java:70)
        at $Proxy0.receive(Unknown Source)
        at
com.avnet.pours.util.channel.receipt.TestService.main(TestService.java:48)

CAUSE:

no serializer is registered for (class
[Lcom.avnet.pours.util.channel.receipt.standard.SendReceiptVO;,
{http://www.pours.com/types/PoursReceipt}ArrayOfSendReceiptVO)
        at
com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.java:
41)
        at
com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(Inter
nalTypeMappingRegistryImpl.java:289)
        at
com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer(Dy
namicInternalTypeMappingRegistry.java:52)
        at
com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.getParameterSerializer(S
OAPRequestSerializer.java:130)
        at
com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.doSerializeInstance(SOAP
RequestSerializer.java:84)
        at
com.sun.xml.rpc.encoding.ObjectSerializerBase.serialize(ObjectSerializerBase
.java:100)
        at
com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:45
4)
        at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:61)
        at
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:56)
        at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:281)
        at
com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandle
r.java:98)
        at
com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandle
r.java:70)
        at $Proxy0.receive(Unknown Source)
        at
com.avnet.pours.util.channel.receipt.TestService.main(TestService.java:48)



Thanks,

Joe Hall

-----Original Message-----
From: Hall, Joe
Sent: Thursday, March 27, 2003 12:41 PM
To: 'Public discussion on JAX-RPC'
Subject: Dynamic proxy serialization problem.


Is this still a bug in jwsdp 1.1? I'm encountering a problem using a
dynamic proxy where I have a serializable java bean as a parameter to
jax-rpc server.

http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0212&L=jaxrpc-interest&P=R47
2

I can get a test client to work using a static stub, but I'm having problems
with the dynamic proxy client.

Any suggestions?

Here's a snippet of the proxy client:

   public static void main(String[] args)
    {
        try
        {

            String UrlString =
"http://localhost:8080/SendReceipt/receipt?WSDL";
            String nameSpaceUri = "http://www.pours.com/wsdl/PoursReceipt";
            String serviceName = "PoursReceipt";
            String portName = "ReceiptIFPort";

            URL helloWsdlUrl = new URL(UrlString);

            ServiceFactory serviceFactory = ServiceFactory.newInstance();
            QName qname = new QName(nameSpaceUri, serviceName);
            System.out.println("QNAME: " + qname.toString() + ":" +
qname.getLocalPart());
            Service helloService =
serviceFactory.createService(helloWsdlUrl, qname);

            ReceiptIF myProxy = (ReceiptIF) helloService.getPort(new
QName(nameSpaceUri, portName), ReceiptIF.class);

            SendReceiptVO receipts[] = new SendReceiptVO[2];
            receipts[0] = new SendReceiptVO();
            receipts[1] = new SendReceiptVO();
            receipts[0].setOrderNumber(12312L);
            receipts[1].setOrderNumber(1235333L);
            receipts[0].setPart("ABCD");
            receipts[1].setPart("BDFSDF");
            System.out.println(myProxy.receive(1L, receipts));

        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }

Here's what the ReceiptIF looks like:

public interface ReceiptIF extends Remote
{
    public boolean receive(long transKey, SendReceiptVO receipts[]) throws
RemoteException;
}

Thanks,

Joe Hall