You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "Tudor, Liviu @Cimage" <Li...@cimage.com> on 2002/07/31 15:26:21 UTC

Problem with .NET arrays (no xsi:type and no namespace)

Hi everyone!
 
    I'm working on a set of web services clients in Java (using WebSphere --
which is based on Apache SOAP) to consume some services in .NET. It nearly
works honkey-dorey but, I'm faced with the following problem:
- due to the fact that .NET sends items without namespace/xsi:type, I had to
register a serializer as follows:

 



ArraySerializer ser_17 = new ArraySerializer();
ArraySerializer deSer_17 = new ArraySerializer();
smr.mapTypes( Constants.NS_URI_SOAP_ENC,new QName(null,
"arguments"),CimageArgumentContentType[].class, ser_17, deSer_17 );
 

(Note that this problems occurs only when dealing with arrays!!!)
This ensures that my arguments tag gets deserialized correctly into an array
of CimageArgumentContentType. The arguments tag is part of a compound type
(CimageSearchDetailsContentType) and it gets deserialized now correctly.
However,  if I try to send out a CimageSearchDetailsContentType (which
includes an arguments member as an array oc CimageArgumentContentType), I
get the following tag for arguments in the XML request sent to my .NET
services:
 

<arguments xmlns:ns3="" xsi:type="ns3:arguments" xmlns:ns4="
<http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"
ns4:arrayType="ns2:CimageArgument[]" xsi:null="true"/>

Note that this tag has 2 namespaces (!!!) and 2 xsi:type declarations! I
cannot work around this whatsoever -- trying to provide a null serializer
gets the same result! If I eliminate the above lines, then I get the
standard error about "no deserializer found to deserialize a
':arguments'..." 
    Has anybody got any idea why arguments gets assigned 2 namespaces and 2
types and how or what to do to eliminate this ?
 
    Thank you!
 
                Liv
 

   

Liviu Tudor <?XML:NAMESPACE PREFIX = O />

Cimage Novasoft Limited
: www.cimagenovasoft.com <http://www.cimagenovasoft.com/> 
+ liviut@cimage.com <ma...@cimage.com> 
(Fax: +44 (0)1344 767701
(Direct Line: +44 (0)1344 767759 
*Centennial Court, Easthampstead Road, Bracknell, BERKS, RG12 1JZ 

Sun Java Certified Programmer	

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg." Bjarne Stroustrup