You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Wang, David (Mission Systems)" <Da...@ngc.com> on 2004/07/08 19:35:54 UTC

WSDL2Java generate mismatch class name

We tried to generate java client classes from external WSDL files.part of WSDL look like:

<binding name="XXX_Binding_NAME" type="tns:XXXPortType">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/ <http://schemas.xmlsoap.org/soap/http> >
  <operation name="XXX_XXX">
   <soap:operation soapAction="http://www.XXXX.com/"/ <http://www.xxxx.com/> >
   <input>
    <soap:body use="literal"/>
   </input>
   <output>
    <soap:body use="literal"/>
   </output>
  </operation>
 </binding>
 
 
I tried to use WSDL2Java to generate client classes:
java org.apache.axis.wsdl.WSDL2Java --verbose --package com.xxx.soap --output . thiswsdl.wsdl.
 
It did generate a lot of classes. But we are going to compile them.it fail and  I find the class name mismatch. For example, 
1. generate the class _xxPsswordType22.java but In BindingStub.java, it refer to _xxPassword.
           qName = new javax.xml.namespace.QName("http://www.XXX.com/ <http://www.xxx.com/> ", ">xxPassword");
            cachedSerQNames.add(qName);
            cls = com.soap._xxPassword.class;
            cachedSerClasses.add(cls);
            cachedSerFactories.add(beansf);
            cachedDeserFactories.add(beandf);
 
2. It refers to class _xxImageType11. but the generated class name is called _XXImage
 
Can anyone give me some clues what cause this problem and how to fix them.
 
Thanks in advance!