I get the same bug when switching to document/literal. I actually get an
"empty" array returned each time, whether it is a zero-count array or
not. Again, only with a .net client. I hope that is something they will
fix for the future.
 
Not sure if ever making the rpc/encoded interoperable with .NET will
ever be fixed, but it would be nice.
 
 

________________________________

From: Jay Glanville [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 20, 2005 1:41 PM
To: [email protected]
Subject: RE: Axis WSDL arrays read by .NET client


You know, there are times when document-literal isn't an option.  See
bug 2279 (http://issues.apache.org/jira/browse/AXIS-2279).
 
Is there another solution to this problem without having to change the
encoding format?
 
JDG


________________________________

        From: Ron Reynolds [mailto:[EMAIL PROTECTED] 
        Sent: Tuesday, December 20, 2005 12:37 AM
        To: [email protected]
        Subject: Re: Axis WSDL arrays read by .NET client
        
        
        step 1 - figure out if you can get away from SOAP-encoding and
switch to document-literal - SOAP-encoding is the root of much evil in
web-service interop.
        step 2 - if you can't get away from SOAP-encoding... see step 1.
:-/

                ----- Original Message ----- 
                From: Luciano Belotto <mailto:[EMAIL PROTECTED]>  
                To: [email protected] 
                Sent: Monday, December 19, 2005 8:58 PM
                Subject: Axis WSDL arrays read by .NET client


                Hello,
                
                Using Java Apache Axis 1.3 final.
                
                Read many postings on this, but still don't get it... My
issue is in regards to arrays defined on my Axis-generated WSDL's being
consumed by .net.
                
                Listed far below in an XSD I'm using. It contains an
element called AC_In_Out_Service_Outgoing_Element. I generate this XSD
into java classes, write a function to return an array (using []) of
AC_In_Out_Service_Outgoing_Element. I then publish the method to a WS
with Axis and Axis generates that part of it like so:
                
                complexType
name="ArrayOfAC_In_Out_Service_Outgoing_Element">
                -
                        <complexContent>
                -
                        <restriction base="soapenc:Array">
                <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:AC_In_Out_Service_Outgoing_Element[]"/>
                </restriction>
                </complexContent>
                </complexType>
                
                A .net client consumes that file. However, the element
inside contains an unbounded set of elements called
AC_In_Out_Service_Lines_Defect, which has inside
AC_In_Out_Service_Line_Defect_Type which is an array of
AC_In_Out_Service_Line_Defect. The WSDL for it comes out as:
                
                <complexType name="AC_In_Out_Service_Line_Defect_Type">
                -
                        <sequence>
                <element maxOccurs="unbounded"
name="AC_In_Out_Service_Line_Defect" nillable="true"
type="tns1:AC_In_Out_Service_Line_Defect"/>
                <element name="AC_In_Out_Service_Line_DefectCount"
type="xsd:int"/>
                <element name="valid" type="xsd:boolean"/>
                </sequence>
                </complexType>
                
                
                Why the difference in how Axis generates the arrays? The
problem is, a .net client says there is an error on this part... It says
it is trying to assign a single AC_In_Out_Service_Line_Defect object to
an arrary AC_In_Out_Service_Line_Defect[].
                
                If I generate the client with java/axis, the client-side
proxies look the same. But with java/axis client, it consumes fine. This
problem is only on .NET client. But why?
                
                Below is the
Tech_Records_AC_In_Out_Service_Notification.xsd.XSD:
                
                
                
                
                
                
                <?xml version="1.0" encoding="UTF-8"?>
                <!--
                TRAX Interface
Tech_Records_AC_In_Out_Service_Notification Version 0.0.2
                Last updated: 2005-12-08T15:45:00
                
                Revision History:
                
                Version 0.0.2
                =============
                Added element <initial_Cause> to WO line and Defect
line.
                
                
                Version 0.0.1
                =============
                Initial releases to customers
                
                -->
                <schema xmlns="http://www.w3.org/2001/XMLSchema";
        
targetNamespace="http://trax.aero/xml/Tech_Records_AC_In_Out_Service_Not
ification.xsd"
        
xmlns:traxSys="http://trax.aero/xml/TraxSystem.xsd";
        
xmlns:AC_In_Out_Service_Notification="http://trax.aero/xml/Tech_Records_
AC_In_Out_Service_Notification.xsd">
                               
                        <import
namespace="http://trax.aero/xml/TraxSystem.xsd";
                                schemaLocation="TraxSystem.xsd">
                        </import>
                
                        <complexType
name="AC_In_Out_Service_Outgoing_Type">
                                <sequence minOccurs="1" maxOccurs="1">
                                <element name="out_Service_No"
type="AC_In_Out_Service_Notification:out_Service_No" minOccurs="0"
maxOccurs="1">
                                        <annotation>
        
<documentation></documentation>
                                        </annotation>
                                </element>
                                <element name="ac"
type="AC_In_Out_Service_Notification:AC" minOccurs="0" maxOccurs="1">
                                        <annotation>
        
<documentation></documentation>
                                        </annotation>
                                </element>
                                <element name="out_Of_Service_Station"
type="AC_In_Out_Service_Notification:out_Of_Service_Station"
minOccurs="0" maxOccurs="1">
                                        <annotation>
        
<documentation></documentation>
                                        </annotation>
                                </element>
                                <element name="modified_By"
type="traxSys:modified_By" minOccurs="0" maxOccurs="1">
                                        <annotation>
        
<documentation></documentation>
                                        </annotation>
                                </element>
                                <element name="modified_date"
type="traxSys:modified_Date" minOccurs="0" maxOccurs="1"></element>
                                <element
name="AC_In_Out_Service_Lines_WO"
        
type="AC_In_Out_Service_Notification:AC_In_Out_Service_Line_WO_Type"
                                        minOccurs="0" maxOccurs="1">
                                </element>
                                <element
name="AC_In_Out_Service_Lines_Defect"
type="AC_In_Out_Service_Notification:AC_In_Out_Service_Line_Defect_Type"
minOccurs="0" maxOccurs="1"></element>
                                <element name="flight_status"
type="AC_In_Out_Service_Notification:flight_Status" minOccurs="0"
maxOccurs="1"></element>
                                <element
name="ac_Schedule_Out_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                <element
name="ac_Out_Of_Svr_Advised_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                <element
name="ac_Schedule_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                <element
name="ac_Actual_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                </sequence>
                                </complexType>
                       
                        <simpleType name="out_Service_No">
                        <annotation>
                                <documentation>Control number for the
out of service. This is the unique identifier for an A/C in or out of
service notifcation.
                </documentation>
                        </annotation>
                        <restriction base="integer">
                                        <totalDigits
value="8"></totalDigits>
                        </restriction>
                        </simpleType>  
                       
                        <simpleType name="AC">
                        <annotation>
                                <documentation>Aircraft tail number or
registration of aircraft.</documentation>
                        </annotation>
                        <restriction base="traxSys:varcharTwoTen">
                                        <minLength
value="1"></minLength>
                                        <maxLength
value="10"></maxLength>
                                </restriction>
                        </simpleType>
                       
                        <simpleType name="flight_Status">
                        <annotation>
                                <documentation>Indicator as to whether
an item is causing the A/C to be in or out of service. Note that if at
least one item indicates the A/C should be out of service, then it
should be treated as being out of service.
                </documentation>
                        </annotation>
                        <restriction base="traxSys:varcharTwoTen">
                                        <minLength
value="1"></minLength>
                                        <maxLength
value="10"></maxLength>
                                </restriction>
                        </simpleType>  
                       
                        <simpleType name="out_Of_Service_Station">
                        <annotation>
                                <documentation>Station where aircraft
was placed in or out of service.
                </documentation>
                        </annotation>
                        <restriction base="traxSys:varcharTwoTen">

                                        <maxLength
value="10"></maxLength>
                                </restriction>
                        </simpleType>
                       
                        <simpleType name="defect_Type">
                        <annotation>
                                <documentation>STC: DEFECTTYPE
                STC Description: If aircraft is out of service due to a
defect, this is         the type of defect.
                </documentation>
                        </annotation>
                        <restriction base="string">                    
                                        <maxLength
value="8"></maxLength>
                                </restriction>
                        </simpleType>
                       
                        <simpleType name="defect">
                        <annotation>
                                <documentation> If aircraft is out of
service due to a defect, this is the defect number.
                </documentation>
                        </annotation>
                        <restriction base="string">                    
                                        <maxLength
value="12"></maxLength>
                                </restriction>
                        </simpleType>
                       
                        <simpleType name="defect_Item">
                        <annotation>
                                <documentation> If aircraft is out of
service due to a defect, this is the item number of the defect  that
caused aircraft to go out of service.</documentation>
                        </annotation>
                        <restriction base="integer">
                                        <totalDigits value
="12"></totalDigits>
                                </restriction>
                        </simpleType>
                       
                        <simpleType name="WO">
                                <annotation>
                                        <documentation>Work Order
Number.</documentation>
                                </annotation>
                                <restriction base="integer">
                                        <totalDigits
value="8"></totalDigits>
                                </restriction>
                        </simpleType>
                
                        <simpleType name="modified_By">
                                <annotation>
                                        <documentation>
                                                The user stamp of the
last save of the record.
                                        </documentation>
                                </annotation>
                                <restriction
base="traxSys:varcharTwoTen">
                                        <maxLength
value="10"></maxLength>
                                </restriction>
                        </simpleType>
                
                        <simpleType name="hold_Boarding">
                                <annotation>
                                        <documentation>
                                                If boarding should be
stopped. Possible Values: Y N
                                        </documentation>
                                </annotation>
                                <restriction
base="traxSys:varcharTwoTen">
                                        <maxLength
value="10"></maxLength>
                                </restriction>
                        </simpleType>
                
                        <element
name="AC_In_Out_Service_Outgoing_Element"
        
type="AC_In_Out_Service_Notification:AC_In_Out_Service_Outgoing_Type">
                        </element>
                
                        <complexType
name="AC_In_Out_Service_Line_WO_Type">
                                <sequence minOccurs="0" maxOccurs="1">
                                        <element
name="AC_In_Out_Service_Line_WO" minOccurs="0" maxOccurs="unbounded">
                                                <complexType>
                                                        <sequence
minOccurs="0" maxOccurs="1">
                                                                <element
name="wo" type="AC_In_Out_Service_Notification:WO" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="flight_Status" type="AC_In_Out_Service_Notification:flight_Status"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="hold_Boarding" type="AC_In_Out_Service_Notification:hold_Boarding"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="ac_Schedule_Out_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Out_Of_Svr_Advised_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Schedule_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Actual_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="initial_Cause" type="boolean" minOccurs="0" maxOccurs="1">
        
<annotation>
        
<documentation>This element will be set to true if this item was the one
that prompted the creation of the ac_in_out_service notification.
                Since this is a WO it is assumed that the AC going out
of service was scheduled.</documentation>
        
</annotation>
        
</element>
                                                        </sequence>
                                                </complexType>
                                        </element>
                                </sequence>
                        </complexType>
                
                        <complexType
name="AC_In_Out_Service_Line_Defect_Type">
                                <sequence minOccurs="0" maxOccurs="1">
                                        <element
name="AC_In_Out_Service_Line_Defect" minOccurs="0"
maxOccurs="unbounded">
                                                <complexType>
                                                        <sequence
minOccurs="0" maxOccurs="1">
                                                                <element
name="defect" type="AC_In_Out_Service_Notification:defect" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="defect_Type" type="AC_In_Out_Service_Notification:defect_Type"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="defect_Item" type="AC_In_Out_Service_Notification:defect_Item"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="flight_Status" type="AC_In_Out_Service_Notification:flight_Status"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="hold_Boarding" type="AC_In_Out_Service_Notification:hold_Boarding"
minOccurs="0" maxOccurs="1"></element>
                                                                <element
name="ac_Schedule_Out_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Out_Of_Svr_Advised_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Schedule_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="ac_Actual_In_Service_Date" type="dateTime" minOccurs="0"
maxOccurs="1"></element>
                                                                <element
name="initial_Cause" type="boolean" minOccurs="0" maxOccurs="1">
        
<annotation>
        
<documentation>This element will be set to true if this item was the one
that prompted the creation of the ac_in_out_service notification.
                Since this is a defect it is assumed that the AC going
out of service was unscheduled.</documentation>
        
</annotation>
        
</element>
                                                        </sequence>
                                                </complexType>
                                        </element>
                                </sequence>
                        </complexType>
                
                        <complexType
name="AC_In_Out_Service_Query_Type">
                                <sequence>
                                        <element
name="get_OutOfService_Pending_Records" type="boolean" minOccurs="0"
maxOccurs="1">
                                                <annotation>
        
<documentation>Set this parameter to true to only retrieve the records
that are currently out of service or pending out of service status.
                </documentation>
                                                </annotation>
                                        </element>
                                </sequence>
                        </complexType>
                
                        <element name="AC_In_Out_Service_Query_Element"
type="AC_In_Out_Service_Notification:AC_In_Out_Service_Query_Type"></ele
ment>
                
                </schema>
                
                
                



Reply via email to