Well, after some testing in Linux I noticed a message saying that AdminServiceException can not be overwritten(even when the target folder is empty)
eco...@naboo.mia.usa.sinvest:/opt/eco/ecoprd/axis2-1.6.1/bin >> ./wsdl2java.sh -u -uri test.wsdl Using AXIS2_HOME: /opt/eco/ecoprd/axis2-1.6.1 Using JAVA_HOME: /usr/local/jdk1.6.0_16 Retrieving document at 'test.wsdl'. [WARN] Type {http://admin.ws.csd.rsa.com}ArrayOfUserChange missing! [INFO] The ./src/com/rsa/csd/ws/admin/AdminServiceException.java file cannot be overwritten. and the code is wrong. But If i uses the option -or, I don't get that message, and the code is correct: eco...@naboo.mia.usa.sinvest:/opt/eco/ecoprd/axis2-1.6.1/bin >> ./wsdl2java.sh -u -uri test.wsdl -or Using AXIS2_HOME: /opt/eco/ecoprd/axis2-1.6.1 Using JAVA_HOME: /usr/local/jdk1.6.0_16 Retrieving document at 'test.wsdl'. [WARN] Type {http://admin.ws.csd.rsa.com}ArrayOfUserChange missing! I can work with that, but still, it doesnt' seem like a normal behaviour... 2012/3/23 JOSE L MARTINEZ-AVIAL <jlm...@gmail.com> > no, it doesn't work for me. I got the same faulty class. > > C:\axis2-1.6.1\bin>wsdl2java -u -uri C:\TEMP\TEST.WSDL > Using AXIS2_HOME: C:\axis2-1.6.1 > Using JAVA_HOME: C:\Java\jdk1.6.0_27 > Retrieving document at 'C:\TEMP\TEST.WSDL'. > log4j:WARN No appenders could be found for logger > (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder). > log4j:WARN Please initialize the log4j system properly. > C:\axis2-1.6.1\bin> > > /** > * AdminServiceException.java > * > * This file was auto-generated from WSDL > * by the Apache Axis2 version: 1.6.1 Built on : Aug 31, 2011 (12:23:23 > CEST) > */ > > > package com.rsa.csd.ws.admin; > > > /** > * AdminServiceException bean class > */ > @SuppressWarnings({"unchecked","unused"}) > > public class AdminServiceException > implements org.apache.axis2.databinding.ADBBean{ > /* This type was generated from the piece of schema that had > name = AdminServiceException > Namespace URI = http://admin.ws.csd.rsa.com > Namespace Prefix = ns1 > */ > > > 2012/3/23 Sagara Gunathunga <sagara.gunathu...@gmail.com> > >> On Fri, Mar 23, 2012 at 12:02 AM, JOSE L MARTINEZ-AVIAL >> <jlm...@gmail.com> wrote: >> > Well, the problem was that the servicename was wrong. But then I have >> > another issue. When I use the option unpackclasses="true" the class >> > AdminServiceException does not extend java.lang.Exception, and >> therefore the >> > code that tries to throw that class does not compile. >> >> You have to use corrct option here "-u Unpacks the databinding >> classes". >> >> Thanks ! >> > >> > So if I pack the classes, the class is defined as follows: >> > >> > public class AdminServiceException extends java.lang.Exception{ >> > >> > but if I use unpackclasses="true", the code is as follows: >> > >> > public class AdminServiceException >> > implements org.apache.axis2.databinding.ADBBean{ ....} >> > >> > Which is not an exception, and therefore the code does not compile. Any >> idea >> > where the problem may be? >> > >> > >> > 2012/3/22 JOSE L MARTINEZ-AVIAL <jlm...@gmail.com> >> >> >> >> Hi, >> >> I'm using wsdl2java to create a client for a webservice. The WSDL is >> >> pretty simple: >> >> >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> <wsdl:definitions targetNamespace="http://admin.ws.csd.rsa.com" >> >> xmlns:apachesoap="http://xml.apache.org/xml-soap" >> >> xmlns:impl="http://admin.ws.csd.rsa.com" >> >> xmlns:intf="http://admin.ws.csd.rsa.com" >> >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >> >> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" >> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> >> <!--WSDL created by Apache Axis version: 1.4 >> >> Built on Apr 22, 2006 (06:55:48 PDT)--> >> >> <wsdl:types> >> >> <schema elementFormDefault="qualified" >> >> targetNamespace="http://admin.ws.csd.rsa.com" >> >> xmlns="http://www.w3.org/2001/XMLSchema"> >> >> <element name="getUserStatus"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <complexType name="GenericRequest"> >> >> <sequence> >> >> <element name="adminID" nillable="true" >> >> type="xsd:string"/> >> >> <element name="orgName" nillable="true" >> >> type="xsd:string"/> >> >> <element name="userName" nillable="true" >> >> type="xsd:string"/> >> >> </sequence> >> >> </complexType> >> >> <complexType name="AdminRequest"> >> >> <complexContent> >> >> <extension base="impl:GenericRequest"> >> >> <sequence> >> >> <element name="userStatus" nillable="true" >> >> type="xsd:string"/> >> >> </sequence> >> >> </extension> >> >> </complexContent> >> >> </complexType> >> >> <element name="getUserStatusResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="getUserStatusReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <complexType name="GenericResponse"> >> >> <sequence> >> >> <element name="status" nillable="true" >> >> type="xsd:string"/> >> >> </sequence> >> >> </complexType> >> >> <complexType name="UserChange"> >> >> <sequence> >> >> <element name="date" nillable="true" >> >> type="xsd:string"/> >> >> <element name="description" nillable="true" >> >> type="xsd:string"/> >> >> <element name="type" nillable="true" >> >> type="xsd:string"/> >> >> </sequence> >> >> </complexType> >> >> <complexType name="ArrayOfUserChange"> >> >> <sequence> >> >> <element maxOccurs="unbounded" minOccurs="0" >> >> name="userChangeHistory" type="impl:UserChange"/> >> >> </sequence> >> >> </complexType> >> >> <complexType name="AdminResponse"> >> >> <complexContent> >> >> <extension base="impl:GenericResponse"> >> >> <sequence> >> >> <element name="userChangeHistory" >> >> nillable="true" type="impl:ArrayOfUserChange"/> >> >> <element name="userStatus" nillable="true" >> >> type="xsd:string"/> >> >> </sequence> >> >> </extension> >> >> </complexContent> >> >> </complexType> >> >> <complexType name="AdminServiceException"> >> >> <sequence/> >> >> </complexType> >> >> <element name="fault" type="impl:AdminServiceException"/> >> >> <element name="unlockUser"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="unlockUserResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="unlockUserReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="deleteUser"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="deleteUserResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="deleteUserReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="getUserChangeHistory"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="getUserChangeHistoryResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="getUserChangeHistoryReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="lockUser"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="lockUserResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="lockUserReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="setUserStatus"> >> >> <complexType> >> >> <sequence> >> >> <element name="in0" type="impl:AdminRequest"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> <element name="setUserStatusResponse"> >> >> <complexType> >> >> <sequence> >> >> <element name="setUserStatusReturn" >> >> type="impl:AdminResponse"/> >> >> </sequence> >> >> </complexType> >> >> </element> >> >> </schema> >> >> </wsdl:types> >> >> <wsdl:message name="lockUserRequest"> >> >> <wsdl:part element="impl:lockUser" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="unlockUserRequest"> >> >> <wsdl:part element="impl:unlockUser" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="setUserStatusRequest"> >> >> <wsdl:part element="impl:setUserStatus" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="getUserStatusResponse"> >> >> <wsdl:part element="impl:getUserStatusResponse" >> >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="getUserStatusRequest"> >> >> <wsdl:part element="impl:getUserStatus" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="getUserChangeHistoryResponse"> >> >> <wsdl:part element="impl:getUserChangeHistoryResponse" >> >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="getUserChangeHistoryRequest"> >> >> <wsdl:part element="impl:getUserChangeHistory" >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="AdminServiceException"> >> >> <wsdl:part element="impl:fault" name="fault"/> >> >> </wsdl:message> >> >> <wsdl:message name="lockUserResponse"> >> >> <wsdl:part element="impl:lockUserResponse" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="deleteUserRequest"> >> >> <wsdl:part element="impl:deleteUser" name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="deleteUserResponse"> >> >> <wsdl:part element="impl:deleteUserResponse" >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="unlockUserResponse"> >> >> <wsdl:part element="impl:unlockUserResponse" >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:message name="setUserStatusResponse"> >> >> <wsdl:part element="impl:setUserStatusResponse" >> >> name="parameters"/> >> >> </wsdl:message> >> >> <wsdl:portType name="UserAdminService"> >> >> <wsdl:operation name="getUserStatus"> >> >> <wsdl:input message="impl:getUserStatusRequest" >> >> name="getUserStatusRequest"/> >> >> <wsdl:output message="impl:getUserStatusResponse" >> >> name="getUserStatusResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> <wsdl:operation name="unlockUser"> >> >> <wsdl:input message="impl:unlockUserRequest" >> >> name="unlockUserRequest"/> >> >> <wsdl:output message="impl:unlockUserResponse" >> >> name="unlockUserResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> <wsdl:operation name="deleteUser"> >> >> <wsdl:input message="impl:deleteUserRequest" >> >> name="deleteUserRequest"/> >> >> <wsdl:output message="impl:deleteUserResponse" >> >> name="deleteUserResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> <wsdl:operation name="getUserChangeHistory"> >> >> <wsdl:input message="impl:getUserChangeHistoryRequest" >> >> name="getUserChangeHistoryRequest"/> >> >> <wsdl:output message="impl:getUserChangeHistoryResponse" >> >> name="getUserChangeHistoryResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> <wsdl:operation name="lockUser"> >> >> <wsdl:input message="impl:lockUserRequest" >> >> name="lockUserRequest"/> >> >> <wsdl:output message="impl:lockUserResponse" >> >> name="lockUserResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> <wsdl:operation name="setUserStatus"> >> >> <wsdl:input message="impl:setUserStatusRequest" >> >> name="setUserStatusRequest"/> >> >> <wsdl:output message="impl:setUserStatusResponse" >> >> name="setUserStatusResponse"/> >> >> <wsdl:fault message="impl:AdminServiceException" >> >> name="AdminServiceException"/> >> >> </wsdl:operation> >> >> </wsdl:portType> >> >> <wsdl:binding name="AdaptiveAuthenticationAdminSoapBinding" >> >> type="impl:UserAdminService"> >> >> <wsdlsoap:binding style="document" >> >> transport="http://schemas.xmlsoap.org/soap/http"/> >> >> <wsdl:operation name="getUserStatus"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="getUserStatusRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="getUserStatusResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> <wsdl:operation name="unlockUser"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="unlockUserRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="unlockUserResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> <wsdl:operation name="deleteUser"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="deleteUserRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="deleteUserResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> <wsdl:operation name="getUserChangeHistory"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="getUserChangeHistoryRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="getUserChangeHistoryResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> <wsdl:operation name="lockUser"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="lockUserRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="lockUserResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> <wsdl:operation name="setUserStatus"> >> >> <wsdlsoap:operation soapAction=""/> >> >> <wsdl:input name="setUserStatusRequest"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:input> >> >> <wsdl:output name="setUserStatusResponse"> >> >> <wsdlsoap:body use="literal"/> >> >> </wsdl:output> >> >> <wsdl:fault name="AdminServiceException"> >> >> <wsdlsoap:fault name="AdminServiceException" >> >> use="literal"/> >> >> </wsdl:fault> >> >> </wsdl:operation> >> >> </wsdl:binding> >> >> <wsdl:service name="UserAdminServiceService"> >> >> <wsdl:port >> binding="impl:AdaptiveAuthenticationAdminSoapBinding" >> >> name="AdaptiveAuthenticationAdmin"> >> >> <wsdlsoap:address >> >> location=" >> http://myserver:83/AdaptiveAuthenticationAdmin/services/AdaptiveAuthenticationAdmin >> "/> >> >> </wsdl:port> >> >> </wsdl:service> >> >> </wsdl:definitions> >> >> >> >> >> >> And I process it using the followwing Ant Task: >> >> >> >> <axis-wsdl2java output="${src}/rsa" >> >> testcase="false" >> >> >> >> wsdlfilename="C:\eco\workspace-head\WSClients-Axis2\rsa-admin.wsdl" >> >> serverside="false" >> >> servicename="AdaptiveAuthenticationAdmin" >> >> unpackclasses="true" >> >> unwrap="true" >> >> >> >> suppressprefixes="true" >> >> generateAllClasses="true"/> >> >> >> >> But I got this error: >> >> >> >> C:\eco\workspace-head\WSClients-Axis2\build.xml:82: >> >> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing >> WSDL >> >> >> >> and it does not say anything more. Any idea what can be wrong? >> >> >> >> Thans >> >> >> >> JL >> >> >> > >> >> >> >> -- >> Sagara Gunathunga >> >> Blog - http://ssagara.blogspot.com >> Web - http://people.apache.org/~sagara/ >> LinkedIn - http://www.linkedin.com/in/ssagara >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org >> For additional commands, e-mail: java-user-h...@axis.apache.org >> > >