I haven't tried it yet myself, but in 1.1beta (may have been there before,
1.1beta is the first release I've really looked into the code for) there is
a Serializer and Deserializer for Element:

axis-1_1beta\src\org\apache\axis\encoding\ser\
  ElementDeserializer.java
  ElementDeserializerFactory.java
  ElementSerializer.java
  ElementSerializerFactory.java

Again, I haven't tried it myself, but reading through the above code and the
SerializerContextImpl I can't see how the Element serializer wouldn't build
an incorrect SOAP envelope (one extra element level in the XML?) if you used
it with an RPC-encoded message (eg, sent the SOAP InteropRound2
<SOAPStruct><varString>...</SOAPStruct> parameter as an Element to
echoStruct() as opposed to a Java object via BeanSerializer).  So, I'm not
sure whether that serializer was only intended for doc/literal or whether
it's also useful for RPC-encoded.

..Mike


-----Original Message-----
From: Josema Alonso [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 4:33 AM
To: Axis-User
Subject: how to deserializing a DOM Element?


Dear all,

I'm a newbie trying to make a web service work. I have a method like this:

public Class Recordings {
 public Element getEquipmentTypes() {
   Element resultElement;
   ...
   ...
   return resultElement;
 }
...
}

The resultElement is built ok. I can deploy the service and make it work.
I have tried to make a SOAP request to this service. It works ok from Cocoon
using XSP.
I have also tried from Websphere Developer and .Net and I've found an error:
it cannot foud a deserializer for the Element. The relevant part of the WSDL
file is:
<wsdl:types>
  <schema targetNamespace="http://xml.apache.org/xml-soap";
          xmlns="http://www.w3.org/2001/XMLSchema";>
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
    <element name="Element" nillable="true" type="apachesoap:Element"/>
  </schema>
</wsdl:types>
<wsdl:message name="getEquipmentTypesResponse">
  <wsdl:part name="getEquipmentTypesReturn" type="apachesoap:Element"/>
</wsdl:message>

I have searched the archives and tried a couple solutiones I found there
with no luck. Am I missing something?

Can anybody help me, please?

ps: since I started with web services I can't beliebe sending XML in a SOAP
envelope is the most difficult thing to achieve...

Reply via email to