title: SOAP Object Serialization in Java
body: <p>I am using JBoss AS 7.1.1 and JAX-WS 2.0.</p>
  
  <p>In my application, I need to pass a <code>Map&lt;String, Map&lt;String, String&gt;&gt;</code> to a service. I made a custom complex type which extends TreeMap. While debugging, I confirmed that the object I was trying to sent was filled with data, but the received object was empty. From other posts, it seems this is because does not play well with SOAP serialization. Is there some way I can implement SOAP XML serialization for my object without changing types, making a ton of fields, etc? I want to be able to the following:</p>
  
  <pre><code>public String doSoapXmlSerialization() {
      // code
  }
  public void doSoapXmlDeserialization() {
      // code
  }
  </code></pre>
  
  <p>It would be a very simple matter for me to write serialization and deserialization methods. I can also imagine writing some kind of XSD file to allow the SOAP methods to do my work for me.  I have not been able to find any guides for this. By what mechanism does JAX-WS try to serialize objects?.</p>