How to generate classes using maven jaxb implements serializable - java

I want my all xjc generated classes implementing serializable interface.
After reading solution at post I implemented it but jaxb2-maven-plugin throws below error:
[ERROR] file: mapping.xsd [17,34] org.xml.sax.SAXParseException;
systemId: file:mapping.xsd; lineNumber: 17; columnNumber: 34;
src-annotation: elements can only contain and
elements, but 'globalBindings' was found. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at
My xsd sample:
<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"
jaxb:extensionBindingPrefixes="xjc"
attributeFormDefault="unqualified"
elementFormDefault="qualified">
<xs:element name="MappingFile" type="MappingFileType">
<xs:annotation>
<jaxb:globalBindings>
<xjc:serializable uid="43538530765l"/>
</jaxb:globalBindings>
</xs:annotation>
Maven plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<sources>
<source>xxxx/yyy/mapping.xsd</source>
</sources>
<packageName>xx.yy.zz.jaxp</packageName>
</configuration>
</plugin>
Is there any dependency that i need to use to avoid this exception? Please sugest.

Your binding file should look like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
version="2.1">
<jaxb:globalBindings>
<xjc:serializable uid="1" />
</jaxb:globalBindings>
</jaxb:bindings>
Moreover, touch your binding file in a specific directory and reference it in the maven plugin specific configuration.
Example:
<configuration>
<sources>
<source>src/main/xjb/xsd</source>
</sources>
<packageName>xx.yy.zz.jaxp</packageName>
<xjbSources>
<xjbSource>src/main/xjb/jaxb-bindings.xjb</xjbSource>
</xjbSources>
</configuration>

Related

JAXB XJC: how to resolve XSD to Java property conflicts?

I'm trying to generate Java classes starting from an XML Schema Definition
but I'm getting an error about a Property "Lang" is already defined.
[ERROR] http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd [302,52]
com.sun.istack.SAXParseException2: Property "Lang" is already defined. Use <jaxb:property> to resolve this conflict.
[ERROR] http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd [303,35]
com.sun.istack.SAXParseException2
The XSD I'm using defines the Common Weakness Enumeration (CWE) and is located at https://cwe.mitre.org/data/xsd/cwe_schema_v6.10.xsd
A short command to reproduce the error is:
xjc http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
This is my pom.xml
<build>
<plugins>
<!-- https://www.mojohaus.org/jaxb2-maven-plugin/#/repo -->
<!-- https://www.mojohaus.org/jaxb2-maven-plugin/Documentation/v3.1.0/index.html -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<sources>
<source>_schema_/cwe</source>
</sources>
<xjbSources>
<xjbSource>${basedir}/cti-domain/src/main/xjb</xjbSource>
</xjbSources>
<outputDirectory>${basedir}/cti-domain/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
and this is my attempt to fix the error:
<!-- cti-domain/src/main/xjb/cwe-bindings.xjb -->
<jxb:bindings version="1.0"
xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="../../../../_schema_/cwe/cwe_schema_v6.10.xsd" node="//xsd:schema">
<jxb:schemaBindings>
<jxb:package name="com.example.cwe"/>
</jxb:schemaBindings>
<!-- <jxb:bindings schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" node="//xsd:schema">-->
<!-- <jxb:property name="Language"/>-->
<!-- </jxb:bindings>-->
</jxb:bindings>
</jxb:bindings>
You need to rename the 'lang' property at line 302 & line 1166 in http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd to something that does not clash, eg 'langAttribute'
The first 'lang' is in the last line in the snippet of xhtml1-strict.xsd below:
<xs:element name="bdo">
<xs:annotation>
<xs:documentation>
I18N BiDi over-ride
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="Inline">
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="events"/>
<xs:attribute name="lang" type="LanguageCode"/>
This is what should be in the xjb file:
<!-- cti-domain/src/main/xjb/cwe-bindings.xjb -->
<jxb:bindings version="3.0"
xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" node="//xsd:schema">
<jxb:schemaBindings>
<jxb:package name="com.example.cwe"/>
</jxb:schemaBindings>
<!-- rename the 'lang' attribute on line 302 to 'langAttribute' -->
<jxb:bindings node="//xsd:attributeGroup[#name='i18n']/xsd:attribute[#name='lang']">
<jxb:property name="langAttribute"/>
</jxb:bindings>
<!-- rename the 'lang' attribute on line 1166 to 'langAttribute' -->
<jxb:bindings node="//xsd:element[#name='bdo']/xsd:complexType/xsd:complexContent/xsd:extension/xsd:attribute[#name='lang']">
<jxb:property name="langAttribute"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
I have tested with jaxb-ri-4.0.1 w jdk-17.0.2_8* with command line:
xjc http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd -b cwe-bindings.xjb
Output starts like this:
parsing a schema...
compiling a schema...
com\example\cwe\A.java
com\example\cwe\AContent.java
com\example\cwe\Abbr.java
also works with jaxb-ri-2.3.0 and jdk1.8.0_231 - with jxb:bindings version="1.0" and xmlns:jxb="http://java.sun.com/xml/ns/jaxb"

