First of all, I am using a service that returns a java.util.Map type and this appears to be the problem with attempting to generate java stub classes from the wsdl definition of the service.
 
I am having trouble with the WSDL2Java conversion code from two night's ago axis nightly build 02/05/2002.  I am using axis.jar, wsdl4j.jar, log4j-core.jar and clutil.jar from this build.  I have attached a sample service wsdl file (AuthenticationService.xml) and the server-config.wsdd file I am using inside of tomcat.  This is the command that elicits failure -->
 
D:\>java org.apache.axis.wsdl.WSDL2Java http://localhost/services/AuthenticationSer
vice?wsdl
java.io.IOException: Type
http://xml.apache.org/xml-soap:Map is referenced but n
ot defined.
        at org.apache.axis.wsdl.toJava.SymbolTable.checkForUndefined(Unknown Sou
rce)
        at org.apache.axis.wsdl.toJava.SymbolTable.add(Unknown Source)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.WSDL2Java.emit(Unknown Source)
        at org.apache.axis.wsdl.WSDL2Java.main(Unknown Source)
I tried putting in some custom qname mappings for map but was unable to get that to work either.  It looks like map is always getting "mapped" to this http://xml.apache.org/xml-soap:Map type in the wsdl file which appears to not exist.
Thank you,
- @m
 
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost/services/AuthenticationService"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:intf="http://localhost/services/AuthenticationService"; xmlns:impl="http://localhost/services/AuthenticationService-impl"; xmlns:tns1="http://xml.apache.org/xml-soap"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns="http://schemas.xmlsoap.org/wsdl/";><types><schema xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://xml.apache.org/xml-soap";><complexType><sequence><element name="item" minOccurs="0" maxOccurs="unbounded"><complexType><all><element name="key" type="xsd:anyType"/><element name="value" type="xsd:anyType"/></all></complexType></element></sequence></complexType><element name="Map" nillable="true" type="tns1:Map"/></schema></types>
  <wsdl:message name="loginRequest">
    <wsdl:part name="in0" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="loginResponse">
    <wsdl:part name="return" type="tns1:Map"/>
  </wsdl:message>
  <wsdl:portType name="MyAuthenticationService">
    <wsdl:operation name="login" parameterOrder="in0">
      <wsdl:input message="intf:loginRequest"/>
      <wsdl:output message="intf:loginResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="AuthenticationServiceSoapBinding" type="intf:MyAuthenticationService">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="login">
      <wsdlsoap:operation soapAction="" style="rpc"/>
      <wsdl:input>
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://localhost/services/AuthenticationService"/>
      </wsdl:input>
      <wsdl:output>
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://localhost/services/AuthenticationService"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="AuthenticationServiceService">
    <wsdl:port name="AuthenticationService" binding="intf:AuthenticationServiceSoapBinding">
      <wsdlsoap:address location="http://localhost/services/AuthenticationService"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Attachment: server-config.wsdd
Description: Binary data

Reply via email to