title: Jaxb: Two declarations in a wsdl cause a collision in the objectFactory class
body: <p>I want to work with the Affilinet API. One WSDL File of it is here:</p>
  
  <p><a href="https://api.affili.net/V2.0/AccountService.svc?wsdl" rel="nofollow noreferrer">Affilinet AccountService.wsdl</a></p>
  
  <p>I use this Maven Plugin to generate the source: </p>
  
  <p><a href="https://github.com/highsource/maven-jaxb2-plugin" rel="nofollow noreferrer">Jaxb Maven Plugin</a></p>
  
  <p>My Pom.xml Plugin configuration:</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.13.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;schema1-generate&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;schemaLanguage&gt;WSDL&lt;/schemaLanguage&gt;
                              &lt;generatePackage&gt;webservices.framework.affilinet.logon&lt;/generatePackage&gt;
                              &lt;schemas&gt;
                                  &lt;schema&gt;
                                      &lt;url&gt;https://api.affili.net/V2.0/Logon.svc?wsdl&lt;/url&gt;
                                  &lt;/schema&gt;
                              &lt;/schemas&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                      &lt;id&gt;schema2-generate&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;schemaLanguage&gt;WSDL&lt;/schemaLanguage&gt;
                          &lt;generatePackage&gt;webservices.framework.affilinet.inbox&lt;/generatePackage&gt;
                          &lt;schemas&gt;
                              &lt;schema&gt;
                                  &lt;url&gt;https://api.affili.net/V2.0/PublisherInbox.svc?wsdl&lt;/url&gt;
                              &lt;/schema&gt;
                          &lt;/schemas&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;schema3-generate&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;schemaLanguage&gt;WSDL&lt;/schemaLanguage&gt;
                              &lt;generatePackage&gt;webservices.framework.affilinet.inbox&lt;/generatePackage&gt;
                              &lt;schemas&gt;
                                  &lt;schema&gt;
                                      &lt;url&gt;https://api.affili.net/V2.0/AccountService.svc?wsdl&lt;/url&gt;
                                  &lt;/schema&gt;
                              &lt;/schemas&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>So, when compiling this, i get an error :</p>
  
  <pre><code>com.sun.istack.SAXParseException2; systemId: https://api.affili.net/V2.0/AccountService.svc?wsdl; lineNumber: 1; columnNumber: 2127; Two declarations cause a collision in the objectFactory class.
  </code></pre>
  
  <p>But how do i fix this with a wsdl file from a url?</p>
  
  <p>schemaLocation does not accept the wsdl file....</p>
  
  <p>Edit: Full log:</p>
  
  <pre><code>[ERROR] Error while generating code.Location [ https://api.affili.net/V2.0/AccountService.svc?wsdl{1,6200}].
  </code></pre>
  
  <p>com.sun.istack.SAXParseException2; systemId: <a href="https://api.affili.net/V2.0/AccountService.svc?wsdl" rel="nofollow noreferrer">https://api.affili.net/V2.0/AccountService.svc?wsdl</a>; lineNumber: 1; columnNumber: 6200; This is the other declaration. </p>