title: how to Use JAXWS/JAXB rename the parameter
body: <p>I use CXF(2.2.3) to compile the Amazon Web Service WSDL (<a href="http://s3.amazonaws.com/ec2-downloads/2009-07-15.ec2.wsdl" rel="nofollow noreferrer">http://s3.amazonaws.com/ec2-downloads/2009-07-15.ec2.wsdl</a>)</p>
  
  <p>But got error as below.</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>The conflict was due to the data type show below:</p>
  
  <pre><code>&lt;xs:complexType name="DescribeSnapshotsType"&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element name="snapshotSet" type="tns:DescribeSnapshotsSetType"/&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
  
  &lt;xs:complexType name="DescribeSnapshotsResponseType"&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element name="requestId" type="xs:string"/&gt;
                      &lt;xs:element name="snapshotSet" type="tns:DescribeSnapshotsSetResponseType"/&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>I create a binding file try to address the issue...but it didn`t do the job</p>
  
  <pre><code>   &lt;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"&gt;
  
      &lt;enableWrapperStyle&gt;false&lt;/enableWrapperStyle&gt;
      &lt;jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://ec2.amazonaws.com/doc/2009-07-15/']"&gt;
       &lt;jxb:bindings node="xs:complexType[@name='tns:DescribeSnapshotsType']//xs:element[@name='snapshotSet']"&gt;
           &lt;jxb:property name="snapshotRequestSet"/&gt;
       &lt;/jxb:bindings&gt;
       &lt;jxb:bindings node="xs:complexType[@name='DescribeSnapshotsResponseType']//xs:element[@name='snapshotSet']"&gt;
           &lt;jxb:property name="snapshotResponseSet"/&gt;
       &lt;/jxb:bindings&gt;     
      &lt;/jaxws:bindings&gt;
  &lt;/jaxws:bindings&gt;
  </code></pre>
  
  <p>And the command i used, was like below</p>
  
  <pre><code>&lt;wsdlOptions&gt;
       &lt;wsdlOption&gt;
            &lt;wsdl&gt;${basedir}/src/main/resources/wsdl/EC2_2009-07-15.wsdl&lt;/wsdl&gt;
            &lt;extraargs&gt;
              &lt;extraarg&gt;-b&lt;/extraarg&gt;
              &lt;extraarg&gt;${basedir}/src/main/resources/wsdl/Bindings_EC2_2009-07-15.xml&lt;/extraarg&gt;
            &lt;/extraargs&gt;
      &lt;/wsdlOption&gt;
  &lt;/wsdlOptions&gt;
  </code></pre>
  
  <p>What is wrong with my code???? </p>
  
  <p>And you can check out my project by using svn....
  svn co <a href="http://shrimpysprojects.googlecode.com/svn/trunk/smartcrc/AWSAgent/" rel="nofollow noreferrer">http://shrimpysprojects.googlecode.com/svn/trunk/smartcrc/AWSAgent/</a></p>