Re: Complex JavaType in a Request to Axis
[email protected] Tue, 8 Jul 2003 16:22:40 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
You can create your own marshaller or a KvmSerializable object.
Another option that I tend to use more frequently is to "encode yourself"
your objects into SoapObjects.
Ex :
...
// SoapObject user = new
SoapObject("namespace-of-your-xml-type","name-of-your-xml-type")
SoapOject user = new SoapObject("urn:mycompamy.com", "User");
user.addProperty("name", aUser.getName());
user.addProperty("password", aUser.getPassword());
user.addProperty("email", aUser.getEmail());
SoapObject request = new SoapObject("service-namespace", "service-name");
request.addProperty("user", user);
...
Hope it helps,
----------------------------------------------------------------------------
Sebastien Petrucci
Java Technology Consultant - Altran Europe
Philips Remote Control Systems
Interleuvenlaan 74-76, B-3001 Leuven (Belgium)
M +32(0)497502521 T +32(0)16394 598
----------------------------------------------------------------------------
<[email protected]>
Sent by:
[email protected]
2003-07-08 15:56
Please respond to ksoap
To: <[email protected]>
cc: (bcc: Sebastien Petrucci/LEU/COMP/PHILIPS)
Subject: Ksoap: Complex JavaType in a Request to Axis
Classification:
Hi,
i'm trying to send a complex JavaType to an Axis Web Service. But I have
no idea how this works...
For example the complex javaType "User" with the String-elements "name",
"password", "email".
Can anybody give me an example?
Thanx a lot!
------------------------------------------------------------------------------------
Frank Löber
Diplomand
mailto: [email protected]
Avinci - The Know-How Company
Insterburger Straße 7
60487 Frankfurt am Main
http://www.avinci.biz
------------------------------------------------------------------------------------
_______________________________________________
Ksoap mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/ksoap