cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Commented: (CXF-2183) wsdl2java "only one global bindings customization is allowed" with embedded imported schema namespace
Date Thu, 10 Dec 2009 14:51:18 GMT


Daniel Kulp commented on CXF-2183:

As far as I can tell this is completely working correctly as per both jaxws and jaxb specs.

1) The "?wsdl" issue is due to the wsdlLocation in the bindings file.   If you set the wsdlLocation
to the ?wsdl URL, it should work. (or produce the same error as with a local wsdl)   (there
is a possibility that just omitting the wsdlLocation in the binding file entirely might work.
 Christian and I were talking about that a few days ago)

2) The GregService.xjb does, indeed, have two jxb:globalBindings sections.   Thus, the error.
   JAXB only allows one in a compilation unit and it applies to ALL schemas in the compilation
unit.   This is per jaxb spec.   

I checked the RI and it produces pretty much the exact same error with this wsdl/xjb.

If someone else has a different test case that really does not have two globalBindings sections,
please attach it here.

> wsdl2java "only one global bindings customization is allowed" with embedded imported
schema namespace
> -----------------------------------------------------------------------------------------------------
>                 Key: CXF-2183
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.1.4
>         Environment: CXF 2.1.4, JDK build 1.5.0_12-b04, Windows XP-64
>            Reporter: Bob Fields
>         Attachments:
> Error "WSDLToJava Error: Thrown by JAXB : only one globalBindings customization is allowed
in a whole compilation" is returned when using a databinding xjb file against a wsdl with
embedded referenced schema namespace. There is only one globalBindings customization, despite
what the error says. The same wsdl2java process works fine when the schema is extracted to
an external file and referenced in the wsdl through schemaLocation, no other difference in
the bindings or wsdl2java parameters.
> Example attached: wsdl2.log shows the error. Bindings are meant to change XMLGregorianCalendar
to Date. GregService.wsdl and GregService.xjb were generated by java2ws from working java
code, and return the error. GregServiceA3.wsdl and .xjb work perfectly fine. The only difference
in the wsdl files is:
>    <xs:import namespace="" />
> ...
>   <xs:schema xmlns:xs=""
>    xmlns:tns="" attributeFormDefault="unqualified"
>    elementFormDefault="qualified" targetNamespace="">
>    <xs:element name="dates" type="tns:Dates" />
>    <xs:complexType name="Dates">
>     <xs:sequence />
>     <xs:attribute name="startDate" type="xs:date" use="required" />
>     <xs:attribute name="endDate" type="xs:date" use="required" />
>    </xs:complexType>
>   </xs:schema>
>         <xs:import namespace="" xmlns=""
> ...
> Same namespace information above in an external xsd/ schema file.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message