Hi!
If anyone is still reading this thread, I just thought I would tell you 
that I have figured
out why I get the "Bad Types" exception. It turns out that even if the 
WSDL says
<soap:body use="literal"/> Axis still tries to interpret any type 
information present
in the soap body.

My soap response looks like this:

  <AllConfigurationsResponse>
   <ConfigurationArray xsi:type="SOAP-ENC:arrayType" 
SOAP-ENC:arrayType="xsd:string[2]">
    <configuration xsi:type="xsd:string">
      <![CDATA[Configuration 1]]>
    </configuration>
    <configuration xsi:type="xsd:string">
      <![CDATA[Configuration 2]]>
    </configuration>
   </ConfigurationArray>
  </AllConfigurationsResponse>

And this makes Axis throw up "Bad Types".
If I remove the type info from the soap response so it looks like this 
instead:

  <AllConfigurationsResponse>
   <ConfigurationArray>
    <configuration>
      <![CDATA[Configuration 1]]>
    </configuration>
    <configuration>
      <![CDATA[Configuration 2]]>
    </configuration>
   </ConfigurationArray>
  </AllConfigurationsResponse>

It works perfectly.

This means that I cannot use literal mode if the soap response is encoded.
Both .NET implementations ignores any type information in the soap response
in literal mode, so this is only a problem with Axis.

So why don't I use encoded mode when the soap response is encoded ?
That was of course the first thing I tried, but neither Axis nor the ASP 
.NET
soap implementation handles encoded mode very well. The ATL .NET soap
implementation can handle encoded mode, which makes .NET incompatible
with itself. :-)
With Axis the problem is that WSDL2Java does not generate correct
deserializing code for arrays in encoded mode.

So why don't I remove the type information from the soap response?
Because that will break backward compatibility with Apache SOAP.
Apache SOAP requires type information to be present, remember?

Hope this post provokes some response. I am still hoping that I am doing
something wrong! Can webservice interoperability really be this poor?
I mean, the whole point of webservices is to make it possible to communicate
with different types of systems, otherwise we would still use COM and 
CORBA.
Right?

 /
/ Daniel


Reply via email to