users@jax-rpc.java.net

Dynamic proxy serialization problem.

From: Hall, Joe <Joe.Hall_at_avnet.com>
Date: Thu, 27 Mar 2003 10:40:45 -0700

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