SAXParseException2 while generating Java classes from WSDL











up vote
0
down vote

favorite












How to make maven-jaxb2-plugin successfully generate Java classes from given wsdl?



pom:



<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<arg>-XautoNameResolution</arg>
</args>
<!--<generatePackage>com.example.demo.schema.gbg</generatePackage>-->
<generateDirectory>${project.basedir}/src/main/java</generateDirectory>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
<bindingDirectory>${project.basedir}/src/main/resources/bindings/</bindingDirectory>
<bindingIncludes>*.xml</bindingIncludes>
</configuration>
</plugin>


Console:



[ERROR] Error while generating code.Location [ https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0{1,156554}].
com.sun.istack.SAXParseException2; systemId: https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0; lineNumber: 1; columnNumber: 156554; (Related to above error) This is the other declaration.


jaxb-bindings.xml that was copied from sample java project:



<?xml version="1.0" encoding="UTF-8" ?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.1">
<jaxws:bindings
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!-- Name the package consistently (don't use wsdl URI domain name) -->
<jaxws:package name="com.id3global"/>
<!-- Use 'wrapper style rules' to produce Java names - no I don't know what it means either -->
<jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
<!-- Disable generation of asynchronous send/receive methods - might be fun for later though :) -->
<jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>

<!-- Do not generate Element properties - they collide with the type namespace in Java,
and yes, *all* this boilerplate is required for wsimport to apply the setting correctly -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
attributeFormDefault="unqualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1">
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings generateElementProperty="false">
<xjc:serializable/>
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>
</xs:schema>
</jaxws:bindings>
</jaxb:bindings>


A snippet that I am not sure how to integrate and if it would help:



<jaxb:schemaBindings>
<jaxb:nameXmlTransform>
<jaxb:typeName suffix="Element"/>
<jaxb:elementName suffix="Type"/>
</jaxb:nameXmlTransform>
</jaxb:schemaBindings>









