title: missing prefix in soap request using jax-ws
body: <p>In a Java project I created a webservice client using jax-ws and a wsdl. The request is valid xml but missing a prefix which is needed in this specific soap call. Currently I solve this by manually adding  xmlns={@javax.xml.bind.annotation.XmlNs(prefix="gen", namespaceURI="http://schemas...")}) to the package-info.java class but feel this is not the best solution because the package-info is automatically created and my solution will be overwritten if for any reason the sources are generated again. </p>
  
  <p>I suspect there is something missing in my wsdl.</p>
  
  <p>Here's the wsdl:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;wsdl:definitions xmlns:tns="http://xmlns.example.com/1308658932768" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://schemas.triennium.com/Servicepunt/gen" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="Untitled" targetNamespace="http://xmlns.example.com/1308658932768"&gt;
          &lt;wsdl:types&gt;
          &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns="http://schemas.triennium.com/Servicepunt/gen"
       targetNamespace="http://schemas.triennium.com/Servicepunt/gen"
       elementFormDefault="qualified"
       attributeFormDefault="unqualified"&gt;
              &lt;xs:element name="CallInfo"&gt;
                  &lt;xs:complexType&gt;
                      ...
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element name="ResponseStatus"&gt;
                  &lt;xs:complexType&gt;
                      ...
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element name="Credentials"&gt;
                  &lt;xs:complexType&gt;
                      ...
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element name="AuthenticateAannemerRequest"&gt;
                  &lt;xs:complexType&gt;
                      ...
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element name="AuthenticateAannemerResponse"&gt;
                  &lt;xs:complexType&gt;
                      ...
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
          &lt;/xs:schema&gt;
      &lt;/wsdl:types&gt;
      &lt;wsdl:service name="WSDL_Generator.2.0.2"&gt;
          &lt;wsdl:port name="AuthenticateAannemer.2.0.2" binding="tns:AuthenticateAannemer.2.0.2Binding"&gt;
              &lt;soap:address location="http://10.11.2.12:2592"/&gt;
          &lt;/wsdl:port&gt;
      &lt;/wsdl:service&gt;
      &lt;wsdl:portType name="AuthenticateAannemer"&gt;
          &lt;wsdl:operation name="AuthenticateAannemer"&gt;
              &lt;wsdl:input message="tns:AuthenticateAannemerRequest"/&gt;
              &lt;wsdl:output message="tns:AuthenticateAannemerResponse"/&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:portType&gt;
      &lt;wsdl:binding name="AuthenticateAannemer.2.0.2Binding" type="tns:AuthenticateAannemer"&gt;
          &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
          &lt;wsdl:operation name="AuthenticateAannemer"&gt;
              &lt;soap:operation style="document" soapAction="/AuthenticateAannemer.2.0.2/AuthenticateAannemer"/&gt;
              &lt;wsdl:input&gt;
                  &lt;soap:body use="literal" parts="input"/&gt;
              &lt;/wsdl:input&gt;
              &lt;wsdl:output&gt;
                  &lt;soap:body use="literal" parts="output"/&gt;
              &lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:binding&gt;
      &lt;wsdl:message name="AuthenticateAannemerRequest"&gt;
          &lt;wsdl:part name="input" element="ns0:AuthenticateAannemerRequest"/&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="AuthenticateAannemerResponse"&gt;
          &lt;wsdl:part name="output" element="ns0:AuthenticateAannemerResponse"/&gt;
      &lt;/wsdl:message&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>Here's the request without the prefix:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;S:Body&gt;
          &lt;AuthenticateAannemerRequest   xmlns="http://schemas.triennium.com/Servicepunt/gen"&gt;
              &lt;CallInfo&gt;
                  &lt;Customer&gt;...&lt;/Customer&gt;
                  &lt;Module&gt;...&lt;/Module&gt;
                  &lt;Version&gt;...&lt;/Version&gt;
              &lt;/CallInfo&gt;
              &lt;Credentials&gt;
                  &lt;Username&gt;...&lt;/Username&gt;
                  &lt;Password&gt;...&lt;/Password&gt;
              &lt;/Credentials&gt;
          &lt;/AuthenticateAannemerRequest&gt;
      &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p>Here's the request as I want it to be:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;S:Body&gt;
          &lt;gen:AuthenticateAannemerRequest xmlns:gen="http://schemas.triennium.com/Servicepunt/gen"&gt;
              &lt;gen:CallInfo&gt;
                  &lt;gen:Customer&gt;...&lt;/Customer&gt;
                  &lt;gen:Module&gt;...&lt;/Module&gt;
                  &lt;gen:Version&gt;...&lt;/Version&gt;
              &lt;/gen:CallInfo&gt;
              &lt;gen:Credentials&gt;
                  &lt;gen:Username&gt;...&lt;/Username&gt;
                  &lt;gen:Password&gt;...&lt;/Password&gt;
              &lt;/gen:Credentials&gt;
          &lt;/gen:AuthenticateAannemerRequest&gt;
      &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p>edit: added prefix to namespacedeclaration in the second example, Which was there to start with, but was lost somehow while c/p the code.</p>