XJB and JAXB binding on simpleType with same name

I'm trying to generate JAVA code with jaxb and spring but I can't get it to work when I have as wsdl file with 2 simpleTypes with the same name but in different namespaces. Does anyone know how I can solve this?
I've been trying out the jaxb:factoryMethod tag but I can't get the syntax correct. But maybe there is a simpler way?
binding.xjb
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:annox="http://annox.dev.java.net"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
jaxb:extensionBindingPrefixes="xjc annox"
version="2.1"
targetNamespace="http://com.company/generated"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<jaxb:globalBindings>
</jaxb:globalBindings>
<jaxb:bindings
node="/wsdl:definitions/wsdl:types/xs:schema[namespace::*[.='http://com.company/storetaxinformation']]/xs:simpleType[#name='TypeOfTax']"
schemaLocation="../../../target/classes/disb.wsdl">
<annox:annotateClass>#javax.xml.bind.annotation.XmlRootElement(name="TypeOfTaxStoreTax")</annox:annotateClass>
</jaxb:bindings>
<jaxb:bindings
node="/wsdl:definitions/wsdl:types/xs:schema[namespace::*[.='http://com.company/gettaxinformation']]/xs:simpleType[#name='TypeOfTax']"
schemaLocation="../../../target/classes/disb.wsdl">
<annox:annotateClass>#javax.xml.bind.annotation.XmlRootElement(name="TypeOfTaxInfo")</annox:annotateClass>
</jaxb:bindings>
</jaxb:bindings>
error.log
[ERROR] Error while generating code.Location [ file:/C:/wsdl/disb.wsdl{49,52}].
com.sun.istack.SAXParseException2; systemId: file:/C:/wsdl/disb.wsdl;
lineNumber: 49; columnNumber: 52; Two declarations cause a collision in the ObjectFactory class.
No, #XmlRootElement won't help. It's about method names in ObjectFactory.
Are you sure it's simple types which cause a collision? XJC is pointing out to methods in the ObjectFactory, so it should be global elments, not simple types
Here's an example of the factoryMethod customization:
<jaxb:bindings
schemaLocation="http://schemas.opengis.net/citygml/texturedsurface/1.0/texturedSurface.xsd"
node="/xs:schema">
<jaxb:bindings node="xs:element[#name='_Appearance']">
<jaxb:factoryMethod name="AAppearance"/>
</jaxb:bindings>
</jaxb:bindings>
You'll need to find out which elements cause a collision and customize them. Not the simple types.
We have solved this now and it was the <generatePackage> element that was causing part of the problem. We also made sure to bind each schema/namespace to its own package. This way the ObjectFactory Classes won't complain.
pom.xml
...
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<id>generate-sources-servicename</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<!-- see binding.xjb
<generatePackage>com.company.generated</generatePackage>
-->
<extension>true</extension>
<forceRegenerate>true</forceRegenerate>
<bindingIncludes>
...
binding.xjb
<jaxb:bindings schemaLocation="../../../target/classes/disb.wsdl"
node="/wsdl:definitions/wsdl:types/xs:schema[#targetNamespace='http://com.company/generated/storetax']" >
<jaxb:schemaBindings>
<jaxb:package name="com.company.generated.storetax"></jaxb:package>
</jaxb:schemaBindings>
</jaxb:bindings>
<jaxb:bindings schemaLocation="../../../target/classes/disb.wsdl"
node="/wsdl:definitions/wsdl:types/xs:schema[#targetNamespace='http://com.company/storeaccount']" >
<jaxb:schemaBindings>
<jaxb:package name="com.company.generated.storeaccount"></jaxb:package>
</jaxb:schemaBindings>
</jaxb:bindings>

JAXWS: How to change CXF-generated classes names defined in external XSD?

