I'm not sure why that binding file isn't working.   That said, the easiest way 
to deal with it is to use the -autoNameResolution flag to wsdl2java.   That 
would handle it automatically.

Dan


On Sat September 26 2009 1:55:41 am shrimpywu wrote:
> I use CXF(2.2.3) to compile the Amazon Web Service WSDL
> (http://s3.amazonaws.com/ec2-downloads/2009-07-15.ec2.wsdl)
> 
> But got error as below.
> 
> **Parameter: snapshotSet already exists for method describeSnapshots but of
> type com.amazonaws.ec2.doc._2009_07_15.DescribeSnapshotsSetType instead of
> com.amazonaws.ec2.doc._2009_07_15.DescribeSnapshotsSetResponseType.  Use a
> JAXWS/JAXB binding customization to rename the parameter.**
> 
> 
> The conflict was due to the data type show below:
> 
> 
>     <xs:complexType name="DescribeSnapshotsType">
>                     <xs:sequence>
>                         <xs:element name="snapshotSet"
> type="tns:DescribeSnapshotsSetType"/>
>                     </xs:sequence>
>                 </xs:complexType>
> 
>     <xs:complexType name="DescribeSnapshotsResponseType">
>                     <xs:sequence>
>                         <xs:element name="requestId" type="xs:string"/>
>                         <xs:element name="snapshotSet"
> type="tns:DescribeSnapshotsSetResponseType"/>
>                     </xs:sequence>
>                 </xs:complexType>
> 
> 
> 
> 
> 
> I create a binding file try to address the issue...but it didn`t do the job
> 
> 
> 
> 
>        <jaxws:bindings
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>         wsdlLocation="EC2_2009-07-15.wsdl"
>         xmlns="http://java.sun.com/xml/ns/jaxws";
>         xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
>         xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";>
> 
>         <enableWrapperStyle>false</enableWrapperStyle>
>         <jaxws:bindings
> node="wsdl:definitions/wsdl:types/xs:sche...@targetnamespace='http://ec2.am
> azonaws.com/doc/2009-07-15/']"> <jxb:bindings
> node="xs:complexty...@name='tns:DescribeSnapshotsType']//xs:eleme...@name='
> snapshotSet']"> <jxb:property name="snapshotRequestSet"/>
>          </jxb:bindings>
>          <jxb:bindings
> node="xs:complexty...@name='DescribeSnapshotsResponseType']//xs:eleme...@na
> me='snapshotSet']"> <jxb:property name="snapshotResponseSet"/>
>          </jxb:bindings>
>         </jaxws:bindings>
>     </jaxws:bindings>
> 
> 
> 
> And the command i used, was like below
> 
>     <wsdlOptions>
>          <wsdlOption>
> 
> <wsdl>${basedir}/src/main/resources/wsdl/EC2_2009-07-15.wsdl</wsdl>
>               <extraargs>
>                 <extraarg>-b</extraarg>
> 
> <extraarg>${basedir}/src/main/resources/wsdl/Bindings_EC2_2009-07-15.xml</e
> xtraarg> </extraargs>
>         </wsdlOption>
>     </wsdlOptions>
> 
> 
> What is wrong with my code????
> 
> 
> And you can check out my project by using svn....
> svn co http://shrimpysprojects.googlecode.com/svn/trunk/smartcrc/AWSAgent/
> 
> thx
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to