You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christopher Cheng <ch...@gmail.com> on 2013/12/06 17:43:00 UTC
[CXF-5397] wsdl2java marker file name can exceed 255 chars (not yet
fixed in cxf-2.7.8?)
I have tried cxf-2.7.8, when I generate a stub, it will still give an error
like this in WIndows
java:
C:\Java\abacus-webconnect-2013-R3\out\com\sabre\webservices\sabreXML\x2011\x10\impl\TravelItineraryReadRSDocumentImpl$TravelItineraryReadRSImpl$TravelItineraryImpl$ItineraryInfoImpl$ReservationItemsImpl$ItemImpl$VehicleImpl$VehVendorAvailImpl$VehResCoreImpl$VehicleChargesImpl$VehicleChargeImpl$ChargeDetailsImpl$ApproximateTotalChargeImpl.class
(The filename, directory name, or volume label syntax is incorrect)
The following is the ant target
<target name="WSDLToJava-TravelItineraryReadLLS2.2.0RQ">
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava"
fork="true">
<arg value="-client"/>
<arg value="-db"/>
<arg value="xmlbeans"/>
<arg value="-d"/>
<arg value="src"/>
<arg
value="${basedir}/wsdl/TravelItineraryReadLLS2.2.0RQ.wsdl"/>
<classpath>
<path refid="cxf.classpath"/>
</classpath>
</java>
</target>
Re: [CXF-5397] wsdl2java marker file name can exceed 255 chars (not yet fixed in cxf-2.7.8?)
Posted by Daniel Kulp <dk...@apache.org>.
This is not the marker file, this is actually the generated java class for a type. The default is to use nested types in java if that’s what’s used in the schema. However, that’s obviously causing an issue for you. You can try a jaxb binding file:
<jaxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema” xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" version="2.1">
<jaxb:globalBindings localScoping="toplevel"/>
</jaxb:bindings>
and pass that into the wsdl2java with the -b flag. However, with complicated schemas, that could end up with some additional name conflicts to resolve. See:
http://blog.bdoughan.com/2011/07/jaxb-xjc-and-nested-classes.html
Dan
On Dec 6, 2013, at 11:43 AM, Christopher Cheng <ch...@gmail.com> wrote:
> I have tried cxf-2.7.8, when I generate a stub, it will still give an error
> like this in WIndows
>
> java:
> C:\Java\abacus-webconnect-2013-R3\out\com\sabre\webservices\sabreXML\x2011\x10\impl\TravelItineraryReadRSDocumentImpl$TravelItineraryReadRSImpl$TravelItineraryImpl$ItineraryInfoImpl$ReservationItemsImpl$ItemImpl$VehicleImpl$VehVendorAvailImpl$VehResCoreImpl$VehicleChargesImpl$VehicleChargeImpl$ChargeDetailsImpl$ApproximateTotalChargeImpl.class
> (The filename, directory name, or volume label syntax is incorrect)
>
> The following is the ant target
>
> <target name="WSDLToJava-TravelItineraryReadLLS2.2.0RQ">
> <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava"
> fork="true">
> <arg value="-client"/>
> <arg value="-db"/>
> <arg value="xmlbeans"/>
> <arg value="-d"/>
> <arg value="src"/>
> <arg
> value="${basedir}/wsdl/TravelItineraryReadLLS2.2.0RQ.wsdl"/>
> <classpath>
> <path refid="cxf.classpath"/>
> </classpath>
> </java>
> </target>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com