I'll change Java2WSDL to use a sequence group.

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                       
                                            
                      Dave Dunkin                                                      
                                            
                      <DaveDu@Attachmat        To:       "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                   
                      e.com>                   cc:                                     
                                            
                                               Subject:  RE: array serialization 
problem (committed possible fix)                  
                      03/01/2002 02:58                                                 
                                            
                      PM                                                               
                                            
                      Please respond to                                                
                                            
                      axis-user                                                        
                                            
                                                                                       
                                            
                                                                                       
                                            



The fix works for an axis client, but fails for a .NET client because the
resulting wsdl contains invalid schema:


      <s:complexType name="ScreenOutputs__Table">
        <s:all>
          <s:element maxOccurs="unbounded" name="_Record" nillable="true"
type="s1:ScreenOutputs__Table__Record" />
        </s:all>
      </s:complexType>


You can't have an <element maxOccurs="unbounded"> inside an <all>. The
schema spec says a model group with an "all" compositor must "contain all
and only exactly zero or one of each element specified." You could use a
sequence compositor instead of an all, but why not use the soap array
encoding? I believe the the schema in the original wsdl was correct. The
problem is with the way axis builds the response. (btw, the wsdl is from
?wsdl).


Dave


-----Original Message-----
From: R J Scheuerle Jr [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:51 AM
To: [EMAIL PROTECTED]
Cc: Dave Dunkin
Subject: RE: array serialization problem (committed possible fix)





I just committed a fix to Java2WSDL that may correct your problem


Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)







                      R J Scheuerle


                      Jr/Austin/IBM@IBM        To:
[EMAIL PROTECTED]


                      US                       cc:
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>


                                               Subject:  RE: array
serialization problem (user error ?)


                      03/01/2002 08:42


                      AM


                      Please respond to


                      axis-user











Was the wsdl generated by WSDL2Java or ?wsdl?


My concern is that the wsdl description does not match the format of the
service response.
So either the service was implemented incorrectly, or the wsdl generation
from the service is wrong.


The service is sending back a response ScreenOutputs__Table that matches
(1) below.
However the wsdl indicates that a ScreenOutputs__Table contains an
array...a different format.





Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)






                      Dave Dunkin
                      <DaveDu@Attachmat        To:
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
                      e.com>                   cc:
                                               Subject:  RE: array
serialization problem (user error ?)
                      02/28/2002 05:17
                      PM
                      Please respond to
                      axis-user








The wsdl is from a deployed axis service. Sorry, I guess I didn't make that

part clear before. The problem isn't with the axis stubs (like I said
before, .NET stubs fail too), it's with the axis service. I've attached as
much of the source code as I can provide.





Dave Dunkin





-----Original Message-----
From: R J Scheuerle Jr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 3:07 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: array serialization problem (user error ?)








I took a serious look your ServiceOne.wsdl document, and it doesn't appear
to match your response files.





Here's a snippet of the response file:





  <multiRef id="id1" SOAP-ENC:root="0"
     xsi:type="ns3:ScreenOutputs__Table"
    xmlns:ns3="http://output.getOrderData.ServiceOne.serviceone";
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>





   <_Record href="#id2"/>
   <_Record href="#id3"/>
   ...
<multiRef />





<multiRef id="id2"
      SOAP-ENC:root="0"
      xsi:type="ns20:ScreenOutputs__Table__Record"
      xmlns:ns20="http://output.getOrderData.ServiceOne.serviceone";
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>





   <order xsi:type="xsd:string">1</order>
   ....
</multiRef>





The response indicates that a _Record should be of type
"ns2:ScreenOutputs__Table__Record",
but in your wsdl you have _Record as type
="intf:ArrayOf_tns2_ScreenOutputs__Table__Record".





The numerous _Record fields indicate that it should have the maxOccurs
="unbounded" attribute.





Do the following:





1) Change the ScreenOutputs__Table to:





    <complexType name="ScreenOutputs__Table">
       <all>
         <element name="_Record"
             nillable="true" maxOccurs="unbounded"
             type="tns2:ScreenOutputs__Table__Record"/>
       </all>
    </complexType>





2) Get rid of the complexType ArrayOf_tns2_ScreenOutputs__Table__Record.





3) Re-run WSDL2Java and try again.








Where did you get this WSDL ?





Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)





  (See attached file: AxisBinding.tar.gz)










#### AxisBinding.tar.gz has been removed from this note on March 01 2002 by

R J Scheuerle Jr






Reply via email to