users@jaxb.java.net

RE: Error using custom (external) bindings with WSDL

From: Vallamshettla, Anand <Anand.Vallamshettla_at_tgslc.org>
Date: Fri, 26 May 2006 09:15:21 -0500

I looked at the binding file, namespace prefix on node element is wrong.
It doesn't match with the declaration in the root element.

<jxb:bindings ....... xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <jxb:bindings node="//s:schema[@targetNamespace='...']">

It the node value '//s' a typo? If not, it should be '/xs' (NOTE: only
one '/')

<jxb:bindings node="/xs:schema[@targetNamespace='...']">


Thanks
Anand


-----Original Message-----
From: Stefan Freyr Stefansson [mailto:stfs_at_hugsmidjan.is]
Sent: Thursday, May 25, 2006 5:45 PM
To: users_at_jaxb.dev.java.net
Subject: Error using custom (external) bindings with WSDL

Hello everyone.

I'm trying to create an external binding definition file to specify the
package into which classes for a particular namespace should be put.

I've searched high and low and I haven't really found anything that
describes
my scenario exactly. I've found some examples where the name of the XSD
file
is used to dictate the package name but I'm using a single WSDL file
with a
few schema definitions "embedded" so I have to use the actual
targetNamespace
attribute in each <s:schema> element.

I'm attaching a wsdl file and a jaxb-binding definition file that
demonstrate
my problem. I'm running xjc in the following way:

xjc.sh -d gen/ -wsdl -verbose one.wsdl -b jaxb-bindings.xml

And the error I'm getting is:

parsing a schema...
[ERROR] XPath error: null
  line 2 of file:/home/stefan/hugsmidjan/tmp/jaxb-test/jaxb-bindings.xml

[ERROR] XPath error: null
  line 7 of file:/home/stefan/hugsmidjan/tmp/jaxb-test/jaxb-bindings.xml

Can anyone point to what I'm doing wrong? Any help with this would be
greatly
appreciated.

Kind regards, Stefan Freyr.