axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Jordahl (JIRA)" <>
Subject [jira] Commented: (AXIS-1308) Axis 1.2 beta and .NET 1.1: Problem with arrays
Date Fri, 03 Dec 2004 16:43:34 GMT
     [ ]
Tom Jordahl commented on AXIS-1308:

Are you folks using WSDL from .NET web services?  If so, the changes I made to the ArraySerializer
to respect the arrayType specified in the WSDL should fix this.  If you are *not* using WSDL
(i.e. Thomas), Axis defaults to the SOAP encoded types (soapenc:string) in 1.2 because these
type mappings are favored over the XML Schmea types now when using SOAP encoding.  This is
arguably correct.  If a implementation supports soap encoding, it shold support the soap encoded
types.  .NET doesn't, which is bad.  What is good is that the WSDL that .NET produces explicitly
says which type (xsd:string) it wants the array elements to be.  It obviously can't do that
on the client side.  Perhaps we should emit WSDL that specifies the arrayType

So, what is the solution?  Given the way DefaultTypeMappingImpl works today, the options range
from bad (special case arrays maybe?) to really bad (rewrite it).  The problem is the the
SOAP encoded types are defined first, then the XSD types are in the deligate.  We could change
this back so that they are defined in the Default mapping.  I am open to thoughts, ideas and

> Axis 1.2 beta and .NET 1.1: Problem with arrays
> -----------------------------------------------
>          Key: AXIS-1308
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2 Beta
>  Environment: Windows 2000 server, JDK 1.4.2_03, .NET 1.1, Axis 1.2 Beta
>     Reporter: Thomas Boerkel
>      Fix For: 1.2
>  Attachments: SoapTest_11RC2.wsdl, SoapTest_12Beta.wsdl
> I was able to return an array from an Axis 1.1 RC2 server to a .NET 1.1 client without
> With Axis 1.2 beta, the .NET client throws an exception:
> System.InvalidOperationException: There is an error in XMLdocument (5, 5). ---> System.InvalidOperationException:
The specified type as not recognized: name='string', namespace='',
at <arrayTestReturn xmlns=''>.
> I don't know, if this is a bug in Axis or .NET, but I think the interop is very important,
so even a workaround in Axis for a .NET bug should be considered, until MS fixes their bug.
> This is the response XML from Axis 1.1 RC2:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="" xmlns:xsd=""
>  <soapenv:Body>
>   <ns1:arrayTestResponse soapenv:encodingStyle=""
>    <arrayTestReturn xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[3]" xmlns:ns2=""
>     <item>5</item>
>     <item>6</item>
>     <item>7</item>
>    </arrayTestReturn>
>   </ns1:arrayTestResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> And this from Axis 1.2 beta:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="" xmlns:xsd=""
>  <soapenv:Body>
>   <ns1:arrayTestResponse soapenv:encodingStyle=""
>    <arrayTestReturn soapenc:arrayType="soapenc:string[3]" xsi:type="soapenc:Array"
>     <item xsi:type="soapenc:string">5</item>
>     <item xsi:type="soapenc:string">6</item>
>     <item xsi:type="soapenc:string">7</item>
>    </arrayTestReturn>
>   </ns1:arrayTestResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> This is the Java method signature:
>   public String[] arrayTest(int[] numbers)
> We do not use deployment and we do not use Tomcat, but something like this:
>       axisServer = new AxisServer(new NullProvider());
>       axisServer.init();
>       msg = new Message(xml);
>       msgContext = new MessageContext(axisServer);
>       msgContext.setRequestMessage(msg);
>       service = getService(completeName);
>       msgContext.setService(service);
>       axisServer.invoke(msgContext);
>       msg = msgContext.getResponseMessage();
>       xml= msg.getSOAPPartAsString();
> If I use
> service.setStyle(Style.WRAPPED)
> service.setUse(Use.LITERAL)
> Then this is the response from Axis:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="" xmlns:xsd=""
>  <soapenv:Body>
>   <arrayTestResponse xmlns="">
>    <arrayTestReturn>5</arrayTestReturn>
>    <arrayTestReturn>6</arrayTestReturn>
>    <arrayTestReturn>7</arrayTestReturn>
>   </arrayTestResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> and .NET returns NULL to the client code.
> Attaching Axis 1.1 RC2 WSDL and 1.2 Beta WSDL (almost identical, besides the namespace

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message