You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Luoh Ren-Shan <lu...@iii.org.tw> on 2002/06/20 10:48:07 UTC
How to get the returning message in plain XML?
Hi,
In the "Addr" example, the return type of "getAddressFromName"
is a complex type.
<xsd:complexType name="address">
<xsd:all>
<xsd:element name="streetNum" type="xsd:int"/>
.....
</xsd:all>
</xsd:complexType>
Using TCPmon, I found the encoded message looks like this:
<address href="#id0"/>
.....
<multiRef id="id0" ...>
<streetNum xsi:type="xsd:int">1</streetNum>
<streetName xsi:type="xsd:string">University Drive</streetName>
.....
My question is, how can I get the returning message in
a form looks like "<address><streetNum>1</streetNum>.."
without changing the server config?
Do I have to deserialize it from the "Address" class?
(XML -> Object -> XML)
Thank you.
Luoh Ren-Shan
Bean Serialization/Deserialization without constructing the whole message?
Posted by Luoh Ren-Shan <lu...@iii.org.tw>.
Hi,
Is there an example to serialize/deserialize between
XML and beans generated by WSDL2Java
without the enclosing SOAP envelope?
The "samples/encoding/TestSer.java" sample is
dealing with the whole SOAP message.
Thank you.
Luoh Ren-Shan
Re: How to get the returning message in plain XML?
Posted by Brian Ewins <Br...@btinternet.com>.
Chris Haddad wrote:
> Luoh - it might be..... You need to post the <type> definition in the
> WSDL for typens:address for us to validate your premise.
>
> /Chris
>
>
> -----Original Message-----
> From: Luoh Ren-Shan [mailto:luors@iii.org.tw]
> Sent: Friday, June 21, 2002 3:49 AM
> To: axis-user@xml.apache.org
> Subject: Re: How to get the returning message in plain XML?
>
> If I get the following WSDL,
> <message name="AddEntryRequest">
> <part name="name" type="xsd:string"/>
> <part name="address" type="typens:address"/>
> </message>
> <operation name="addEntry">
> <input message="tns:AddEntryRequest"/>
> </operation>
> is it possible to generate Java code like this?
>
> public void addEntry(String name, Document address)
>
Have you tried
<part name="address" type="typens:Element"
xmlns:typens="http://xml.apache.org/xml-soap"/>
This is the type qname associated with the DOM Element serializer. It
makes no sense to ask for a Document rather than an Element to be
returned as the part will be a fragment of a doc (ie the whole SOAP
message), not a whole document.
-Baz
RE: How to get the returning message in plain XML?
Posted by Chris Haddad <ch...@cobia.net>.
Luoh - it might be..... You need to post the <type> definition in the
WSDL for typens:address for us to validate your premise.
/Chris
-----Original Message-----
From: Luoh Ren-Shan [mailto:luors@iii.org.tw]
Sent: Friday, June 21, 2002 3:49 AM
To: axis-user@xml.apache.org
Subject: Re: How to get the returning message in plain XML?
If I get the following WSDL,
<message name="AddEntryRequest">
<part name="name" type="xsd:string"/>
<part name="address" type="typens:address"/>
</message>
<operation name="addEntry">
<input message="tns:AddEntryRequest"/>
</operation>
is it possible to generate Java code like this?
public void addEntry(String name, Document address)
Thank you.
Luoh Ren-Shan
Re: How to get the returning message in plain XML?
Posted by Luoh Ren-Shan <lu...@iii.org.tw>.
If I get the following WSDL,
<message name="AddEntryRequest">
<part name="name" type="xsd:string"/>
<part name="address" type="typens:address"/>
</message>
<operation name="addEntry">
<input message="tns:AddEntryRequest"/>
</operation>
is it possible to generate Java code like this?
public void addEntry(String name, Document address)
Thank you.
Luoh Ren-Shan