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>
java jaxb wsdl
add a comment |
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>
java jaxb wsdl
add a comment |
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>
java jaxb wsdl
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
java jaxb wsdl
edited 16 hours ago
asked 17 hours ago
J.Olufsen
5,3443392151
5,3443392151
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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