I'm trying to change name of a class generated from wsdl (I don't want to modify any wsdl or xsd file directly). The problem is that its definition is in a separate xsd file.
The structrure of wsdl looks like this:
main.wsdl:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo.bar/zee">
<wsdl:import location="typedef.wsdl" namespace="http://foo.bar/wee">
</wsdl:import>
...
</wsdl:definitions>
typedef.wsdl:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Foo" targetNamespace="http://foo.bar/wee">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://foo.bar/wee/schema" schemaLocation="FooBar.xsd"/>
</xsd:schema>
</wsdl:types>
...
<wsdl:definitions>
FooBar.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://foo.bar/wee/schema">
...
<xsd:complexType name="FooType">
<xsd:sequence>
...
</xsd:complexType>
</xsd:schema>
Now let's say I want to rename the FooType class to Foo. After reading this: JAXB: How to change XJC-generated classes names when attr type is specified in XSD? I've created a following bindings file.
jaxws_bindings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
version="2.1"
wsdlLocation="http://127.0.0.1:8431/Foo/types.wsdl">
<jxb:bindings schemaLocation="http://127.0.0.1:8431/Foo/FooBar.xsd">
<jxb:bindings node="//xs:complexType[#name='FooType']">
<jxb:class name="Foo"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
But all I get is an error:
[ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.0:wsdl2java (generate-sources) on
project foo: Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:2.7.0:wsdl2java failed:
file:/E:/sources/.../jaxws_bindings.xml [8,95]: "http://127.0.0.1:8431/Foo/FooBar.xsd" is not a part of
this compilation. Is this a mistake for "http://127.0.0.1:8431/Foo/FooBar.xsd"? -> [Help 1]
I've already tried everything that came to my mind, but still got nothing close to a success.
Anyone happens to know how to do this?
PS: To generate the classes I use maven cxf codegen plugin with a following configuration in pom.xml:
<build>
<finalName>${project.groupId}.${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://127.0.0.1:8431/Foo/main.wsdl</wsdl>
<extraargs>
<extraarg>-client</extraarg>
</extraargs>
<bindingFiles>
<bindingFile>jaxws_bindings.xml</bindingFile>
</bindingFiles>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I figured this out based on this gist.
While this works with XJC:
<jaxb:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
version="1.0">
<jaxb:bindings schemaLocation="..."
node="/xsd:schema/xsd:element[#name='Bar']">
<jaxb:class name="Foo"/>
</jaxb:bindings>
</jaxb:bindings>
you need this with CXF:
<jaxb:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
version="1.0">
<jaxb:bindings schemaLocation="..."
node="/xsd:schema/xsd:complexType[#name='Case']">
<jaxb:class name="Wat" implClass="bar"/>
</jaxb:bindings>
</jaxb:bindings>
The difference is element vs complexType.

Generate java classes from xsd with jaxb from a choice

I use maven with jaxb to make classes out from a schema. This schema has the following choice:
<tns:choice minOccurs="1" maxOccurs="unbounded">
<tns:element name="video_track" type="tcore:TTrack" minOccurs="1" maxOccurs="1"/>
<tns:element name="audio_track" type="tcore:TTrack" minOccurs="1" maxOccurs="1"/>
</tns:choice>
The meening is, we want a list with x audiotracks and/or x videotracks. We need at least one of an audio or a video track!
When I generate classes with this choice I get the following code:
#XmlElementRefs({
#XmlElementRef(name = "audio_track", type = JAXBElement.class),
#XmlElementRef(name = "video_track", type = JAXBElement.class)
})
protected List<JAXBElement<TTrack>> videoTrackOrAudioTrack;
This is not what we want. I think I loose informations because with the list of TTracks I don't know if this is a video or an audio.
So what am I doing wrong here?
In maven I use org.jvnet.jaxb2.maven2 version 0.8.3
No, you don't lose this information.
You get a list of JAXBElement<TTrack>. So you can check e.getName() to find out if it is an audio or a video track.
You can use my Simplify plugin to get audio and video tracks in separate properties. This is not exactly the model you have in your schema, but pretty close and much easier to use.
This customization:
<xs:complexType name="typeWithReferencesProperty">
<xs:choice maxOccurs="unbounded">
<xs:element name="a" type="someType">
<xs:annotation>
<xs:appinfo>
<simplify:as-element-property/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="b" type="someType"/>
</xs:choice>
</xs:complexType>
Produces:
#XmlElement(name = "a")
protected List<SomeType> a;
#XmlElement(name = "b")
protected List<SomeType> b;
The reason you get this model is the maxOccurs on your choice.
Also consider using xs: or xsd: prefixes for your XML Schema.
I resolved the problem with the simplify approach in a .xjb file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:annox="http://annox.dev.java.net" xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" version="2.1" xmlns:simplify="http://jaxb2-commons.dev.java.net/basic/simplify" extensionBindingPrefixes="simplify">
<jaxb:bindings schemaLocation="http://xxx/Core.xsd">
<jaxb:bindings node="/xs:schema/xs:complexType[#name='TStreamRecorder']/xs:sequence/xs:choice/xs:element[1]">
<simplify:as-element-property />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
To activate this plugin i changed my maven .pom file to:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<id>process-xsd</id>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<args>
<arg>-Xsimplify</arg>
<arg>-Xannotate</arg>
</args>
<schemas>
<schema>
<url>http://xxxConfiguration.xsd</url>
</schema>
</schemas>
<bindingIncludes>
<include>schema/configBinding.xjb</include>
<include>schema/coreBinding.xjb</include>
</bindingIncludes>
</configuration>
</execution>
</executions>
</plugin>
This works perfect for me

