|
Stefan,
I have some experience with Apache SOAP on server side and .NET client (MS
SOAP Toolkit)
If using the low level API there is no issue (see http://www.soapuser.com/client4.html for
instructions)
But there is no wsdl file involved in that case
If using the high level API then a wsdl file is necessary and it is true
that complex types can be difficult
I have managed to make everything work for simple types, arrays of simple
types, complex types (structs).
But as soon as you try to send an array of complex types as a parameter or
return type then things start to break down
here are the highlights of the highlevelAPI/wsdl related interop issues I
have identified/solved...
1. ensure that your WSDL file specifies UTF-8 encoding - ie. first line should be : <?xml version="1.0" encoding="UTF-8"?> rather than UTF-16 as you see in some wsdl file examples 2. the classic obstacle to ms-apache interop is the xsi:type problem. The MS high level API does not put xsi:type into the request. Apache soap 2.1 (or later) has the functionality to get around this (so you cannot use apache soap 2.0) - the way to exploit this is described in Sanjiva's change comments available here (you basically need to make some additional entries in your deployment
descriptor for the
primitives and deploy) 3. Apache will put "Content-Type: text/xml; charset=utf-8" in the response packet. If you use MS toolkit prior to 2.0 beta 2 then it will only want to see "Content-Type: text/xml" - a hack into the apache code is
required
- note this was a Microsoft acknowledged bug and was
fixed in
MS SOAP Toolkit 2.0 beta 2 so ensure youhave that version at
least.
Note that you will be able to pass primitives and user-defined types back
and
forth. Although for user-defined types you will need to define VB classes (sort of beans) for each type and a wsml file describing your mapping from the types as mentioned in the soap message to your VB beans. This is OK for flat beans (ie. ones that are composed only of primitive types). If you have non-flat beans then the beans become a piece of work in themselves since, as described in the toolkit help, you must define extra classes with special methods (ISoapTypeMapper_write ISoapTypeMapper_read) which handle the soap envelope writing and reading for the nested beans using the low level API and the DOM parsing functionality respectively - so using the high level API, you can't really get away from the low level API / DOM parsing complexity anyway. AFAIK arrays of beans are not supported If you do manage to get that working please let me know...
regards,
Nicholas Quaine Visit http://www.soapuser.com/
|
- Complex datatypes and interoperability Stefan Henke
- Nicholas Quaine
