[
https://issues.apache.org/jira/browse/CXF-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623713#action_12623713
]
Daniel Kulp commented on CXF-1620:
----------------------------------
OK:
1) JXBJavaType.xjb - doesn't have any jaxb customizations in it. Just
customizations for the SEI name and service name. Did you send the wrong
version?
2) I can reproduce the BADJAXWSJavaType.xjb thing. Digging in now.
3) The wsdl2java macro that is setup in common_build.xml only allows a single
binding file. You could modify the macro to allow multiple files:
<macrodef name="wsdl2java">
<attribute name="srcdestdir" default="${build.src.dir}"/>
<attribute name="destdir" default="${build.classes.dir}"/>
<attribute name="file"/>
<attribute name="servicename.arg" default=""/>
<attribute name="bindingfile" default=""/>
<attribute name="bindingfile2" default=""/>
<attribute name="dir" default="${wsdl.dir}"/>
<attribute name="package" default="NOT_SPECIFIED"/>
<attribute name="compile" default="false"/>
<attribute name="classdir" default=""/>
<attribute name="gen" default="all"/>
<attribute name="validate" default="true"/>
<sequential>
<mkdir dir="@{destdir}"/>
<mkdir dir="@{srcdestdir}"/>
<condition property="[EMAIL PROTECTED]" value="-p @{package}">
<not>
<equals arg1="@{package}" arg2="NOT_SPECIFIED"/>
</not>
</condition>
<property name="[EMAIL PROTECTED]" value=""/>
<condition property="binding.arg" value='-b "@{bindingfile}"'>
<not>
<equals arg1="@{bindingfile}" arg2=""/>
</not>
</condition>
<property name="binding.arg" value=""/>
<condition property="binding.arg2" value='-b "@{bindingfile2}"'>
<not>
<equals arg1="@{bindingfile2}" arg2=""/>
</not>
</condition>
<property name="binding.arg2" value=""/>
<java failonerror="true"
classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="yes">
<classpath>
<path refid="cxf.classpath" />
</classpath>
<sysproperty key="java.util.logging.config.file"
value="${cxf.etc.dir}/logging.properties"/>
<sysproperty key="exitOnFinish" value="true"/>
<arg line="@{servicename.arg}"/>
<arg line="[EMAIL PROTECTED]"/>
<arg line="${binding.arg}"/>
<arg line="${binding.arg2}"/>
<arg value="-verbose"/>
<arg value="-d"/>
<arg value="@{srcdestdir}"/>
<arg value="-all"/>
<arg value="-validate"/>
<arg value="@{dir}/@{file}"/>
</java>
</sequential>
</macrodef>
> wsdl2java ignores jaxb2 xjc globalBindings with namespace xjc
> -------------------------------------------------------------
>
> Key: CXF-1620
> URL: https://issues.apache.org/jira/browse/CXF-1620
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.6
> Environment: CXF 2.0.6. Jaxb 2.0.5
> Reporter: Bob Fields
> Assignee: Daniel Kulp
> Fix For: 2.0.8, 2.1.2
>
> Attachments: wsdl_first_binding_wrapped.zip
>
>
> JAXB databindings work fine as shown in wsdl2java bindings documentation for
> customizing Date mapping. If I add the Jaxb2 specific customizations, they
> are ignored in xjc. Specifically, add jxb:version="2.0"
> jxb:extensionBindingPrefixes="xjc"
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" in the jaxws:bindings
> declaration, and use something like <xjc:serializable> <xjc:simple>
> <xjc:javaType adapter=""> in the jxb:globalBindings section. There's no error
> or anything, the xjc bindings are simply ignored.
> One possibly related problem - if cxf-manifest.jar is in my environment
> classpath, Jaxb2 xjc customizations cause the xjc ant task to fail even when
> I set the classpath. I'm generating JAXB classes in a project unrelated to
> CXF using Jaxb 2.0.5 xjc jar. I have to remove the manifest jar from the
> classpath for xjc to work again.
> We specifically need xjc:simple to avoid JAXBElement creations and to add
> @XmlRootElement where it would otherwise not appear. We also want
> xjc:javaType adapter="" because the jxb:javaType print/parse bindings create
> one Adapter class for each binding customization (not for each customization
> type), which can be several hundred in very large webservice projects.
> A related improvement would be to add CXF DataTypeAdapter classes that extend
> javax.xml.bind.annotation.adapters.XmlAdapter<String, Date> with a marshal
> and unmarshal method, which looks like the generated AdapterX classes. I
> would suggest four classes for date, time, dateTime, and integer (replacing
> BigInteger with Integer).
> A sample project showing JAXB customized datatype bindings for wsdl2java
> would be helpful too. If I get some time next week I'll create and submit one
> based on the wsdl2java samples, with a working jxb binding and an xjc binding
> that should work but doesn't. Unless this issue has already been noticed and
> is being worked on (I didn't see anything related in JIRA).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.