my initial goal was to learn about wscompile static stub clients, Dynamic
Proxy clients, and DII
Dynamic Invocation Interface clients -- and jax-rpc custom serialization.
i was studying the Oreilly JavaWebServices Nutshell 2002-2003 book.
i then encountered some problems -- are they jax-rpc bugs or something else?
i am running netbeans 6.5.1 with glassfishv2ur2.
after lots of experiments i have reduced the problem to the following
example/experiments.
i have created 2 different jax-rpc web services.
each contains 3 operations/methods.
they are identical -- except 1 is rpc/encoded, the other is rpc/literal.
there is 1 Java Bean object/class with getter, setter methods named
BookInfo.java, which is the
same in both clients and was generated by wscompile -- using netbeans 6.5;
the rpc/literal client wscompile also generated a BookInfoArray.java java
bean -- and is
referenced in the below rpc/literal SEI.
both services have the SEI
public interface wsTestSEI extends java.rmi.Remote {
String rString(String s1) throws RemoteException;
BookInfo r1BookInfo() throws RemoteException;
BookInfo[] rBookInfos(String i1) throws RemoteException;
}
the rpc/encoded client generates the following SEI
public interface WsTestSEI extends java.rmi.Remote {
public websvc1.BookInfo r1BookInfo() throws
java.rmi.RemoteException;
// uses and array return type
public websvc1.BookInfo[] rBookInfos(java.lang.String string_1) throws
java.rmi.RemoteException;
public java.lang.String rString(java.lang.String string_1) throws
java.rmi.RemoteException;
}
the rpc/literal client generates the following SEI
public interface WsTestSEI extends java.rmi.Remote {
public websvc3.BookInfo r1BookInfo() throws
java.rmi.RemoteException;
// uses a java bean return type
public websvc3.BookInfoArray rBookInfos(java.lang.String string_1)
throws
java.rmi.RemoteException;
public java.lang.String rString(java.lang.String string_1) throws
java.rmi.RemoteException;
}
------------------------------------------------------------
all 3 methods work without problems for the rpc/literal client -- using all
3 invocation models
-- wscompile static stub, Dynamic Proxy, and DII Dynamic Invocation
Interface.
for the rpc/encoded clients -- only the wscompiled static stub client works
without any
problems.
the only method that fails to work of the 3 is the rBookInfos() operation --
which expects and
array of BookInfo objects to be returned.
i got the DII rpc/encoded client to work by adding a custom serializer to
the type mapping
registry -- for the rBookInfos method/operation.
for the rpc/encoded Dynamic Proxy client -- i was unable to discover a way
to make the
rBookInfos() method/operation work at all -- i experimented with adding
cutom serializers but
never got it to work.
====================================================
is this a jax-rpc bug?
if not what am i doing wrong?
i could provide info from the stack trace, and the tcpmon monitored SOAP
messages if wanted.
thanks