axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: The duplicate type is happening here for the WSDL file
Date Wed, 28 Jun 2006 08:59:26 GMT


Xinjun Chen wrote:

> Hi Deepal,
>
> I encountered the same problem as I posted in Joshua's thread on
> operation inheritance. Could you also have a look at that thread?
>
> Could you tell me the minimal modules I need to rebuild? only codegen
> and wsdl or all the rest?

hmm , the best thing is get an update and rebuild the project .

>
>
> Regards,
> Xinjun
>
> On 6/28/06, Deepal Jayasinghe <deepal@opensource.lk> wrote:
>
>> I have already fixed this , any possibility of testing with current SVN
>> or nightly build.
>>
>> Davanum Srinivas wrote:
>>
>> > John,
>> >
>> > Could i pester you to please open up a JIRA issue?
>> >
>> > thanks,
>> > dims
>> >
>> > On 6/27/06, Andersen_John@emc.com <Andersen_John@emc.com> wrote:
>> >
>> >> Hi Deepal,
>> >>
>> >> I've butted my head against the same issue during the past few weeks
>> >> (most
>> >> recently with the June 19 Axis2 snap) and have had to resort to
>> >> fixing the
>> >> wsdl with a perl script.  Rather easy to reproduce with 2 source
>> files:
>> >>
>> >> test.MyService.java
>> >> ####################
>> >>         package test;
>> >>         import test.MyData;
>> >>         public class MyService
>> >>         {
>> >>                 private MyData myData = new MyData();
>> >>
>> >>                 public MyData retrieveMyData()
>> >>                 {
>> >>                         return myData;
>> >>                 }
>> >>         }
>> >>
>> >> Test.MyData.java
>> >> ###################
>> >>         package test;
>> >>         public class MyData
>> >>         {
>> >>                 private String myString = null;
>> >>                 public String getMyString() { return this.myString; }
>> >>                 public void setMyString(String arg) { this.myString =
>> >> arg; }
>> >>         }
>> >>
>> >>
>> >> I ran:
>> >>         ..\bin\java2wsdl.bat -cp . -sn TEST -l
>> >> http://localhost:8080/axis2/services/Logger -st wrapped -cn
>> >> test.MyService
>> >> (and I did try different styles - same result)
>> >>
>> >> Which resulted in the following wsdl with the element "MyData"
>> defined
>> >> twice:
>> >> ###################
>> >> wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> >> xmlns:axis2="http://test"
>> >> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>> >> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>> >> xmlns:ns1="http://test/xsd"
>> >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> >> targetNamespace="http://test">
>> >>   <wsdl:types>
>> >>     <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> >> xmlns:ns="http://test/xsd" targetNamespace="http://test/xsd"
>> >> elementFormDefault="unqualified" attributeFormDefault="unqualified">
>> >>       <xs:element type="ns:MyData" name="MyData" />
>> >>       <xs:complexType name="MyData">
>> >>         <xs:sequence>
>> >>           <xs:element type="xs:string" name="myString" />
>> >>         </xs:sequence>
>> >>       </xs:complexType>
>> >>       <xs:element name="retrieveMyData">
>> >>         <xs:complexType />
>> >>       </xs:element>
>> >>       <xs:element name="retrieveMyDataResponse">
>> >>         <xs:complexType>
>> >>           <xs:sequence>
>> >>             <xs:element type="ns:MyData" name="return" />
>> >>           </xs:sequence>
>> >>         </xs:complexType>
>> >>       </xs:element>
>> >>       <xs:complexType name="MyData">
>> >>         <xs:sequence>
>> >>           <xs:element type="xs:string" name="myString" />
>> >>         </xs:sequence>
>> >>       </xs:complexType>
>> >>     </xs:schema>
>> >>   </wsdl:types>
>> >>   <wsdl:message name="retrieveMyDataMessage">
>> >>     <wsdl:part element="ns1:retrieveMyData" name="part1" />
>> >>   </wsdl:message>
>> >>   <wsdl:message name="retrieveMyDataResponseMessage">
>> >>     <wsdl:part element="ns1:retrieveMyDataResponse" name="part1" />
>> >>   </wsdl:message>
>> >>   <wsdl:portType name="TESTPortType">
>> >>     <wsdl:operation name="retrieveMyData">
>> >>       <wsdl:input message="axis2:retrieveMyDataMessage" />
>> >>       <wsdl:output message="axis2:retrieveMyDataResponseMessage" />
>> >>     </wsdl:operation>
>> >>   </wsdl:portType>
>> >>   <wsdl:binding type="axis2:TESTPortType" name="TESTSOAP11Binding">
>> >>     <soap:binding style="wrapped"
>> >> transport="http://schemas.xmlsoap.org/soap/http" />
>> >>     <wsdl:operation name="retrieveMyData">
>> >>       <soap:operation style="wrapped"
>> soapAction="urn:retrieveMyData" />
>> >>       <wsdl:input>
>> >>         <soap:body namespace="http://test" use="literal" />
>> >>       </wsdl:input>
>> >>       <wsdl:output>
>> >>         <soap:body namespace="http://test" use="literal" />
>> >>       </wsdl:output>
>> >>     </wsdl:operation>
>> >>   </wsdl:binding>
>> >>   <wsdl:binding type="axis2:TESTPortType" name="TESTSOAP12Binding">
>> >>     <soap12:binding style="wrapped"
>> >> transport="http://schemas.xmlsoap.org/soap/http" />
>> >>     <wsdl:operation name="retrieveMyData">
>> >>       <soap12:operation style="wrapped"
>> >> soapAction="urn:retrieveMyData" />
>> >>       <wsdl:input>
>> >>         <soap12:body namespace="http://test" use="literal" />
>> >>       </wsdl:input>
>> >>       <wsdl:output>
>> >>         <soap12:body namespace="http://test" use="literal" />
>> >>       </wsdl:output>
>> >>     </wsdl:operation>
>> >>   </wsdl:binding>
>> >>   <wsdl:service name="TEST">
>> >>     <wsdl:port binding="axis2:TESTSOAP11Binding"
>> name="TESTSOAP11port">
>> >>       <soap:address
>> >> location="http://localhost:8080/axis2/services/LoggerTEST" />
>> >>     </wsdl:port>
>> >>     <wsdl:port binding="axis2:TESTSOAP12Binding"
>> name="TESTSOAP12port">
>> >>       <soap12:address
>> >> location="http://localhost:8080/axis2/services/LoggerTEST" />
>> >>     </wsdl:port>
>> >>   </wsdl:service>
>> >> </wsdl:definitions>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> -----Original Message-----
>> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >> Sent: Tuesday, June 27, 2006 12:41 AM
>> >> To: axis-user@ws.apache.org
>> >> Subject: Re: The duplicate type is happening here for the WSDL file
>> >>
>> >> Hi Jim;
>> >> can you please provide a way to recreate the issue , I mean any
>> >> possibility of sending java class that you use :)
>> >>
>> >> Jim Bender wrote:
>> >>
>> >> > I don't know the precise step, but by the time that we leave the
>> >> > generateOM() method in the Java2OMBuilder, there are two complex
>> type
>> >> > definitions in the WSDL.
>> >> >
>> >> >    public OMElement generateOM() throws Exception {
>> >> >        OMFactory fac = OMAbstractFactory.getOMFactory();
>> >> >        wsdl = fac.createOMNamespace(WSDL_NAMESPACE,
>> >> >                DEFAULT_WSDL_NAMESPACE_PREFIX);
>> >> >        OMElement ele = fac.createOMElement("definitions", wsdl);
>> >> >
>> >> >        ele.addAttribute("targetNamespace", targetNamespace, null);
>> >> >        generateNamespaces(fac, ele);
>> >> >        generateTypes(fac, ele);
>> >> >        generateMessages(fac, ele);
>> >> >        generatePortType(fac, ele);
>> >> >        generateBinding(fac, ele);
>> >> >        generateService(fac, ele);
>> >> >        return ele;
>> >> >    }
>> >> >
>> >> > The element's printString shows the story:
>> >> >
>> >> > <wsdl:types
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><xs:schema
>> >> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> >> > xmlns:ns="http://testexamples/xsd"
>> >> > targetNamespace="http://testexamples/xsd"
>> >> > elementFormDefault="unqualified"
>> attributeFormDefault="unqualified">
>> >> > <xs:element type="ns:FoodDescription" name="FoodDescription" />
>> >> > <xs:complexType name="FoodDescription">
>> >> > <xs:sequence>
>> >> > <xs:element type="xs:int" name="calories" />
>> >> > <xs:element type="xs:int" name="fatGrams" />
>> >> > <xs:element type="xs:int" name="fiberGrams" />
>> >> > <xs:element type="xs:int" name="points" />
>> >> > </xs:sequence>
>> >> > </xs:complexType>
>> >> > <xs:element name="calculatePoints">
>> >> > <xs:complexType>
>> >> > <xs:sequence>
>> >> > <xs:element type="ns:FoodDescription" name="param0" />
>> >> > </xs:sequence>
>> >> > </xs:complexType>
>> >> > </xs:element>
>> >> > <xs:element name="calculatePointsResponse">
>> >> > <xs:complexType>
>> >> > <xs:sequence>
>> >> > <xs:element type="xs:int" name="return" />
>> >> > </xs:sequence>
>> >> > </xs:complexType>
>> >> > </xs:element>
>> >> > <xs:complexType name="FoodDescription">
>> >> > <xs:sequence>
>> >> > <xs:element type="xs:int" name="calories" />
>> >> > <xs:element type="xs:int" name="fatGrams" />
>> >> > <xs:element type="xs:int" name="fiberGrams" />
>> >> > <xs:element type="xs:int" name="points" />
>> >> > </xs:sequence>
>> >> > </xs:complexType>
>> >> > </xs:schema></wsdl:types>
>> >> >
>> >> > Regards,
>> >> >
>> >> > Jim
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> Thanks,
>> >> Deepal
>> >> ................................................................
>> >> ~Future is Open~
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>
>> >>
>> >
>> >
>>
>> -- 
>> Thanks,
>> Deepal
>> ................................................................
>> ~Future is Open~
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message