title: Can't change SOAP-Client Request parameters of generated classes
body: <p>i have implemented a SOAP Webservice and have tested it successfully with SOAP UI. Now i want to generate the client classes with netbeans wsimport by URL (glassfish with webservice is on of course). The generation runs successfully, but i can't change parameters of the <em>RecommendationRequest</em> -complextype. This is my client-code:</p>
  
  <pre><code>RecommendationService service = new RecommendationService();
  ShitstormRec recommenderPort = service.getRecommenderPort();
  
  ObjectFactory factory = new ObjectFactory();
  Goal g1 = factory.createGoal(); // runs
          g1.setGoal("cost"); // runs perfectly, can set the value
          g1.setPrio(1); // runs perfectly, can set the value
  
  RecommendationRequest request = factory.createRecommendationRequest();
          request.setVariables // no setter was generated, can't use any setters!!!
  recommenderPort.getRecommendation(request); // so i can't send a meaningful request with adjusted parameters, because of missing generated setter-Methods from request.
  </code></pre>
  
  <p>How can this be? Every Object works fine, but only the most important argument is not able to change. These are my serverside classes:</p>
  
  <p>This is my WebService-Interface:</p>
  
  <pre><code>@WebService(name = "ShitstormRec",
          targetNamespace = "http://shitstormrec.org")
  public interface IRecommendationService {
  
      @WebMethod
      @WebResult(name = "recommendations")
      public List&lt;Recommendation&gt; getRecommendation(
              @WebParam(name = "recommendationRequest") RecommendationRequest request);
  
      @WebMethod
      @WebResult(name = "say")
      public String sayCiao();
  }
  </code></pre>
  
  <p>Implementation of the web service:</p>
  
  <pre><code>@WebService(serviceName = "RecommendationService",
          portName = "RecommenderPort",
          endpointInterface = "org.andy.services.IRecommendationService")
  public class RecommendationService implements IRecommendationService {
  
      private Recommender recommender = new Recommender();
  
      @Override
      public List&lt;Recommendation&gt; getRecommendation(RecommendationRequest request) {
          return recommender.recommend(request);
      }
  
      @Override
      public String sayCiao() {
          return "ciao";
      }
  
  }
  </code></pre>
  
  <p>The server-side Goal object:</p>
  
  <pre><code>@XmlRootElement(name = "goal")
  public class Goal implements Serializable {
  
      private int prio;
      private String goal;
  
      public Goal() {
      }
  
      public int getPrio() {
          return prio;
      }
  
      public void setPrio(int prio) {
          this.prio = prio;
      }
  
      public String getGoal() {
          return goal;
      }
  
      public void setGoal(String goal) {
          this.goal = goal;
      }
  
  }
  </code></pre>
  
  <p>The server-side-object, where  no setter is available for generated client classes:</p>
  
  <pre><code>@XmlRootElement(name = "recommendationRequest")
  public class RecommendationRequest implements Serializable {
  
      private List&lt;ProcessVariable&gt; variables;
      private List&lt;Goal&gt; goals;
  
      public RecommendationRequest() {
      }
  
      public RecommendationRequest(List&lt;ProcessVariable&gt; variables, List&lt;Goal&gt; goals) {
          this.variables = variables;
          this.goals = goals;
      }
  
      public List&lt;ProcessVariable&gt; getVariables() {
          return variables;
      }
  
      public void setVariables(List&lt;ProcessVariable&gt; variables) {
          this.variables = variables;
      }
  
      public List&lt;Goal&gt; getGoals() {
          return goals;
      }
  
      public void setGoals(List&lt;Goal&gt; goals) {
          this.goals = goals;
      }
  
  }
  </code></pre>
  
  <p>The wsdl:</p>
  
  <pre><code>&lt;definitions targetNamespace="http://services.andy.org/" name="RecommendationService"&gt;
      &lt;import namespace="http://shitstormrec.org" location="http://localhost:9090/ShitstormRec/RecommendationService?wsdl=1"/&gt;
      &lt;binding name="RecommenderPortBinding" type="ns1:ShitstormRec"&gt;
          &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&gt;
          &lt;operation name="getRecommendation"&gt;
              &lt;soap:operation soapAction=""/&gt;
              &lt;input&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="sayCiao"&gt;
              &lt;soap:operation soapAction=""/&gt;
              &lt;input&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
      &lt;/binding&gt;
      &lt;service name="RecommendationService"&gt;
          &lt;port name="RecommenderPort" binding="tns:RecommenderPortBinding"&gt;
              &lt;soap:address location="http://localhost:9090/ShitstormRec/RecommendationService"/&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>The referenced wsdl from above:</p>
  
  <pre><code>&lt;!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is Metro/2.3.2-b608 (trunk-7979; 2015-01-21T12:50:19+0000) JAXWS-RI/2.2.11-b150120.1832 JAXWS-API/2.2.12 JAXB-RI/2.2.12-b141219.1637 JAXB-API/2.2.13-b141020.1521 svn-revision#unknown. 
  --&gt;&lt;!-- Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is Metro/2.3.2-b608 (trunk-7979; 2015-01-21T12:50:19+0000) JAXWS-RI/2.2.11-b150120.1832 JAXWS-API/2.2.12 JAXB-RI/2.2.12-b141219.1637 JAXB-API/2.2.13-b141020.1521 svn-revision#unknown. 
  --&gt;&lt;definitions targetNamespace="http://shitstormrec.org"&gt;
      &lt;types&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import namespace="http://shitstormrec.org" schemaLocation="http://localhost:9090/ShitstormRec/RecommendationService?xsd=1"/&gt;
          &lt;/xsd:schema&gt;
      &lt;/types&gt;
      &lt;message name="getRecommendation"&gt;
          &lt;part name="parameters" element="tns:getRecommendation"/&gt;
      &lt;/message&gt;
      &lt;message name="getRecommendationResponse"&gt;
          &lt;part name="parameters" element="tns:getRecommendationResponse"/&gt;
      &lt;/message&gt;
      &lt;message name="sayCiao"&gt;
          &lt;part name="parameters" element="tns:sayCiao"/&gt;
      &lt;/message&gt;
      &lt;message name="sayCiaoResponse"&gt;
          &lt;part name="parameters" element="tns:sayCiaoResponse"/&gt;
      &lt;/message&gt;
      &lt;portType name="ShitstormRec"&gt;
          &lt;operation name="getRecommendation"&gt;
              &lt;input ns1:Action="http://shitstormrec.org/ShitstormRec/getRecommendationRequest" message="tns:getRecommendation"/&gt;
              &lt;output ns2:Action="http://shitstormrec.org/ShitstormRec/getRecommendationResponse" message="tns:getRecommendationResponse"/&gt;
          &lt;/operation&gt;
          &lt;operation name="sayCiao"&gt;
              &lt;input ns3:Action="http://shitstormrec.org/ShitstormRec/sayCiaoRequest" message="tns:sayCiao"/&gt;
              &lt;output ns4:Action="http://shitstormrec.org/ShitstormRec/sayCiaoResponse" message="tns:sayCiaoResponse"/&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>The XSD-Schema:</p>
  
  <pre><code>&lt;!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is Metro/2.3.2-b608 (trunk-7979; 2015-01-21T12:50:19+0000) JAXWS-RI/2.2.11-b150120.1832 JAXWS-API/2.2.12 JAXB-RI/2.2.12-b141219.1637 JAXB-API/2.2.13-b141020.1521 svn-revision#unknown. 
  --&gt;&lt;xs:schema version="1.0" targetNamespace="http://shitstormrec.org"&gt;
      &lt;xs:element name="getRecommendation" type="tns:getRecommendation"/&gt;
      &lt;xs:element name="getRecommendationResponse" type="tns:getRecommendationResponse"/&gt;
      &lt;xs:element name="goal" type="tns:goal"/&gt;
      &lt;xs:element name="processVariable" type="tns:processVariable"/&gt;
      &lt;xs:element name="recommendation" type="tns:recommendation"/&gt;
      &lt;xs:element name="recommendationRequest" type="tns:recommendationRequest"/&gt;
      &lt;xs:element name="sayCiao" type="tns:sayCiao"/&gt;
      &lt;xs:element name="sayCiaoResponse" type="tns:sayCiaoResponse"/&gt;
      &lt;xs:complexType name="sayCiao"&gt;
          &lt;xs:sequence/&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="sayCiaoResponse"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="say" type="xs:string" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="getRecommendation"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="recommendationRequest" type="tns:recommendationRequest" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="recommendationRequest"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="goals" type="tns:goal" nillable="true" minOccurs="0" maxOccurs="unbounded"/&gt;
              &lt;xs:element name="variables" type="tns:processVariable" nillable="true" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="goal"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="goal" type="xs:string" minOccurs="0"/&gt;
              &lt;xs:element name="prio" type="xs:int"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="processVariable"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="name" type="xs:string" minOccurs="0"/&gt;
              &lt;xs:element name="type" type="tns:variableType" minOccurs="0"/&gt;
              &lt;xs:element name="value" type="xs:string" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="getRecommendationResponse"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="recommendations" type="tns:recommendation" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="recommendation"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="benefit" type="xs:int"/&gt;
              &lt;xs:element name="information" type="xs:string" minOccurs="0"/&gt;
              &lt;xs:element name="taskName" type="xs:string" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:simpleType name="variableType"&gt;
          &lt;xs:restriction base="xs:string"&gt;
              &lt;xs:enumeration value="STRING"/&gt;
              &lt;xs:enumeration value="INTEGER"/&gt;
              &lt;xs:enumeration value="DOUBLE"/&gt;
              &lt;xs:enumeration value="OBJECT"/&gt;
          &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>Have i done a mistake?</p>
  
  <p>Thanks a lot for your help =)</p>