share|improve this question




























    up vote
    0
    down vote

    favorite












    How to make maven-jaxb2-plugin successfully generate Java classes from given wsdl?



    pom:



    <plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.14.0</version>
    <executions>
    <execution>
    <goals>
    <goal>generate</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <args>
    <arg>-XautoNameResolution</arg>
    </args>
    <!--<generatePackage>com.example.demo.schema.gbg</generatePackage>-->
    <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
    <schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
    <schemaIncludes>
    <include>*.wsdl</include>
    </schemaIncludes>
    <bindingDirectory>${project.basedir}/src/main/resources/bindings/</bindingDirectory>
    <bindingIncludes>*.xml</bindingIncludes>
    </configuration>
    </plugin>


    Console:



    [ERROR] Error while generating code.Location [ https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0{1,156554}].
    com.sun.istack.SAXParseException2; systemId: https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0; lineNumber: 1; columnNumber: 156554; (Related to above error) This is the other declaration.


    jaxb-bindings.xml that was copied from sample java project:



    <?xml version="1.0" encoding="UTF-8" ?>
    <jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.1">
    <jaxws:bindings
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <!-- Name the package consistently (don't use wsdl URI domain name) -->
    <jaxws:package name="com.id3global"/>
    <!-- Use 'wrapper style rules' to produce Java names - no I don't know what it means either -->
    <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
    <!-- Disable generation of asynchronous send/receive methods - might be fun for later though :) -->
    <jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>

    <!-- Do not generate Element properties - they collide with the type namespace in Java,
    and yes, *all* this boilerplate is required for wsimport to apply the setting correctly -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
    attributeFormDefault="unqualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1">
    <xs:annotation>
    <xs:appinfo>
    <jaxb:globalBindings generateElementProperty="false">
    <xjc:serializable/>
    </jaxb:globalBindings>
    </xs:appinfo>
    </xs:annotation>
    </xs:schema>
    </jaxws:bindings>
    </jaxb:bindings>


    A snippet that I am not sure how to integrate and if it would help:



    <jaxb:schemaBindings>
    <jaxb:nameXmlTransform>
    <jaxb:typeName suffix="Element"/>
    <jaxb:elementName suffix="Type"/>
    </jaxb:nameXmlTransform>
    </jaxb:schemaBindings>









    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      How to make maven-jaxb2-plugin successfully generate Java classes from given wsdl?



      pom:



      <plugin>
      <groupId>org.jvnet.jaxb2.maven2</groupId>
      <artifactId>maven-jaxb2-plugin</artifactId>
      <version>0.14.0</version>
      <executions>
      <execution>
      <goals>
      <goal>generate</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <args>
      <arg>-XautoNameResolution</arg>
      </args>
      <!--<generatePackage>com.example.demo.schema.gbg</generatePackage>-->
      <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
      <schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
      <schemaIncludes>
      <include>*.wsdl</include>
      </schemaIncludes>
      <bindingDirectory>${project.basedir}/src/main/resources/bindings/</bindingDirectory>
      <bindingIncludes>*.xml</bindingIncludes>
      </configuration>
      </plugin>


      Console:



      [ERROR] Error while generating code.Location [ https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0{1,156554}].
      com.sun.istack.SAXParseException2; systemId: https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0; lineNumber: 1; columnNumber: 156554; (Related to above error) This is the other declaration.


      jaxb-bindings.xml that was copied from sample java project:



      <?xml version="1.0" encoding="UTF-8" ?>
      <jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
      xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.1">
      <jaxws:bindings
      xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <!-- Name the package consistently (don't use wsdl URI domain name) -->
      <jaxws:package name="com.id3global"/>
      <!-- Use 'wrapper style rules' to produce Java names - no I don't know what it means either -->
      <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
      <!-- Disable generation of asynchronous send/receive methods - might be fun for later though :) -->
      <jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>

      <!-- Do not generate Element properties - they collide with the type namespace in Java,
      and yes, *all* this boilerplate is required for wsimport to apply the setting correctly -->
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
      xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"
      xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      attributeFormDefault="unqualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1">
      <xs:annotation>
      <xs:appinfo>
      <jaxb:globalBindings generateElementProperty="false">
      <xjc:serializable/>
      </jaxb:globalBindings>
      </xs:appinfo>
      </xs:annotation>
      </xs:schema>
      </jaxws:bindings>
      </jaxb:bindings>


      A snippet that I am not sure how to integrate and if it would help:



      <jaxb:schemaBindings>
      <jaxb:nameXmlTransform>
      <jaxb:typeName suffix="Element"/>
      <jaxb:elementName suffix="Type"/>
      </jaxb:nameXmlTransform>
      </jaxb:schemaBindings>









      share|improve this question















      How to make maven-jaxb2-plugin successfully generate Java classes from given wsdl?



      pom:



      <plugin>
      <groupId>org.jvnet.jaxb2.maven2</groupId>
      <artifactId>maven-jaxb2-plugin</artifactId>
      <version>0.14.0</version>
      <executions>
      <execution>
      <goals>
      <goal>generate</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <args>
      <arg>-XautoNameResolution</arg>
      </args>
      <!--<generatePackage>com.example.demo.schema.gbg</generatePackage>-->
      <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
      <schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
      <schemaIncludes>
      <include>*.wsdl</include>
      </schemaIncludes>
      <bindingDirectory>${project.basedir}/src/main/resources/bindings/</bindingDirectory>
      <bindingIncludes>*.xml</bindingIncludes>
      </configuration>
      </plugin>


      Console:



      [ERROR] Error while generating code.Location [ https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0{1,156554}].
      com.sun.istack.SAXParseException2; systemId: https://pilot.id3global.com/ID3gWS/ID3global.svc?xsd=xsd0; lineNumber: 1; columnNumber: 156554; (Related to above error) This is the other declaration.


      jaxb-bindings.xml that was copied from sample java project:



      <?xml version="1.0" encoding="UTF-8" ?>
      <jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
      xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.1">
      <jaxws:bindings
      xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <!-- Name the package consistently (don't use wsdl URI domain name) -->
      <jaxws:package name="com.id3global"/>
      <!-- Use 'wrapper style rules' to produce Java names - no I don't know what it means either -->
      <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
      <!-- Disable generation of asynchronous send/receive methods - might be fun for later though :) -->
      <jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>

      <!-- Do not generate Element properties - they collide with the type namespace in Java,
      and yes, *all* this boilerplate is required for wsimport to apply the setting correctly -->
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
      xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"
      xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      attributeFormDefault="unqualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1">
      <xs:annotation>
      <xs:appinfo>
      <jaxb:globalBindings generateElementProperty="false">
      <xjc:serializable/>
      </jaxb:globalBindings>
      </xs:appinfo>
      </xs:annotation>
      </xs:schema>
      </jaxws:bindings>
      </jaxb:bindings>


      A snippet that I am not sure how to integrate and if it would help:



      <jaxb:schemaBindings>
      <jaxb:nameXmlTransform>
      <jaxb:typeName suffix="Element"/>
      <jaxb:elementName suffix="Type"/>
      </jaxb:nameXmlTransform>
      </jaxb:schemaBindings>






      java jaxb wsdl






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 16 hours ago

























      asked 17 hours ago









      J.Olufsen

      5,3443392151




      5,3443392151





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371832%2fsaxparseexception2-while-generating-java-classes-from-wsdl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371832%2fsaxparseexception2-while-generating-java-classes-from-wsdl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          'app-layout' is not a known element: how to share Component with different Modules

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          WPF add header to Image with URL pettitions [duplicate]