I'm passing a complex type from a C# client to an Axis server. The client
has been built from the Axis web service's WSDL. The type corresponds to a
class -- call it NodeBranch -- whose parentage is as follows:
NodeBranch extends Node (abstract) extends PrimaryData extends BasicData
(abstract)
At the point the C# client is sending the request, the object contains a
couple String fields from the abstract base class, BasicData. The fields
are key and name. The object appears to be correctly defined in the SOAP
request (shown below).
From debugging within my code, here's as far as I can deconstruct what
Axis is doing when it receives this message:
1. It calls the default constructor for NodeBranch. GOOD.
2. It does NOT call the setName() or setKey() methods. BAD.
3. It calls my server class that implements my interface upon which the
WSDL is based (GOOD):
synchronized public void setNodeBranch(NodeBranch node) throws
BarException
4. The node is not null (GOOD), but naturally its getName() and getKey()
return null. BAD.
So why is Axis missing these fields?
Here's the request the C# client is sending:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:bar.foo" xmlns:types="urn:bar.foo/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
____<tns:setNodeBranch>
________<in0 href="#id1" />
____</tns:setNodeBranch>
____<tns:NodeBranch id="id1" xsi:type="tns:NodeBranch">
________<key xsi:type="xsd:string">0000000002</key>
________<name xsi:type="xsd:string">Some Name</name>
____</tns:NodeBranch>
</soap:Body>
</soap:Envelope>
In the WSDL, the type extensions (i.e. NodeBranch extends Node) seem to be
defined correctly, and I've encountered no other problems with the
extensions. So I don't think that's the source of the problem. Nonetheless,
here's the definition of the abstract base class in the WSDL.
<complexType abstract="true" name="BasicData">
____<sequence>
________<element name="baseTag" nillable="true" type="xsd:string" />
________<element name="key" nillable="true" type="xsd:string" />
________<element name="name" nillable="true" type="xsd:string" />
____</sequence>
</complexType>
- .so files for AXIS Robert Morse
- sending complex type -- Axis misses fields Mitch Gitman
- Re: .so files for AXIS Mitch Gitman
- Re: .so files for AXIS Joe
- RE: .so files for AXIS Keith Hatton
