You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2005/02/18 08:12:33 UTC
[ANN] updated XWSDLC 2.0.3 (WSDL 2 JavaJnterface Ant task that uses
XMLBeans)
hi,
this is last update sent to dev@xmlbeans and axis-dev - all future
announcements will be sent to xgws-user AT cs.indiana.edu
XWSDLC code is now updated to use .xsdconfig for mapping (wsdlpkg is no
longer supported) and additionally .wsdlconfig
that has the same format as .xsdconfig but applies only to generation of
Java interfaces from WSDL
(.wsdlconfig can be used to override names of generated packages and
classes).
Example: assuming config directory holds example.wsdl,
example.xsdconfig and example.wsdlconfig files that ant task will generate
Java interface to "generated" directory and write source/classes
generated by XmlBeans to s2j and compiled code in s2j.jar file
<taskdef name="xwsdlc"
classname="xsul.xwsdl_compiler_xbeans.Xwsdlc" />
<xwsdlc classgendir="s2j" srcgendir="s2j" destfile="s2j.jar"
debug="on" wsdlgendir="generated" debug="on">
<classpath refid="common_libraries"/>
<fileset dir="config" />
</xwsdlc>
the only remaining feature for xwsdlc that i am thinking about is
generation of java exceptions
that wrap fault classes generated by XmlBeans but that will happen in
(some distant) future ...
i hope you find that useful.
thanks,
alek
Aleksander Slominski wrote:
> i wrote a tool that uses XmlBeans to generate Java POJO interfaces in
> one easy-to-use step encapsulated as an ANT task.
>
> <xwsdlc> ant task extends XmlBeans xbeans task
> (xmlbeans-1.0.2/docs/xmlbeantask.html) and do post-processing of
> XmlBeans output to generate Java interface based on WSDL portType.
>
> Example: first make sure add xpp3 and xwsdlc jar files to your
> CLASSPATH before running ant (see below where to download them) then
> you can do this:
>
> <taskdef name="xwsdlc"
> classname="xsul.xwsdl_compiler_xbeans.Xwsdlc" />
> <xwsdlc classgendir="s2j" srcgendir="s2j" destfile="s2j.jar"
> debug="on" wsdlgendir="generated" wsdlpkg="example.wsdl">
> <fileset dir="config" />
> </xwsdlc>
>
> in this example the task will read input file(s) (such as .wsdl and
> .xsd) from config directory and generate XmlBeans classes into "s2j"
> directory and java interfaces for WSDL portTypes into "generated"
> directory placed in package "example.wsdl" (so output is really going
> into generated/example/wsdl directory):
>
> Examples of generated Java POJO:
> http://www.extreme.indiana.edu/viewcvs/~checkout~/xsul/interop/generated/java_interfaces/dmf/service/CyberArchService.java
>
> http://www.extreme.indiana.edu/viewcvs/~checkout~/xsul/sample_decoder/generated/java_interfaces/decoder/service/DecoderPortType.java
>
>
> Example WSDL files used to generate above Java files:
> http://www.extreme.indiana.edu/viewcvs/~checkout~/xsul/interop/config/mike.wsdl
>
> http://www.extreme.indiana.edu/viewcvs/~checkout~/xsul/sample_decoder/config/Decoder.wsdl
>
>
> Source code of this extension is under Apache-style compatible license
> in:
> http://www.extreme.indiana.edu/viewcvs/~checkout~/xsul/java/modules/xwsdl_compiler_xbeans/xsul/xwsdl_compiler_xbeans/
>
>
> Binaries (all you need to run the task beside xbeans-1.0.2+ JAR):
> download latest xsul_xwsdlc-VERSION.jar and xpp3-VERSION.jar from
> http://www.extreme.indiana.edu/dist/java-repository/xsul/jars/
> http://www.extreme.indiana.edu/dist/java-repository/xsul/jars/
>
--
The best way to predict the future is to invent it - Alan Kay
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org