axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Almeida, Timothy" <>
Subject RE: DII : JavaBeans & Vector mapping ?
Date Wed, 26 Mar 2003 17:11:48 GMT
You won't need to create a custom serializer if you ensure that the values
returned (and passed) are one of the many 'supported types'. That includes
primitive types, other supported classes like String, Integer, etc., and
If you use JavaBeans, serialization support is provided by BeanSerializer --
so you don't need to create your own custom serializer -- which is not the
easiest thing to do anyway!
In your case you're returning an object which represents a hierarchy of
objects. Every element of that hierarchy needs to be serialized by Axis. So
if there are types which are not one of the supported types, you are best
off trying to make them beans, so that you can leverage the provided
BeanSerializer. (The fact that they need to be beans has nothing to do with
how you intend to use them on the client -- it is to allow Axis to serialize
them using SOAP, and to describe them using WSDL.
Once you've made beans of all the classes that need to cross the wire, you
will also need to register those types. On the server-side you'd do this
using the <beanmapping> element in the WSDD, while deploying. If using
generated stubs, you don't need to do anything to register those types on
the client side, but you would need to register additional type mappings if
using dynamic invocation as you appear to be trying to do.
Hope this [is accurate and] helps...

-----Original Message-----
From: Kai Unewisse []
Sent: Wednesday, March 26, 2003 10:53 AM
Subject: DII : JavaBeans & Vector mapping ?

Hi all,

Please enlighten me a little bit ;-)

I get an "Error : (500)Internal Server Error" when I access my
server-WS-Method :

public Methods login(String AccountNumber, String pw) {

My Client accesses this by :

Methods obj = (Methods) call.invoke(new Object[] { "0123456789", "ABC" });

I use "special" JavaBeans,which holds a java.util.Vector filled with other
custom objects.
My JavaBeans are accessed via Reflection and therefore there is no need for

public class Methods {
	public Vector methodDescriptions;

public class MethodDescriptions{
	public String name;
	public String returnvalue;

 Usually a Beans has no public attributes, so I changed the code: Even after
adding get/set for all attributes no change is visible.

What is the meaning of 500 Internal Error at WS ?

Is it still possible to use the BeanSerailization or do I have to write my
own Serializer/Deserializer ?

View raw message