Customizing Java packages JAXB wsimport

I'm trying to generate a client with maven and jaxb from a wsdl file with 2 schemas inside and some elements with the same name from different schemas
When I try to execute the compilation I'm getting the next error:
Two declarations cause a collision in the ObjectFactory class.
WSDL schemas:
<wsdl:types>
<schema targetNamespace="http://ws.services" xmlns="http://www.w3.org/2001/XMLSchema">...</schema>
<schema targetNamespace="http://ws.models" xmlns="http://www.w3.org/2001/XMLSchema">...</schema>
</wsdl:types>
I tried renaming the elements that produce the error, but then my spring client receive the correct SOAP message, but it doesn't populate the response object properly (all its attributes are null). I guess the problem might come from renaming the response classes, so that's why I'm trying to generate different packages keeping the original name of all the classes.
In order to do that, I wrote the next bindings file but I don't know what I'm doing wrong that it is not working.
bindings.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings version="2.1"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<jaxb:bindings schemaLocation="mywsdl.wsdl#types?schema1"
node="/xs:schema[#targetNamespace='http://ws.services']">
<jaxb:schemaBindings>
<jaxb:package name="package1" />
</jaxb:schemaBindings>
</jaxb:bindings>
<jaxb:bindings schemaLocation="mywsdl.wsdl#types?schema2"
node="/xs:schema[#targetNamespace='http://ws.models']">
<jaxb:schemaBindings>
<jaxb:package name="package2" />
</jaxb:schemaBindings>
</jaxb:bindings>
</jaxb:bindings>
My configuration part in the maven file is the next, just in case it is useful:
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlLocation>wsdl/mywsdl.wsdl</wsdlLocation>
<wsdlDirectory>src/main/resources/wsdl</wsdlDirectory>
<wsdlFiles>
<wsdlFile>mywsdl.wsdl</wsdlFile>
</wsdlFiles>
<bindingDirectory>src/main/resources/wsdl</bindingDirectory>
<bindingFiles>
<bindingFile>bindings.xml</bindingFile>
</bindingFiles>
<packageName>original.package</packageName>
<sourceDestDir>${basedir}/src/main/java</sourceDestDir>
</configuration>
When I compile with this bindings files, the same error appears. So I think that maybe it isn't right.
Do you find any mistakes?
Thanks.
From my experience it is best to create 2 binding files (one for each WSDL file).
Update your pom.xml accordingly and make sure that the root element of the binding files is jaxws:bindings (and not jaxb:bindings!)
Some hints:
Make sure to set the "wsdlLocation" attribute correctly! It must point to the WSDL file using a relative path!
The jaxws:package determines the package that will be used for the generated service classes. (the stuff annotated with #WebService)
Enable or disable wrapperStyle and asyncMapping as you wish. ;-)
Example binding file for "package1":
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
wsdlLocation="mywsdl.wsdl"
version="2.0">
<jaxws:package name="package1"/>
<jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
<jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
<jaxws:bindings node="//wsdl:definitions/wsdl:types/xs:schema[#targetNamespace='http://ws.services']">
<jaxb:schemaBindings>
<jaxb:package name="package1"/>
</jaxb:schemaBindings>
</jaxws:bindings>
</jaxws:bindings>

Categories