Skip to main content

[wsimport] SAXParseException2: The "schemaBindings" customization is not...

9 replies [Last post]
vijjj
Offline
Joined: 2006-08-22

Context:
Trying to generate webservice client artifacts from WSDL file...using wsimport ant task in Maven2.

The error I am getting.
-------------
[wsimport] command line: wsimport -d D:\CALOGI\WebServices\cls-export-wsclient\target -keep -verbose D:\CALOGI\WebServi
ces\cls-export-wsclient/src/main/wsdl/GuideLineService.wsdl -b D:\CALOGI\WebServices\cls-export-wsclient\src\main\resour
ces\custom-client.xml
[wsimport] error: JAXB version attribute must be "1.0"
[wsimport] line 4 of http://dummy.pseudo-schema#schema2

[wsimport] error: The "schemaBindings" customization is not associated with any schema element.
[wsimport] line 7 of http://dummy.pseudo-schema#schema2

com.sun.istack.SAXParseException2: The "schemaBindings" customization is not associated with any schema element.
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:211)
at com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:87)
at com.sun.tools.ws.processor.Processor.runModeler(Processor.java:81)
at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:557)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
---------------

Any idea why it is coming?
I am getting the same error when I am not using custom binding!!! why is it referring the dummy-psuedo schema...

The dependent api/impl jars used are from java.net maven repository....

Thanks
Vijesh

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dob
Offline
Joined: 2003-06-23

Was the original NoClassDefFoundError solved? I'm trying maven plugin with fresh jax-ws 2.1 and I had to include:

javax.jws
jsr181-api
1.0-MR1

both in pom and plugin dependencies to get it working.

Regards,
Diego

kohsuke
Offline
Joined: 2003-06-09
kohsuke
Offline
Joined: 2003-06-09

Which version of the JAX-WS RI are you using? Can you file an issue on http://jax-ws.dev.java.net/issues/ and file a test case?

vijjj
Offline
Joined: 2006-08-22

Thanks kohsuke for the response.

By taking latest available SNAPSHOT versions of jars and adding a few more additional jars I have managed to generate the client artefacts. I am a much relieved man now :).

But I do have a few questions.

jsr173_api or stax-api ?. pom is in the name stax-api but jar name has jsr173_api !!!. Some pom files have dependency to stax-api and others to jsr173_api. Both are same, but how come this descrepancies?

I had to add jsr181-api.jar to my dependcies. Otherwise I got java.lang.NoClassDefFoundError: javax/jws/WebParam$Mode. It doesn't seem to be available in maven repository, or is it known in another name?

Here is my dependecies. Please validate it.


com.sun.xml.messaging.saaj
saaj-impl
1.3-SNAPSHOT


com.sun.xml.stream
sjsxp
1.0
jar


com.sun.xml.stream.buffer
streambuffer
0.2
jar


com.sun.xml.bind
jaxb-xjc
2.1-SNAPSHOT
jar


com.sun.xml.ws
jaxws-tools
-2.1-SNAPSHOT
jar


com.sun.xml.ws
jaxws-rt
-2.1-SNAPSHOT
jar


javax.xml.bind
jsr181-api
1.0
jar


com.sun
tools
1.5.0_09
system
${java.home}/../lib/tools.jar

Here is the plugin part in my pom.xml. In case somebody is interested (it requires improvement though)

org.apache.maven.plugins
maven-compiler-plugin

1.5
1.5

maven-antrun-plugin

generate-sources

Running WSImport...



debug="false"
verbose="true"
keep="true"
destdir="${basedir}/target/classes"
wsdl="${basedir}/src/main/wsdl/GuideLineService.wsdl">




run





src/main

**/*.xml
**/*.wsdl

false


Regards,
Vijesh

Message was edited by: vijjj ; Removed unnecessary dependencies

kohsuke
Offline
Joined: 2003-06-09

> jsr173_api or stax-api ?. pom is in the name stax-api but jar name has jsr173_api !!!.
> Some pom files have dependency to stax-api and others to jsr173_api. Both are same, but how come this descrepancies?

If you can tell me what POM files to fix, I can fix them.

> I had to add jsr181-api.jar to my dependcies.
> Otherwise I got java.lang.NoClassDefFoundError:
> javax/jws/WebParam$Mode. It doesn't seem to be
> available in maven repository, or is it known in
> another name?

I think you are right. This jar is not available. If you can file that as an issue to the issue tracker that would be great.

Finally, if you are using m2, you shouldn't have to list all the dependencies manually. The transitive dependency suuport in JAX-WS should be able to pull everything JAXB/StAX related.

vijjj
Offline
Joined: 2006-08-22

Hi kohsuke,
Thank you for your continued response.

I know the transitive nature of m2 and will fine tune the dependencies list.

Here is the issue I raised for jsr181-api jar and other seemingly maven repository related issues.

https://jax-ws-sources.dev.java.net/issues/show_bug.cgi?id=35

The project name looks different, but here is where I ended up when I came from JAX-WS RI page.

Vijesh

kohsuke
Offline
Joined: 2003-06-09

Do you remember how you get there?

If I click "issue tracker" from the top page, http://jax-ws.dev.java.net/, I'll get to the issue tracker of jax-ws project, not jax-ws-sources project.

vijjj
Offline
Joined: 2006-08-22

I had used the "Issue Tracker" link under the support section in the main page body, which obviously points to the wrong destination.

Now I have used the link in the left panel and reached the right destination.

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=119

kohsuke
Offline
Joined: 2003-06-09

Thanks. Link fixed.