I checked it with the wsdl generated by Axis 1.3. It's attached and it seems to work. So the problem is not with the wsdl2java but with the java2wsdl process. On 5/5/06, José Antonio Sánchez <[EMAIL PROTECTED]> wrote: > If I start with the wsdl from the working service, I get the same error. > The two classes (FTAction and FaultToleranceService interface) are > written by me, although they were writter for the Axis1 service, they > are not generated at all and so, they should generate a good WSDL file > with Axis2. > On 5/5/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote: > > Jose, > > > > The schema has two identical definitions of the FTAction type. Which is > > obviously an error. The WSDL also imports another schema with a namespace of > > "http://ft.tomas.org/xsd ", which also defines the FTAction type, and your > > elements reference this imported type rather than one from the > > "http://tomas.org/faultTolerance/Service/Types " namespace. > > > > Did you create a new interface and class to generate your WSDL or did you > > use the class previously generated by Axis1? > > > > I suggest you start completely from scratch. Or better yet -- start from the > > WSDL from your working web service. > > > > Anne > > > > > > On 5/5/06, José Antonio Sánchez <[EMAIL PROTECTED]> wrote: > > > I have a working web service deployed in Axis 1.3 so I tested if I can > > > port it to Axis2. > > > I downloaded the Axis2 binary distribution and ecipse plugin. First I > > > created the FaultToleranceService interface and the FTAction class > > > that were the starting point of my old service. They are attached. > > > Using the Eclipse generation wizard, I successfully created the > > > attached wsdl file but when I try to generate the java server and stub > > > code from it I get the following error: > > > > > > Exception in thread "main" > > > org.apache.axis2.wsdl.codegen.CodeGenerationException: > > > java.lang.RuntimeException: java.lang.RuntimeException: Schema for > > > namespace ' > > http://tomas.org/faultTolerance/Service/Types' already > > > contains type 'FTAction > > > > > > I tried with the Eclipse code generation wizard and manually with the > > > wsdl2java class and the result is the same. > > > I understand that, as the wsdl code is generated from an Axis2 tool, > > > it must be understood by another Axis2 tool without this kind of > > > problems. > > > -- > > > Regards. > > > José Antonio Sánchez > > > > > > > > > > > > > > > > -- > Saludos. > José Antonio Sánchez >
-- Saludos. José Antonio Sánchez
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://tomas.org/faultTolerance/Service" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://tomas.org/faultTolerance/Service" xmlns:intf="http://tomas.org/faultTolerance/Service" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 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.3 Built on Oct 05, 2005 (05:23:37 EDT)--> <wsdl:types> <schema targetNamespace="http://tomas.org/faultTolerance/Service" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="FTAction"> <sequence> <element name="action" nillable="true" type="soapenc:string"/> <element name="value" type="xsd:int"/> </sequence> </complexType> <complexType name="ArrayOfFTAction"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:FTAction[]"/> </restriction> </complexContent> </complexType> </schema> </wsdl:types> <wsdl:message name="doFTActionResponse"> <wsdl:part name="doFTActionReturn" type="impl:ArrayOfFTAction"/> </wsdl:message> <wsdl:message name="doFTActionRequest"> <wsdl:part name="in0" type="impl:ArrayOfFTAction"/> </wsdl:message> <wsdl:portType name="FaultToleranceService"> <wsdl:operation name="doFTAction" parameterOrder="in0"> <wsdl:input message="impl:doFTActionRequest" name="doFTActionRequest"/> <wsdl:output message="impl:doFTActionResponse" name="doFTActionResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="FTServiceSoapBinding" type="impl:FaultToleranceService"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="doFTAction"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="doFTActionRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tomas.org/faultTolerance/Service" use="encoded"/> </wsdl:input> <wsdl:output name="doFTActionResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tomas.org/faultTolerance/Service" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="FaultToleranceServiceService"> <wsdl:port binding="impl:FTServiceSoapBinding" name="FTService"> <wsdlsoap:address location="http://localhost:8080/axis/services/FTService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
