Mitch, There are tests in test/wsdl/* that test beans inside other beans. Take a look and see how they are working.
It sounds like you are on the right track that the type mapping isn't getting recognized. Did you take a look at the XML on the wire (use org.apache.axis.utils.tcpmon) to make sure that the QName of the data type is the same as the one you registered? Does the xsi:type attribute of your data match what you expect? Hope this helps you track down your problem. -- Tom Jordahl Macromedia Server Development -----Original Message----- From: Mitch Gitman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 8:44 PM To: [EMAIL PROTECTED] Subject: deserializing nested complex types I had come to realize (perhaps mistakenly) that I needed to use a custom serializer/deserializer for a complex type that had another JavaBean complex type as an element inside it. You see, when my test Axis client was querying the server, it was generating a fault with a stackTrace that began: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:187) So I proceeded to replace BeanSerializer/BeanDeserializer with custom serialization. Here's the updated typeMapping in server-config.wsdd: <typeMapping deserializer="foo.bar.axis.SomethingDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns40:Something" serializer="foo.bar.axis.SomethingSerializerFactory" type="java:foo.bar.Something" xmlns:ns40="urn:bar.foo" /> As you can see, besides the SomethingSerializer and SomethingDeserializer classes, there is a factory class for each. Now for a simple test, I have my client call: Something addSomething(String data) The call appears to have been put together correctly on the client side. That includes registering the type mapping. The call reaches the server and, as far as I can tell, server execution proceeds as follows: 1. Calls the SomethingDeserializerFactory constructor. 2. Throws the same exception I encountered earlier with the default serialization. "SimpleDeserializer encountered a child element,..." This fault occurs BEFORE: * The factory can return a new SomethingDeserializer through its getDeserializerAs(String mechanismType). * My application code -- namely addSomething() itself -- can be reached. Perhaps someone can offer a working example of how to nest inside a complex type what is essentially another complex type.
