dev@jax-ws.java.net

Re: Binding customization for binding addressing types

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Wed, 20 Sep 2006 17:29:37 -0700

Thnaks Kohsuke, The w3c binding you provided works fine. So I added one
for Member Submission EPR and tried to compile both these binding files
but jaxb schemaCompiler doesnt like it.

Ok, so I have

for member submission:
<bindings
  xmlns="http://java.sun.com/xml/ns/jaxb"
  xmlns:wsms="http://schemas.xmlsoap.org/ws/2004/08/addressing"
  version="2.1">
 
  <bindings scd="x-schema::wsms" if-exists="true">
    <schemaBindings map="false" />
    <bindings scd="wsms:EndpointReference">
      <class
ref="com.sun.xml.ws.api.addressing.MemberSubmissionEndpointReference"/>
    </bindings>
    <bindings scd="~wsms:EndpointReferenceType">
      <class
ref="com.sun.xml.ws.api.addressing.MemberSubmissionEndpointReference"/>
    </bindings>
  </bindings>
</bindings>


and the one below provided by you for w3c binding.

My code looks like:

schemaCompiler.parseSchema(msSource); //1
schemaCompiler.parseSchema(w3cSource); //2
schemaCompiler.bind();

results in:

error: SCD "~wsa:EndpointReferenceType" didnt match any schema component
  line 11 of http://dummy.pseudo-schema#schema1

error: SCD "~wsa:EndpointReferenceType" didnt match any schema component
  line 11 of http://dummy.pseudo-schema#schema1

error: EndpointReferenceType complex type is in a referenced schema and
do not h
ave the corresponding Java class specified by <jaxb:class ref="..."/>
customizat
ion. Therefore it cannot be referenced from outside.
  line 44 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: return element declaration
  line 36 of
file:/C:/ws/test-rearch/test/build/temp/WEB-INF/wsdl/AddNumbersServ
ice_schema1.xsd

error: AttributedURI complex type is in a referenced schema and do not
have the
corresponding Java class specified by <jaxb:class ref="..."/>
customization. The
refore it cannot be referenced from outside.
  line 126 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: Address element declaration
  line 46 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: ReferencePropertiesType complex type is in a referenced schema
and do not
 have the corresponding Java class specified by <jaxb:class ref="..."/>
customiz
ation. Therefore it cannot be referenced from outside.
  line 61 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: ReferenceProperties element declaration
  line 47 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: ReferenceParametersType complex type is in a referenced schema
and do not
 have the corresponding Java class specified by <jaxb:class ref="..."/>
customiz
ation. Therefore it cannot be referenced from outside.
  line 66 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: ReferenceParameters element declaration
  line 48 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: AttributedQName complex type is in a referenced schema and do not
have th
e corresponding Java class specified by <jaxb:class ref="..."/>
customization. T
herefore it cannot be referenced from outside.
  line 119 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: PortType element declaration
  line 49 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: ServiceNameType complex type is in a referenced schema and do not
have th
e corresponding Java class specified by <jaxb:class ref="..."/>
customization. T
herefore it cannot be referenced from outside.
  line 71 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: (related to above) The schema for namespace
"http://schemas.xmlsoap.org/w
s/2004/08/addressing" (which includes the above component) is designated
for ref
erence only by this customization.
  line 12 of http://dummy.pseudo-schema#schema1

error: (related to above) The problematic schema component is referenced
from th
is component: ServiceName element declaration
  line 50 of http://schemas.xmlsoap.org/ws/2004/08/addressing/

error: com.sun.istack.SAXParseException2: (related to above) The
problematic sch
ema component is referenced from this component: ServiceName element
declaration


Command invoked: wsimport C:\jdk\jre\bin\java.exe -d
C:\ws\test-rearch\test\buil
d\temp\classes -keep
C:\ws\test-rearch\test\build\temp\WEB-INF\wsdl\AddNumbersSe
rvice.wsdl -b
C:\ws\test-rearch\test\build\temp\client-schema-binding.xml -b C:\
ws\test-rearch\test\build\temp\temp-config.xml

BUILD FAILED

If I try to parse only 1 or 2 then it works fine. The problem is when I
try to parse both the bindings.

-vivek.

Kohsuke Kawaguchi wrote:
>
> See the attached.
>
> I found some bugs in the RI while writing this, so please make sure to
> use the latest JAXB RI. (#149 or later)
>
> http://kohsuke.sfbay/hudson/job/jaxb-ri-2.1/
>
> ------------------------------------------------------------------------
>
> <bindings
> xmlns="http://java.sun.com/xml/ns/jaxb"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> version="2.1">
>
> <bindings scd="x-schema::wsa" if-exists="true">
> <schemaBindings map="false" />
> <bindings scd="wsa:EndpointReference">
> <class ref="javax.xml.ws.w3caddressing.W3CEndpointReference"/>
> </bindings>
> <bindings scd="~wsa:EndpointReferenceType">
> <class ref="javax.xml.ws.w3caddressing.W3CEndpointReference"/>
> </bindings>
> </bindings>
> </bindings>