This is from the user guide.  You need to add beanMapping tag in your
deployment descriptor for this object.

This is from the user guide
Encoding Your Beans - the BeanSerializer
Axis includes the ability to serialize/deserialize, without writing any
code, arbitrary Java classes which follow the standard JavaBean pattern
of get/set accessors. All you need to do is tell Axis which Java classes
map to which XML Schema types. Configuring a bean mapping looks like
this:

<beanMapping qname="ns:local" xmlns:ns="someNamespace"
    languageSpecificType="java:my.java.thingy"/>The <beanMapping> tag
maps a Java class (presumably a bean) to an XML QName. You'll note that
it has two important attributes, qname and languageSpecificType. So in
this case, we'd be mapping the "my.java.thingy" class to the XML QName
[someNamespace]:[local].

Let's take a look at how this works in practice. Go look at
samples/userguide/example5/BeanService.java. The key thing to notice is
that the argument to the service method is an Order object. Since Order
is not a basic type which Axis understands by default, trying to run
this service without a type mapping will result in a fault. (If you want
to try this for yourself, you can use the bad-deploy.wsdd file in the
example5 directory.) But if we put a beanMapping into our deployment,
all will be well. Here's how to run this example (from the example5
directory):

% java org.apache.axis.client.AdminClient -llocal:///AdminService
deploy.wsdd
<Admin>Done processing</Admin>

% java samples.userguide.example5.Client -llocal://
Hi, Glen Daniels!

You seem to have ordered the following:

1 of item : mp3jukebox
4 of item : 1600mahBattery

If this had been a real order processing system, we'd probably have
charged
you about now.
%


-----Original Message-----
From: Indra Syafruddin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 07, 2005 8:43 PM
To: [email protected]
Subject: Newbie Question

Hello, I am new in using Axis
I have one newbie question, can Axis return Object?

I tried to make web services that returns Vector (with String value),
it runs ok.
But when I put Object in the Vector and return it, there's always error
:

AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXParseException: Premature end of file.
...

do anyone know how to solve the problem?

plus, do anyone know any axis book or tutorial I can download?

thanks

Reply via email to