Hi,
I am trying to use complex array definitions and found that the objects
refered in the array definitions are not generated. I am inlining my
"test.wsdl" file. Here is the verbose trace, while runing wsdl2java, for the
class that is missing
-----------------------------
QName:         http://www.Test.com/services/test:Item
name:          com.Test.www.Item
isReferenced?  false
Emit?: true
Base?: false
-----------------------------
I am not sure why "isReferenced" is getting set to false. I have tried to
create a serializable version of "com.Test.www.Item" class and run the
client which again fails
in serializing the Item object

java.io.IOException: No mapped schema type for com.Test.www.Item
        at
org.apache.axis.encoding.ArraySerializer.serialize(ArraySerializer.java:32
1)
        at
org.apache.axis.encoding.TypeMappingRegistry.serialize(TypeMappingRegistry
.java:275)
        at
org.apache.axis.encoding.SerializationContext.serialize(SerializationConte
xt.java:417)
        at
org.apache.axis.encoding.SerializationContext.outputMultiRefs(Serializatio
nContext.java:442) 

I am using Alpha3 release and also tried with 02272002 nightly build. Still
failed...

Remember that this was a bug from the mailing list and not sure if it is
fixed. 

Any Ideas?  

Here is the test.wsdl file

<?xml version="1.0" ?> 
<definitions name="Test" 
        targetNamespace=
           "http://www.Test.com/services/test"; 
         xmlns:tns="http://www.Test.com/services/test";   
         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:pa="http://www.Test.com/services/test";   
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
         xmlns="http://schemas.xmlsoap.org/wsdl/";>
   <types>
      <xsd:schema targetNamespace="http://www.Test.com/services/test"; 
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
         xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
         <xsd:complexType name="TestReq">
            <xsd:sequence>
               <xsd:element name="one" type="xsd:string"/>
               <xsd:element name="two" type="xsd:string"/>    
               <xsd:element name="items" type="pa:Items" />         
            </xsd:sequence>
         </xsd:complexType>


         <xsd:complexType name="TestRes">
            <xsd:sequence>
               <xsd:element name="three" type="xsd:string"/>
               <xsd:element name="four" type="xsd:string"/>          
            </xsd:sequence>
         </xsd:complexType>


         <xsd:complexType name="Items">
             <xsd:complexContent>
                <xsd:restriction base="soapenc:Array">
                    <xsd:attribute ref="soapenc:arrayType"
                                   wsdl:arrayType="pa:Item[]"/>
                </xsd:restriction>
             </xsd:complexContent>
         </xsd:complexType>        

         <xsd:complexType name="Item">
             <xsd:sequence> 
                 <xsd:element name="ConfigFlag" type="xsd:string"
minOccurs="0" maxOccurs="1" />                
                 <xsd:element name="SellerSKU" type="xsd:string"
minOccurs="0" maxOccurs="1" />                
             </xsd:sequence>
         </xsd:complexType>  

       </xsd:schema>        
        
    </types>             
     <message name="testRequest">
          <part name="panda" type="pa:TestReq" /> 
     </message>
     
     <message name="testResponse">
          <part name="symbol" type="pa:TestRes" /> 
     </message>


     <portType name="TestPortType">
         <operation name="doIt">
              <input message="pa:testRequest" /> 
              <output message="pa:testResponse" /> 
          </operation>
     </portType>
     
     <binding name="testBinding" type="pa:TestPortType">
          <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"; /> 
          <operation name="doIt">
              <soap:operation
soapAction="http://localhost:8080/axis/services/TestPort"; /> 
                  <input>
                      <soap:body use="encoded" namespace="Test"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; /> 
                  </input>
                  <output>
                      <soap:body use="encoded" namespace="Test"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; /> 
                  </output>
          </operation>
     </binding>
     <service name="TestService">
         <port name="TestPort" binding="pa:testBinding">
              <soap:address
location="http://localhost:8080/axis/services/TestPort"; /> 
          </port>
     </service>
</definitions>

-
Ravi Akireddy


Reply via email to