Adrian,
Just dug into these and found a bunch of issues with the applications of
the bindings file. Thanks for the test cases.
In the "case 2" that you have, it MIGHT work if you add a top level
xsd:annotation/xsd:appinfo element to the schema. It can be blank, but
it should be. The code seems to be using the wrong method to find it
and it's actually finding the first in the whole tree, not the immediate
child of schema. Thus, the global binding stuff is added to the one in
TestEnum and then screwing everything up.
"case 3" has other issues. Digging into the code, there are definite
issues if a jaxws:bindings element has multiple jaxb binding things in
it. It looks like only the first jaxb:bindings element is honored and
jaxb:globalBindings isn't honored at all if there is a jaxb:bindings.
Thus, you MAY be able to work around it with multiple jaxws:bindings
elements, each with a single jaxb extensor in it.
In anycase, I should have fixes for it shortly. With the Apache SVN
issues, I'm not sure if I'll get it committed today or not.
Dan
Adrian C wrote:
Hi Glen
Thanks for the reply - there are so many connotations of this its crazy! :)
But have created a JIRA issue.
https://issues.apache.org/jira/browse/CXF-1565
There seems to be a work around, however its not one that will work for me.
There is an interoperability issue between CXF and .NET 2.0 ... problem
seems to be on the .net side. .NET 2.0 is not able to handle dates in the
format yyyy '-' mm '-' dd 'T00:00:00' zzzzzz? (the lexical representation)
it is only able to handle the canonical representation. Therefore to help
any .NET consumers of our service, we plan to able to specify our own class
generate xsd:date as cononical format always and to parse either. However we
don;t want out java users to have to have our date parsing class on their
classpath to generate their consumer! So having the xsd:date customisation
inline is not a runner for us!
Thanks,
Adrian
Glen Mazza-2 wrote:
Please take a look at our bindings samples:
http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html#WSDLtoJava-JAXWSCustomization
Is anything related to your problem--if you try to configure the binding
in a different manner (within WSDL, or separate on command line), do the
same problems occur?
If so, I would recommend sending a JIRA report on this problem
(http://issues.apache.org/jira/browse/CXF)--give us the simplest WSDL
and binding file that works like a charm on Metro but raises problems
with CXF.
Note that CXF uses the same JAXB library as Metro, so anything
JAXB-related should be the same between the two WS stacks.
Thanks,
Glen
2008-04-24 Adrian C wrote:
Has no one come across an issue similar to this - am lead to believe its
a
bug in the wsdl2java tooling as I can get this to work with wsimport!
Adrian C wrote:
I am having some problems with jaxw binding customizations.
The first problem that I am having is mixing a globalBindings
definition
with a bindings - the global bindings seems to be ignored. For the
example
below if I use it as is, I only get my typesafeEnumClass generated. My
instances of XMLGregorianCalendar are not replaced with java.util.Date.
However, if I remove the jaxb:bindings node then the global binding
works
fine. Can anyone shed any light on this?
The other issue I have is if I have in-lined customizations and
external
customizations I cam getting an error reporting inconsistencies -
anyone
ever had this issue and resolved it?
This has all been doing my nut in - so any help would be appreciated!
<jaxws:bindings wsdlLocation="../Output/IdentityManagement_v1.wsdl"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" version="2.0">
<jaxws:bindings
node="wsdl:definitions/wsdl:types/xsd:[EMAIL
PROTECTED]'http://www.test.com/ws/de']">
<jaxb:globalBindings>
<jaxb:javaType name="java.util.Date" xmlType="xsd:date"
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"
/>
</jaxb:globalBindings>
<jaxb:bindings node="./xsd:[EMAIL PROTECTED]'MyEnum']">
<jaxb:typesafeEnumClass>
<jaxb:typesafeEnumMember name="ZERO" value="0"
/>
</jaxb:typesafeEnumClass>
</jaxb:bindings>
</jaxws:bindings>
</jaxws:bindings>
Thanks
--
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog