How to generate "implements" Interface bindings customisation

View: New views
3 Messages — Rating Filter:   Alert me  

How to generate "implements" Interface bindings customisation

by metro-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

Can anyone tell me how to generate an "implements" interface to my root object?

I am compiling a DTD, using customisation file to rename the root class i.e.

<?xml version="1.0" ?>
<xml-java-binding-schema
                xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
                xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
   <element name="Message"
    type="class"
    root="true"
    class="Test" />
</xml-java-binding-schema>

How can I get the generation of Test to "implement X" ?

Thanks.
[Message sent by forum member 'nightwolf66' (pareshdaya1@...)]

http://forums.java.net/jive/thread.jspa?messageID=369638

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: How to generate "implements" Interface bindings customisation

by metro-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

have a google for "xjc interfaces plugin"

I've used it in the past.. works well, easy to use.  You just have to add a few things at the top of your xsd to import it, add the flag to your xjc cmd, of course get classpath straight, and then finally annotate your element with the interfaces tag & use your interface FQCN.

And plugins are not that hard to write either.  I've written an extends plugin, and an annotated with plugin.  jaxb or xjc plugins should turn up much for you.
[Message sent by forum member 'newmanjw' (newmanjw@...)]

http://forums.java.net/jive/thread.jspa?messageID=369691

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: How to generate "implements" Interface bindings customisation

by metro-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply, i have come across the interfaces plugin.

However, i am compiling a DTD and not an xsd, so i am not quite sure how to use the plugin with the customisation file for DTDs i.e. <xml-java-binding-schema>.

I need to apply the interface to a specific ELEMENT and not a node, as i dont have an xsd.

Any ideas?

Thanks.
[Message sent by forum member 'nightwolf66' (pareshdaya1@...)]

http://forums.java.net/jive/thread.jspa?messageID=369733

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...