You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Yoav Abrahami <yo...@gmail.com> on 2008/05/30 13:30:15 UTC

Introducing J2XB for Axis

Hi Axis dev team.

(I hope this is the right mailing list. if not, my apologies)

I have recently released the J2XB (Java 2 XML Binding) project as an open
source project. I believe J2XB can be used as a new binding for Axis 2 and
offer some unique advantages over the existing bindings.
see at http://j2xb.sourceforge.net/index.html

J2XB is unique in that it allows to annotate Java classes and generate the
XML schema (XSD) from the Java classes, including facets, constraints, etc.
In addition, it allows to map any Java class to XML structure in a vary
flexible way, supporting any Java class (POJO) including classes with
non-trivial constructors and factories. All this is performed without need
to write code or to generate code.

Connecting J2XB and Axis 2 will result in the ability to white a Web Service
the axis way (POJO in an AAR) with WSDL generated including XSD generated
form the Java classes. The XSD generated can then be controlled using the
J2XB annotations.

Note that J2XB allows considerably more control over the XML structure
compared to JAXB.

In hope that there is interest to join forces,

Cheers,
   Yoav

Re: Introducing J2XB for Axis

Posted by Davanum Srinivas <da...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Or you can implement the SchemaGenerator interface...see existing code that implement this. For example, we have used
JAXB RI to generate the schemas.

thanks,
dims

keith chapman wrote:
| If you are looking at Java2WSDL you can take an approach such as this. Write
| a module that will take in a set of java classes and generate a
| AxisService.  During the creation of the AxisService you can crete the
| schema using J2XB and stick it into the AxisService. During WSDL generation
| both AxisService2OM and AxisService2WSDL2 takes the schema off the
| AxisService and serializes it (The schema is not generated).
|
| So in essence this looks like a new deployer as Deepel suggested.
|
| Thanks,
| Keith.
|
| On Mon, Jun 2, 2008 at 7:33 PM, Yoav Abrahami <yo...@gmail.com> wrote:
|
|> Hi all,
|>
|> I have found the following so far -
|>
|> 1. I can write new implementations of the receivers to implement J2XB
|> marshaling and unmarshaling. doing so seems quite simple given the provided
|> samples. This will require the J2XB service to include in the service.xml
|> file the mapping to the new J2XB receivers. Is there a better way to do
|> this?
|>
|> The receivers to subclass -
|> AbstractInMessageReceiver
|> AbstractInOutAsyncMessageReceiver
|> AbstractInOutSyncMessageReceiver
|> AbstractMessageReceiver
|>
|> 2. WSDL generation - I have found the Axis2 generates WSDL automatically
|> for services who do not provide a ready-made WSDL. The process is performed
|> by the AxisService, AxisService2OM and AxisService2WSDL2 classes and does
|> not appear to allow extensions.I can integrate J2XB Schema generation into
|> those classes but it will require changes to those classes. Is there any
|> plugin / extension mechanism that I am missing?
|>
|> Cheers,
|>   Yoav
|>
|>
|>
|>
|>
|> On Mon, Jun 2, 2008 at 3:54 PM, Yoav Abrahami <yo...@gmail.com> wrote:
|>
|>> Hi Amila,
|>>
|>> As you have noticed, J2XB is going in the direction of Java2WSDL, not
|>> WSDL2Java. In fact, writing WSDL2Java in the case of J2XB is a challenge
|>> because J2XB allows to map the same WSDL (actually the same XSD) to
|>> different Java representations.
|>>
|>> I have looked at the Java2WSDL code and it does not seem to allow any
|>> extensions. Extending Java2WSDL to support J2XB will allow this tool to be
|>> able to support more advanced Java structures (including collections,
|>> constructors, etc) and generate more detailed XML schemas (constraints,
|>> substitution groups, etc). It looks like we can either change the Java2WSDL
|>> tool itself or write a new one.
|>>
|>> Note that the J2XB Java code does not include methods such as toOM and
|>> fromOM, instead we use a separate engine (from the model classes). How do I
|>> implement the marshaling and unmarshaling of the WS call parts (I assume
|>> those are converted to OMElements by Axis2) to J2XB? J2XB has the methods to
|>> marshal and unmarshal an OMElement to Java classes. For unmarshling we
|>> require the OMElement to unmarshal and it's QName. For marshaling we require
|>> only the Java instance.
|>>
|>> I have tried to find where XmlBeans is integrated into Axis2 for the
|>> marshal and unmarshal and failed to find it. Can you point me at the right
|>> direction?
|>>
|>> Cheers,
|>>   Yoav
|>>
|>>
|>>
|>>
|>> On Mon, Jun 2, 2008 at 9:12 AM, Amila Suriarachchi <
|>> amilasuriarachchi@gmail.com> wrote:
|>>
|>>> hi Yoav,
|>>>
|>>> As I understood from your mail it is not an alternative to ADB, Xmlbeans
|>>> and jaxb. What these frameworks does is that they generate the java classes
|>>> from a given schema.
|>>> For me this is some what similar to jibx.
|>>> you can have an idea of how Axis2 codegeneration works and overall axis2
|>>> architecture (WSDL2java tool) here[1].
|>>>
|>>> And also please see the xmlbeans module. And see how xmlbeans integrated
|>>> to Axis2.
|>>> Here mainly you have to write a Codegen utility class
|>>> (org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
|>>> from the XmlSchema and return a Map which contain the QName and the
|>>> generated class name. Axis2 codegen engine use this information to generate
|>>> the classes.
|>>>
|>>> And also you need to write a binding template which mainly implement the
|>>> toOM and fromOM methods.
|>>>
|>>> Then add an extension to Codegen module (eg.
|>>> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)
|>>>
|>>> to register with the WSDL2java tool.
|>>>
|>>> feel free to ask any question. I'll bit busy for this week. certainly be
|>>> able to answer any thing from next week.
|>>>
|>>> thanks,
|>>> Amila.
|>>>
|>>> [1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html
|>>>
|>>>
|>>> On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <
|>>> eran.chinthaka@gmail.com> wrote:
|>>>
|>>>> Hi Yoav,
|>>>>
|>>>> Good points. I think first you should approach to WSDL2Java generation.
|>>>> You can see [1] for some information on it. That article was written by our
|>>>> Mr. ADB and I think he will help you if you have any problem during the
|>>>> process.
|>>>>
|>>>> I think first you will have to convince the devs here, that J2XB is
|>>>> really good by some sorta performance or features implemented. Then they
|>>>> will deep dive in to J2XB.
|>>>>
|>>>> Please read the above article [1] and let us know when you have
|>>>> problems. Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB
|>>>> can be any of "Axis2", "Ajith" or "Amila" ;) )
|>>>>
|>>>> One another point. ADB is not meant to be a complete data binding
|>>>> framework. We designed it to be a simple framework which is tightly
|>>>> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
|>>>> most of the time, I think. I specially like it since it is light weight and
|>>>> tightly coupled in to the internals of Axiom.
|>>>>  If J2XB is a light weight framework to generate schema from Java
|>>>> classes, then perhaps we might be able to use that to improve our Java2WSDL
|>>>> as well. For the time being, IIRC, we use some sorta reflection and
|>>>> annotations mechanism and definitely we like to get some help for that too.
|>>>>
|>>>> Thanks,
|>>>> Eran Chinthaka
|>>>>
|>>>> [1] : http://wso2.org/library/35
|>>>> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
|>>>>
|>>>>> Hi Eran,
|>>>>>
|>>>>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or
|>>>>> JiBX.
|>>>>>
|>>>>> * XMLBeans Supports Java code generation from an XML schema - it
|>>>>> requires that the generated binding classes be separate then the application
|>>>>> classes and it does not generate an XML schema from Java code.
|>>>>>
|>>>>> * JiBX has good support for binding Java Beans to XML and back.
|>>>>> However, it is still missing some features such as XML Schema generation
|>>>>> (which is important for WSDL generation), XML list styles, flexibility in
|>>>>> enumeration support, etc.
|>>>>>
|>>>>> * ADB - well, ADB is a simplistic databinding framework, but still has
|>>>>> a lot of features missing compared to J2XB.
|>>>>>
|>>>>> I think that integrating J2XB into Axis 2 is a good idea (and hence
|>>>>> this thread). However, I find it difficult to do so myself - I am not a
|>>>>> member in the Axis 2 dev team. As such, except the technical difficulty, I
|>>>>> do not have the knowledge now Axis 2 is structured and where the I should
|>>>>> integrate J2XB (in the code). I am seeking help from you guys here to help
|>>>>> in this integration.
|>>>>>
|>>>>> I can think of 4 possible integration points:
|>>>>>
|>>>>> * marshaling and unmarshaling XML to Java classes used as parameters
|>>>>> for an Axis WS (in an AAR archive).
|>>>>>
|>>>>> * marshaling and unmarshaling MXL to Java classes used as parameters
|>>>>> for an Axis WS client
|>>>>>
|>>>>> * automatic WSDL generation for a service in an AAR.
|>>>>>
|>>>>> * extending Java2WSDL to support J2XB binding
|>>>>>
|>>>>> I am basically looking of developer involvement (from the Axis team) to
|>>>>> help creating those integrations.
|>>>>>
|>>>>> Cheers,
|>>>>>   Yoav
|>>>>>
|>>>>>
|>>>>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <
|>>>>> eran.chinthaka@gmail.com> wrote:
|>>>>>
|>>>>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
|>>>>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
|>>>>>>
|>>>>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
|>>>>>> compete with J2BX :)
|>>>>>>
|>>>>>>
|>>>>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com>
|>>>>>> wrote:
|>>>>>>
|>>>>>>> Hi Axis dev team.
|>>>>>>>
|>>>>>>> (I hope this is the right mailing list. if not, my apologies)
|>>>>>>>
|>>>>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
|>>>>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
|>>>>>>> and offer some unique advantages over the existing bindings.
|>>>>>>> see at http://j2xb.sourceforge.net/index.html
|>>>>>>>
|>>>>>>> J2XB is unique in that it allows to annotate Java classes and
|>>>>>>> generate the XML schema (XSD) from the Java classes, including facets,
|>>>>>>> constraints, etc. In addition, it allows to map any Java class to XML
|>>>>>>> structure in a vary flexible way, supporting any Java class (POJO) including
|>>>>>>> classes with non-trivial constructors and factories. All this is performed
|>>>>>>> without need to write code or to generate code.
|>>>>>>>
|>>>>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
|>>>>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
|>>>>>>> generated form the Java classes. The XSD generated can then be controlled
|>>>>>>> using the J2XB annotations.
|>>>>>>>
|>>>>>>> Note that J2XB allows considerably more control over the XML
|>>>>>>> structure compared to JAXB.
|>>>>>>>
|>>>>>>> In hope that there is interest to join forces,
|>>>>>>>
|>>>>>>> Cheers,
|>>>>>>>    Yoav
|>>>>>>>
|>>>>>>>
|>>>>>>>
|>>>>>>
|>>>>>> --
|>>>>>> With Mettha,
|>>>>>> Eran Chinthaka
|>>>>>>
|>>>>>> --------------------------------------------------------------------
|>>>>>> Health is the greatest gift; contentment is the greatest wealth;
|>>>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
|>>>>>
|>>>>>
|>>>>
|>>>> --
|>>>> With Mettha,
|>>>> Eran Chinthaka
|>>>>
|>>>> --------------------------------------------------------------------
|>>>> Health is the greatest gift; contentment is the greatest wealth;
|>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
|>>>>
|>>>
|>>>
|>>> --
|>>> Amila Suriarachchi,
|>>> WSO2 Inc.
|>>
|>>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iD8DBQFIRCDCgNg6eWEDv1kRAh4rAKD4hTAFFG5Vd2hoxJw2wXeuMqN8aQCbB+bt
nToe32gVjF6S6wb66bFcDro=
=//jJ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Introducing J2XB for Axis

Posted by keith chapman <ke...@gmail.com>.
If you are looking at Java2WSDL you can take an approach such as this. Write
a module that will take in a set of java classes and generate a
AxisService.  During the creation of the AxisService you can crete the
schema using J2XB and stick it into the AxisService. During WSDL generation
both AxisService2OM and AxisService2WSDL2 takes the schema off the
AxisService and serializes it (The schema is not generated).

So in essence this looks like a new deployer as Deepel suggested.

Thanks,
Keith.

On Mon, Jun 2, 2008 at 7:33 PM, Yoav Abrahami <yo...@gmail.com> wrote:

> Hi all,
>
> I have found the following so far -
>
> 1. I can write new implementations of the receivers to implement J2XB
> marshaling and unmarshaling. doing so seems quite simple given the provided
> samples. This will require the J2XB service to include in the service.xml
> file the mapping to the new J2XB receivers. Is there a better way to do
> this?
>
> The receivers to subclass -
> AbstractInMessageReceiver
> AbstractInOutAsyncMessageReceiver
> AbstractInOutSyncMessageReceiver
> AbstractMessageReceiver
>
> 2. WSDL generation - I have found the Axis2 generates WSDL automatically
> for services who do not provide a ready-made WSDL. The process is performed
> by the AxisService, AxisService2OM and AxisService2WSDL2 classes and does
> not appear to allow extensions.I can integrate J2XB Schema generation into
> those classes but it will require changes to those classes. Is there any
> plugin / extension mechanism that I am missing?
>
> Cheers,
>   Yoav
>
>
>
>
>
> On Mon, Jun 2, 2008 at 3:54 PM, Yoav Abrahami <yo...@gmail.com> wrote:
>
>> Hi Amila,
>>
>> As you have noticed, J2XB is going in the direction of Java2WSDL, not
>> WSDL2Java. In fact, writing WSDL2Java in the case of J2XB is a challenge
>> because J2XB allows to map the same WSDL (actually the same XSD) to
>> different Java representations.
>>
>> I have looked at the Java2WSDL code and it does not seem to allow any
>> extensions. Extending Java2WSDL to support J2XB will allow this tool to be
>> able to support more advanced Java structures (including collections,
>> constructors, etc) and generate more detailed XML schemas (constraints,
>> substitution groups, etc). It looks like we can either change the Java2WSDL
>> tool itself or write a new one.
>>
>> Note that the J2XB Java code does not include methods such as toOM and
>> fromOM, instead we use a separate engine (from the model classes). How do I
>> implement the marshaling and unmarshaling of the WS call parts (I assume
>> those are converted to OMElements by Axis2) to J2XB? J2XB has the methods to
>> marshal and unmarshal an OMElement to Java classes. For unmarshling we
>> require the OMElement to unmarshal and it's QName. For marshaling we require
>> only the Java instance.
>>
>> I have tried to find where XmlBeans is integrated into Axis2 for the
>> marshal and unmarshal and failed to find it. Can you point me at the right
>> direction?
>>
>> Cheers,
>>   Yoav
>>
>>
>>
>>
>> On Mon, Jun 2, 2008 at 9:12 AM, Amila Suriarachchi <
>> amilasuriarachchi@gmail.com> wrote:
>>
>>> hi Yoav,
>>>
>>> As I understood from your mail it is not an alternative to ADB, Xmlbeans
>>> and jaxb. What these frameworks does is that they generate the java classes
>>> from a given schema.
>>> For me this is some what similar to jibx.
>>> you can have an idea of how Axis2 codegeneration works and overall axis2
>>> architecture (WSDL2java tool) here[1].
>>>
>>> And also please see the xmlbeans module. And see how xmlbeans integrated
>>> to Axis2.
>>> Here mainly you have to write a Codegen utility class
>>> (org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
>>> from the XmlSchema and return a Map which contain the QName and the
>>> generated class name. Axis2 codegen engine use this information to generate
>>> the classes.
>>>
>>> And also you need to write a binding template which mainly implement the
>>> toOM and fromOM methods.
>>>
>>> Then add an extension to Codegen module (eg.
>>> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)
>>>
>>> to register with the WSDL2java tool.
>>>
>>> feel free to ask any question. I'll bit busy for this week. certainly be
>>> able to answer any thing from next week.
>>>
>>> thanks,
>>> Amila.
>>>
>>> [1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html
>>>
>>>
>>> On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <
>>> eran.chinthaka@gmail.com> wrote:
>>>
>>>> Hi Yoav,
>>>>
>>>> Good points. I think first you should approach to WSDL2Java generation.
>>>> You can see [1] for some information on it. That article was written by our
>>>> Mr. ADB and I think he will help you if you have any problem during the
>>>> process.
>>>>
>>>> I think first you will have to convince the devs here, that J2XB is
>>>> really good by some sorta performance or features implemented. Then they
>>>> will deep dive in to J2XB.
>>>>
>>>> Please read the above article [1] and let us know when you have
>>>> problems. Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB
>>>> can be any of "Axis2", "Ajith" or "Amila" ;) )
>>>>
>>>> One another point. ADB is not meant to be a complete data binding
>>>> framework. We designed it to be a simple framework which is tightly
>>>> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
>>>> most of the time, I think. I specially like it since it is light weight and
>>>> tightly coupled in to the internals of Axiom.
>>>>  If J2XB is a light weight framework to generate schema from Java
>>>> classes, then perhaps we might be able to use that to improve our Java2WSDL
>>>> as well. For the time being, IIRC, we use some sorta reflection and
>>>> annotations mechanism and definitely we like to get some help for that too.
>>>>
>>>> Thanks,
>>>> Eran Chinthaka
>>>>
>>>> [1] : http://wso2.org/library/35
>>>> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>>>
>>>>> Hi Eran,
>>>>>
>>>>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or
>>>>> JiBX.
>>>>>
>>>>> * XMLBeans Supports Java code generation from an XML schema - it
>>>>> requires that the generated binding classes be separate then the application
>>>>> classes and it does not generate an XML schema from Java code.
>>>>>
>>>>> * JiBX has good support for binding Java Beans to XML and back.
>>>>> However, it is still missing some features such as XML Schema generation
>>>>> (which is important for WSDL generation), XML list styles, flexibility in
>>>>> enumeration support, etc.
>>>>>
>>>>> * ADB - well, ADB is a simplistic databinding framework, but still has
>>>>> a lot of features missing compared to J2XB.
>>>>>
>>>>> I think that integrating J2XB into Axis 2 is a good idea (and hence
>>>>> this thread). However, I find it difficult to do so myself - I am not a
>>>>> member in the Axis 2 dev team. As such, except the technical difficulty, I
>>>>> do not have the knowledge now Axis 2 is structured and where the I should
>>>>> integrate J2XB (in the code). I am seeking help from you guys here to help
>>>>> in this integration.
>>>>>
>>>>> I can think of 4 possible integration points:
>>>>>
>>>>> * marshaling and unmarshaling XML to Java classes used as parameters
>>>>> for an Axis WS (in an AAR archive).
>>>>>
>>>>> * marshaling and unmarshaling MXL to Java classes used as parameters
>>>>> for an Axis WS client
>>>>>
>>>>> * automatic WSDL generation for a service in an AAR.
>>>>>
>>>>> * extending Java2WSDL to support J2XB binding
>>>>>
>>>>> I am basically looking of developer involvement (from the Axis team) to
>>>>> help creating those integrations.
>>>>>
>>>>> Cheers,
>>>>>   Yoav
>>>>>
>>>>>
>>>>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <
>>>>> eran.chinthaka@gmail.com> wrote:
>>>>>
>>>>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>>>>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>>>>>
>>>>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>>>>>> compete with J2BX :)
>>>>>>
>>>>>>
>>>>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Axis dev team.
>>>>>>>
>>>>>>> (I hope this is the right mailing list. if not, my apologies)
>>>>>>>
>>>>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
>>>>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
>>>>>>> and offer some unique advantages over the existing bindings.
>>>>>>> see at http://j2xb.sourceforge.net/index.html
>>>>>>>
>>>>>>> J2XB is unique in that it allows to annotate Java classes and
>>>>>>> generate the XML schema (XSD) from the Java classes, including facets,
>>>>>>> constraints, etc. In addition, it allows to map any Java class to XML
>>>>>>> structure in a vary flexible way, supporting any Java class (POJO) including
>>>>>>> classes with non-trivial constructors and factories. All this is performed
>>>>>>> without need to write code or to generate code.
>>>>>>>
>>>>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>>>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>>>>>> generated form the Java classes. The XSD generated can then be controlled
>>>>>>> using the J2XB annotations.
>>>>>>>
>>>>>>> Note that J2XB allows considerably more control over the XML
>>>>>>> structure compared to JAXB.
>>>>>>>
>>>>>>> In hope that there is interest to join forces,
>>>>>>>
>>>>>>> Cheers,
>>>>>>>    Yoav
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> With Mettha,
>>>>>> Eran Chinthaka
>>>>>>
>>>>>> --------------------------------------------------------------------
>>>>>> Health is the greatest gift; contentment is the greatest wealth;
>>>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> With Mettha,
>>>> Eran Chinthaka
>>>>
>>>> --------------------------------------------------------------------
>>>> Health is the greatest gift; contentment is the greatest wealth;
>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
>>>>
>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi,
>>> WSO2 Inc.
>>
>>
>>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Fwd: Introducing J2XB for Axis

Posted by Yoav Abrahami <yo...@gmail.com>.
Hi all,

I have implemented an Axis2 module with J2XB binding.
The module adds ability to use J2XB binding with Axis2 web services as well
as WSDL generation from the service class.

At introduction page to the module can be found at
http://j2xb.sourceforge.net/Axis%202%20Introduction.html

For anyone who is looking for a simple example to demonstrate the J2XB Axis2
module, see at
the module introduction page and at
http://j2xb.sourceforge.net/Axis%202%20Advanced%20Example.html

The module can be downloaded from
https://sourceforge.net/project/showfiles.php?group_id=228363

I'd appreciate if you update the Axis2 website with the new binding module.

cheers,
  Yoav

---------- Forwarded message ----------
From: Yoav Abrahami <yo...@gmail.com>
Date: Mon, Jun 2, 2008 at 5:03 PM
Subject: Re: Introducing J2XB for Axis
To: axis-dev@ws.apache.org


Hi all,

I have found the following so far -

1. I can write new implementations of the receivers to implement J2XB
marshaling and unmarshaling. doing so seems quite simple given the provided
samples. This will require the J2XB service to include in the service.xml
file the mapping to the new J2XB receivers. Is there a better way to do
this?

The receivers to subclass -
AbstractInMessageReceiver
AbstractInOutAsyncMessageReceiver
AbstractInOutSyncMessageReceiver
AbstractMessageReceiver

2. WSDL generation - I have found the Axis2 generates WSDL automatically for
services who do not provide a ready-made WSDL. The process is performed by
the AxisService, AxisService2OM and AxisService2WSDL2 classes and does not
appear to allow extensions.I can integrate J2XB Schema generation into those
classes but it will require changes to those classes. Is there any plugin /
extension mechanism that I am missing?

Cheers,
  Yoav





On Mon, Jun 2, 2008 at 3:54 PM, Yoav Abrahami <yo...@gmail.com> wrote:

> Hi Amila,
>
> As you have noticed, J2XB is going in the direction of Java2WSDL, not
> WSDL2Java. In fact, writing WSDL2Java in the case of J2XB is a challenge
> because J2XB allows to map the same WSDL (actually the same XSD) to
> different Java representations.
>
> I have looked at the Java2WSDL code and it does not seem to allow any
> extensions. Extending Java2WSDL to support J2XB will allow this tool to be
> able to support more advanced Java structures (including collections,
> constructors, etc) and generate more detailed XML schemas (constraints,
> substitution groups, etc). It looks like we can either change the Java2WSDL
> tool itself or write a new one.
>
> Note that the J2XB Java code does not include methods such as toOM and
> fromOM, instead we use a separate engine (from the model classes). How do I
> implement the marshaling and unmarshaling of the WS call parts (I assume
> those are converted to OMElements by Axis2) to J2XB? J2XB has the methods to
> marshal and unmarshal an OMElement to Java classes. For unmarshling we
> require the OMElement to unmarshal and it's QName. For marshaling we require
> only the Java instance.
>
> I have tried to find where XmlBeans is integrated into Axis2 for the
> marshal and unmarshal and failed to find it. Can you point me at the right
> direction?
>
> Cheers,
>   Yoav
>
>
>
>
> On Mon, Jun 2, 2008 at 9:12 AM, Amila Suriarachchi <
> amilasuriarachchi@gmail.com> wrote:
>
>> hi Yoav,
>>
>> As I understood from your mail it is not an alternative to ADB, Xmlbeans
>> and jaxb. What these frameworks does is that they generate the java classes
>> from a given schema.
>> For me this is some what similar to jibx.
>> you can have an idea of how Axis2 codegeneration works and overall axis2
>> architecture (WSDL2java tool) here[1].
>>
>> And also please see the xmlbeans module. And see how xmlbeans integrated
>> to Axis2.
>> Here mainly you have to write a Codegen utility class
>> (org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
>> from the XmlSchema and return a Map which contain the QName and the
>> generated class name. Axis2 codegen engine use this information to generate
>> the classes.
>>
>> And also you need to write a binding template which mainly implement the
>> toOM and fromOM methods.
>>
>> Then add an extension to Codegen module (eg.
>> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)
>>
>> to register with the WSDL2java tool.
>>
>> feel free to ask any question. I'll bit busy for this week. certainly be
>> able to answer any thing from next week.
>>
>> thanks,
>> Amila.
>>
>> [1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html
>>
>>
>> On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <er...@gmail.com>
>> wrote:
>>
>>> Hi Yoav,
>>>
>>> Good points. I think first you should approach to WSDL2Java generation.
>>> You can see [1] for some information on it. That article was written by our
>>> Mr. ADB and I think he will help you if you have any problem during the
>>> process.
>>>
>>> I think first you will have to convince the devs here, that J2XB is
>>> really good by some sorta performance or features implemented. Then they
>>> will deep dive in to J2XB.
>>>
>>> Please read the above article [1] and let us know when you have problems.
>>> Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB can be
>>> any of "Axis2", "Ajith" or "Amila" ;) )
>>>
>>> One another point. ADB is not meant to be a complete data binding
>>> framework. We designed it to be a simple framework which is tightly
>>> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
>>> most of the time, I think. I specially like it since it is light weight and
>>> tightly coupled in to the internals of Axiom.
>>>  If J2XB is a light weight framework to generate schema from Java
>>> classes, then perhaps we might be able to use that to improve our Java2WSDL
>>> as well. For the time being, IIRC, we use some sorta reflection and
>>> annotations mechanism and definitely we like to get some help for that too.
>>>
>>> Thanks,
>>> Eran Chinthaka
>>>
>>> [1] : http://wso2.org/library/35
>>> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>>
>>>> Hi Eran,
>>>>
>>>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or
>>>> JiBX.
>>>>
>>>> * XMLBeans Supports Java code generation from an XML schema - it
>>>> requires that the generated binding classes be separate then the application
>>>> classes and it does not generate an XML schema from Java code.
>>>>
>>>> * JiBX has good support for binding Java Beans to XML and back. However,
>>>> it is still missing some features such as XML Schema generation (which is
>>>> important for WSDL generation), XML list styles, flexibility in enumeration
>>>> support, etc.
>>>>
>>>> * ADB - well, ADB is a simplistic databinding framework, but still has a
>>>> lot of features missing compared to J2XB.
>>>>
>>>> I think that integrating J2XB into Axis 2 is a good idea (and hence this
>>>> thread). However, I find it difficult to do so myself - I am not a member in
>>>> the Axis 2 dev team. As such, except the technical difficulty, I do not have
>>>> the knowledge now Axis 2 is structured and where the I should integrate J2XB
>>>> (in the code). I am seeking help from you guys here to help in this
>>>> integration.
>>>>
>>>> I can think of 4 possible integration points:
>>>>
>>>> * marshaling and unmarshaling XML to Java classes used as parameters for
>>>> an Axis WS (in an AAR archive).
>>>>
>>>> * marshaling and unmarshaling MXL to Java classes used as parameters for
>>>> an Axis WS client
>>>>
>>>> * automatic WSDL generation for a service in an AAR.
>>>>
>>>> * extending Java2WSDL to support J2XB binding
>>>>
>>>> I am basically looking of developer involvement (from the Axis team) to
>>>> help creating those integrations.
>>>>
>>>> Cheers,
>>>>   Yoav
>>>>
>>>>
>>>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <
>>>> eran.chinthaka@gmail.com> wrote:
>>>>
>>>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>>>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>>>>
>>>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>>>>> compete with J2BX :)
>>>>>
>>>>>
>>>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Axis dev team.
>>>>>>
>>>>>> (I hope this is the right mailing list. if not, my apologies)
>>>>>>
>>>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
>>>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
>>>>>> and offer some unique advantages over the existing bindings.
>>>>>> see at http://j2xb.sourceforge.net/index.html
>>>>>>
>>>>>> J2XB is unique in that it allows to annotate Java classes and generate
>>>>>> the XML schema (XSD) from the Java classes, including facets, constraints,
>>>>>> etc. In addition, it allows to map any Java class to XML structure in a vary
>>>>>> flexible way, supporting any Java class (POJO) including classes with
>>>>>> non-trivial constructors and factories. All this is performed without need
>>>>>> to write code or to generate code.
>>>>>>
>>>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>>>>> generated form the Java classes. The XSD generated can then be controlled
>>>>>> using the J2XB annotations.
>>>>>>
>>>>>> Note that J2XB allows considerably more control over the XML structure
>>>>>> compared to JAXB.
>>>>>>
>>>>>> In hope that there is interest to join forces,
>>>>>>
>>>>>> Cheers,
>>>>>>    Yoav
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> With Mettha,
>>>>> Eran Chinthaka
>>>>>
>>>>> --------------------------------------------------------------------
>>>>> Health is the greatest gift; contentment is the greatest wealth;
>>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> With Mettha,
>>> Eran Chinthaka
>>>
>>> --------------------------------------------------------------------
>>> Health is the greatest gift; contentment is the greatest wealth; trusting
>>> is the best relationship; nirvana is the highest joy. - Dhammapada
>>>
>>
>>
>>
>> --
>> Amila Suriarachchi,
>> WSO2 Inc.
>
>
>

Re: Introducing J2XB for Axis

Posted by Yoav Abrahami <yo...@gmail.com>.
Hi all,

I have found the following so far -

1. I can write new implementations of the receivers to implement J2XB
marshaling and unmarshaling. doing so seems quite simple given the provided
samples. This will require the J2XB service to include in the service.xml
file the mapping to the new J2XB receivers. Is there a better way to do
this?

The receivers to subclass -
AbstractInMessageReceiver
AbstractInOutAsyncMessageReceiver
AbstractInOutSyncMessageReceiver
AbstractMessageReceiver

2. WSDL generation - I have found the Axis2 generates WSDL automatically for
services who do not provide a ready-made WSDL. The process is performed by
the AxisService, AxisService2OM and AxisService2WSDL2 classes and does not
appear to allow extensions.I can integrate J2XB Schema generation into those
classes but it will require changes to those classes. Is there any plugin /
extension mechanism that I am missing?

Cheers,
  Yoav




On Mon, Jun 2, 2008 at 3:54 PM, Yoav Abrahami <yo...@gmail.com> wrote:

> Hi Amila,
>
> As you have noticed, J2XB is going in the direction of Java2WSDL, not
> WSDL2Java. In fact, writing WSDL2Java in the case of J2XB is a challenge
> because J2XB allows to map the same WSDL (actually the same XSD) to
> different Java representations.
>
> I have looked at the Java2WSDL code and it does not seem to allow any
> extensions. Extending Java2WSDL to support J2XB will allow this tool to be
> able to support more advanced Java structures (including collections,
> constructors, etc) and generate more detailed XML schemas (constraints,
> substitution groups, etc). It looks like we can either change the Java2WSDL
> tool itself or write a new one.
>
> Note that the J2XB Java code does not include methods such as toOM and
> fromOM, instead we use a separate engine (from the model classes). How do I
> implement the marshaling and unmarshaling of the WS call parts (I assume
> those are converted to OMElements by Axis2) to J2XB? J2XB has the methods to
> marshal and unmarshal an OMElement to Java classes. For unmarshling we
> require the OMElement to unmarshal and it's QName. For marshaling we require
> only the Java instance.
>
> I have tried to find where XmlBeans is integrated into Axis2 for the
> marshal and unmarshal and failed to find it. Can you point me at the right
> direction?
>
> Cheers,
>   Yoav
>
>
>
>
> On Mon, Jun 2, 2008 at 9:12 AM, Amila Suriarachchi <
> amilasuriarachchi@gmail.com> wrote:
>
>> hi Yoav,
>>
>> As I understood from your mail it is not an alternative to ADB, Xmlbeans
>> and jaxb. What these frameworks does is that they generate the java classes
>> from a given schema.
>> For me this is some what similar to jibx.
>> you can have an idea of how Axis2 codegeneration works and overall axis2
>> architecture (WSDL2java tool) here[1].
>>
>> And also please see the xmlbeans module. And see how xmlbeans integrated
>> to Axis2.
>> Here mainly you have to write a Codegen utility class
>> (org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
>> from the XmlSchema and return a Map which contain the QName and the
>> generated class name. Axis2 codegen engine use this information to generate
>> the classes.
>>
>> And also you need to write a binding template which mainly implement the
>> toOM and fromOM methods.
>>
>> Then add an extension to Codegen module (eg.
>> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)
>>
>> to register with the WSDL2java tool.
>>
>> feel free to ask any question. I'll bit busy for this week. certainly be
>> able to answer any thing from next week.
>>
>> thanks,
>> Amila.
>>
>> [1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html
>>
>>
>> On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <er...@gmail.com>
>> wrote:
>>
>>> Hi Yoav,
>>>
>>> Good points. I think first you should approach to WSDL2Java generation.
>>> You can see [1] for some information on it. That article was written by our
>>> Mr. ADB and I think he will help you if you have any problem during the
>>> process.
>>>
>>> I think first you will have to convince the devs here, that J2XB is
>>> really good by some sorta performance or features implemented. Then they
>>> will deep dive in to J2XB.
>>>
>>> Please read the above article [1] and let us know when you have problems.
>>> Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB can be
>>> any of "Axis2", "Ajith" or "Amila" ;) )
>>>
>>> One another point. ADB is not meant to be a complete data binding
>>> framework. We designed it to be a simple framework which is tightly
>>> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
>>> most of the time, I think. I specially like it since it is light weight and
>>> tightly coupled in to the internals of Axiom.
>>>  If J2XB is a light weight framework to generate schema from Java
>>> classes, then perhaps we might be able to use that to improve our Java2WSDL
>>> as well. For the time being, IIRC, we use some sorta reflection and
>>> annotations mechanism and definitely we like to get some help for that too.
>>>
>>> Thanks,
>>> Eran Chinthaka
>>>
>>> [1] : http://wso2.org/library/35
>>> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>>
>>>> Hi Eran,
>>>>
>>>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or
>>>> JiBX.
>>>>
>>>> * XMLBeans Supports Java code generation from an XML schema - it
>>>> requires that the generated binding classes be separate then the application
>>>> classes and it does not generate an XML schema from Java code.
>>>>
>>>> * JiBX has good support for binding Java Beans to XML and back. However,
>>>> it is still missing some features such as XML Schema generation (which is
>>>> important for WSDL generation), XML list styles, flexibility in enumeration
>>>> support, etc.
>>>>
>>>> * ADB - well, ADB is a simplistic databinding framework, but still has a
>>>> lot of features missing compared to J2XB.
>>>>
>>>> I think that integrating J2XB into Axis 2 is a good idea (and hence this
>>>> thread). However, I find it difficult to do so myself - I am not a member in
>>>> the Axis 2 dev team. As such, except the technical difficulty, I do not have
>>>> the knowledge now Axis 2 is structured and where the I should integrate J2XB
>>>> (in the code). I am seeking help from you guys here to help in this
>>>> integration.
>>>>
>>>> I can think of 4 possible integration points:
>>>>
>>>> * marshaling and unmarshaling XML to Java classes used as parameters for
>>>> an Axis WS (in an AAR archive).
>>>>
>>>> * marshaling and unmarshaling MXL to Java classes used as parameters for
>>>> an Axis WS client
>>>>
>>>> * automatic WSDL generation for a service in an AAR.
>>>>
>>>> * extending Java2WSDL to support J2XB binding
>>>>
>>>> I am basically looking of developer involvement (from the Axis team) to
>>>> help creating those integrations.
>>>>
>>>> Cheers,
>>>>   Yoav
>>>>
>>>>
>>>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <
>>>> eran.chinthaka@gmail.com> wrote:
>>>>
>>>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>>>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>>>>
>>>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>>>>> compete with J2BX :)
>>>>>
>>>>>
>>>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Axis dev team.
>>>>>>
>>>>>> (I hope this is the right mailing list. if not, my apologies)
>>>>>>
>>>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
>>>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
>>>>>> and offer some unique advantages over the existing bindings.
>>>>>> see at http://j2xb.sourceforge.net/index.html
>>>>>>
>>>>>> J2XB is unique in that it allows to annotate Java classes and generate
>>>>>> the XML schema (XSD) from the Java classes, including facets, constraints,
>>>>>> etc. In addition, it allows to map any Java class to XML structure in a vary
>>>>>> flexible way, supporting any Java class (POJO) including classes with
>>>>>> non-trivial constructors and factories. All this is performed without need
>>>>>> to write code or to generate code.
>>>>>>
>>>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>>>>> generated form the Java classes. The XSD generated can then be controlled
>>>>>> using the J2XB annotations.
>>>>>>
>>>>>> Note that J2XB allows considerably more control over the XML structure
>>>>>> compared to JAXB.
>>>>>>
>>>>>> In hope that there is interest to join forces,
>>>>>>
>>>>>> Cheers,
>>>>>>    Yoav
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> With Mettha,
>>>>> Eran Chinthaka
>>>>>
>>>>> --------------------------------------------------------------------
>>>>> Health is the greatest gift; contentment is the greatest wealth;
>>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> With Mettha,
>>> Eran Chinthaka
>>>
>>> --------------------------------------------------------------------
>>> Health is the greatest gift; contentment is the greatest wealth; trusting
>>> is the best relationship; nirvana is the highest joy. - Dhammapada
>>>
>>
>>
>>
>> --
>> Amila Suriarachchi,
>> WSO2 Inc.
>
>
>

Re: Introducing J2XB for Axis

Posted by Yoav Abrahami <yo...@gmail.com>.
Hi Amila,

As you have noticed, J2XB is going in the direction of Java2WSDL, not
WSDL2Java. In fact, writing WSDL2Java in the case of J2XB is a challenge
because J2XB allows to map the same WSDL (actually the same XSD) to
different Java representations.

I have looked at the Java2WSDL code and it does not seem to allow any
extensions. Extending Java2WSDL to support J2XB will allow this tool to be
able to support more advanced Java structures (including collections,
constructors, etc) and generate more detailed XML schemas (constraints,
substitution groups, etc). It looks like we can either change the Java2WSDL
tool itself or write a new one.

Note that the J2XB Java code does not include methods such as toOM and
fromOM, instead we use a separate engine (from the model classes). How do I
implement the marshaling and unmarshaling of the WS call parts (I assume
those are converted to OMElements by Axis2) to J2XB? J2XB has the methods to
marshal and unmarshal an OMElement to Java classes. For unmarshling we
require the OMElement to unmarshal and it's QName. For marshaling we require
only the Java instance.

I have tried to find where XmlBeans is integrated into Axis2 for the marshal
and unmarshal and failed to find it. Can you point me at the right
direction?

Cheers,
  Yoav



On Mon, Jun 2, 2008 at 9:12 AM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:

> hi Yoav,
>
> As I understood from your mail it is not an alternative to ADB, Xmlbeans
> and jaxb. What these frameworks does is that they generate the java classes
> from a given schema.
> For me this is some what similar to jibx.
> you can have an idea of how Axis2 codegeneration works and overall axis2
> architecture (WSDL2java tool) here[1].
>
> And also please see the xmlbeans module. And see how xmlbeans integrated to
> Axis2.
> Here mainly you have to write a Codegen utility class
> (org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
> from the XmlSchema and return a Map which contain the QName and the
> generated class name. Axis2 codegen engine use this information to generate
> the classes.
>
> And also you need to write a binding template which mainly implement the
> toOM and fromOM methods.
>
> Then add an extension to Codegen module (eg.
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)
>
> to register with the WSDL2java tool.
>
> feel free to ask any question. I'll bit busy for this week. certainly be
> able to answer any thing from next week.
>
> thanks,
> Amila.
>
> [1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html
>
>
> On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <er...@gmail.com>
> wrote:
>
>> Hi Yoav,
>>
>> Good points. I think first you should approach to WSDL2Java generation.
>> You can see [1] for some information on it. That article was written by our
>> Mr. ADB and I think he will help you if you have any problem during the
>> process.
>>
>> I think first you will have to convince the devs here, that J2XB is really
>> good by some sorta performance or features implemented. Then they will deep
>> dive in to J2XB.
>>
>> Please read the above article [1] and let us know when you have problems.
>> Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB can be
>> any of "Axis2", "Ajith" or "Amila" ;) )
>>
>> One another point. ADB is not meant to be a complete data binding
>> framework. We designed it to be a simple framework which is tightly
>> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
>> most of the time, I think. I specially like it since it is light weight and
>> tightly coupled in to the internals of Axiom.
>>  If J2XB is a light weight framework to generate schema from Java
>> classes, then perhaps we might be able to use that to improve our Java2WSDL
>> as well. For the time being, IIRC, we use some sorta reflection and
>> annotations mechanism and definitely we like to get some help for that too.
>>
>> Thanks,
>> Eran Chinthaka
>>
>> [1] : http://wso2.org/library/35
>> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>
>>> Hi Eran,
>>>
>>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or JiBX.
>>>
>>>
>>> * XMLBeans Supports Java code generation from an XML schema - it requires
>>> that the generated binding classes be separate then the application classes
>>> and it does not generate an XML schema from Java code.
>>>
>>> * JiBX has good support for binding Java Beans to XML and back. However,
>>> it is still missing some features such as XML Schema generation (which is
>>> important for WSDL generation), XML list styles, flexibility in enumeration
>>> support, etc.
>>>
>>> * ADB - well, ADB is a simplistic databinding framework, but still has a
>>> lot of features missing compared to J2XB.
>>>
>>> I think that integrating J2XB into Axis 2 is a good idea (and hence this
>>> thread). However, I find it difficult to do so myself - I am not a member in
>>> the Axis 2 dev team. As such, except the technical difficulty, I do not have
>>> the knowledge now Axis 2 is structured and where the I should integrate J2XB
>>> (in the code). I am seeking help from you guys here to help in this
>>> integration.
>>>
>>> I can think of 4 possible integration points:
>>>
>>> * marshaling and unmarshaling XML to Java classes used as parameters for
>>> an Axis WS (in an AAR archive).
>>>
>>> * marshaling and unmarshaling MXL to Java classes used as parameters for
>>> an Axis WS client
>>>
>>> * automatic WSDL generation for a service in an AAR.
>>>
>>> * extending Java2WSDL to support J2XB binding
>>>
>>> I am basically looking of developer involvement (from the Axis team) to
>>> help creating those integrations.
>>>
>>> Cheers,
>>>   Yoav
>>>
>>>
>>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <
>>> eran.chinthaka@gmail.com> wrote:
>>>
>>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>>>
>>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>>>> compete with J2BX :)
>>>>
>>>>
>>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Axis dev team.
>>>>>
>>>>> (I hope this is the right mailing list. if not, my apologies)
>>>>>
>>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
>>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
>>>>> and offer some unique advantages over the existing bindings.
>>>>> see at http://j2xb.sourceforge.net/index.html
>>>>>
>>>>> J2XB is unique in that it allows to annotate Java classes and generate
>>>>> the XML schema (XSD) from the Java classes, including facets, constraints,
>>>>> etc. In addition, it allows to map any Java class to XML structure in a vary
>>>>> flexible way, supporting any Java class (POJO) including classes with
>>>>> non-trivial constructors and factories. All this is performed without need
>>>>> to write code or to generate code.
>>>>>
>>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>>>> generated form the Java classes. The XSD generated can then be controlled
>>>>> using the J2XB annotations.
>>>>>
>>>>> Note that J2XB allows considerably more control over the XML structure
>>>>> compared to JAXB.
>>>>>
>>>>> In hope that there is interest to join forces,
>>>>>
>>>>> Cheers,
>>>>>    Yoav
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> With Mettha,
>>>> Eran Chinthaka
>>>>
>>>> --------------------------------------------------------------------
>>>> Health is the greatest gift; contentment is the greatest wealth;
>>>> trusting is the best relationship; nirvana is the highest joy. - Dhammapada
>>>
>>>
>>>
>>
>>
>> --
>> With Mettha,
>> Eran Chinthaka
>>
>> --------------------------------------------------------------------
>> Health is the greatest gift; contentment is the greatest wealth; trusting
>> is the best relationship; nirvana is the highest joy. - Dhammapada
>>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

Re: Introducing J2XB for Axis

Posted by Amila Suriarachchi <am...@gmail.com>.
hi Yoav,

As I understood from your mail it is not an alternative to ADB, Xmlbeans and
jaxb. What these frameworks does is that they generate the java classes from
a given schema.
For me this is some what similar to jibx.
you can have an idea of how Axis2 codegeneration works and overall axis2
architecture (WSDL2java tool) here[1].

And also please see the xmlbeans module. And see how xmlbeans integrated to
Axis2.
Here mainly you have to write a Codegen utility class
(org.apache.axis2.xmlbeans.CodeGenerationUtility) to generate the java code
from the XmlSchema and return a Map which contain the QName and the
generated class name. Axis2 codegen engine use this information to generate
the classes.

And also you need to write a binding template which mainly implement the
toOM and fromOM methods.

Then add an extension to Codegen module (eg.
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension)

to register with the WSDL2java tool.

feel free to ask any question. I'll bit busy for this week. certainly be
able to answer any thing from next week.

thanks,
Amila.

[1] http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html

On Sun, Jun 1, 2008 at 11:35 PM, Eran Chinthaka <er...@gmail.com>
wrote:

> Hi Yoav,
>
> Good points. I think first you should approach to WSDL2Java generation. You
> can see [1] for some information on it. That article was written by our Mr.
> ADB and I think he will help you if you have any problem during the process.
>
>
> I think first you will have to convince the devs here, that J2XB is really
> good by some sorta performance or features implemented. Then they will deep
> dive in to J2XB.
>
> Please read the above article [1] and let us know when you have problems.
> Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB can be
> any of "Axis2", "Ajith" or "Amila" ;) )
>
> One another point. ADB is not meant to be a complete data binding
> framework. We designed it to be a simple framework which is tightly
> integrated in to things like AXIOM within Axis2. ADB might serve the purpose
> most of the time, I think. I specially like it since it is light weight and
> tightly coupled in to the internals of Axiom.
>  If J2XB is a light weight framework to generate schema from Java classes,
> then perhaps we might be able to use that to improve our Java2WSDL as well.
> For the time being, IIRC, we use some sorta reflection and annotations
> mechanism and definitely we like to get some help for that too.
>
> Thanks,
> Eran Chinthaka
>
> [1] : http://wso2.org/library/35
> On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>
>> Hi Eran,
>>
>> J2XB certainly introduces new functionality beyond ADB, XmlBeans or JiBX.
>>
>> * XMLBeans Supports Java code generation from an XML schema - it requires
>> that the generated binding classes be separate then the application classes
>> and it does not generate an XML schema from Java code.
>>
>> * JiBX has good support for binding Java Beans to XML and back. However,
>> it is still missing some features such as XML Schema generation (which is
>> important for WSDL generation), XML list styles, flexibility in enumeration
>> support, etc.
>>
>> * ADB - well, ADB is a simplistic databinding framework, but still has a
>> lot of features missing compared to J2XB.
>>
>> I think that integrating J2XB into Axis 2 is a good idea (and hence this
>> thread). However, I find it difficult to do so myself - I am not a member in
>> the Axis 2 dev team. As such, except the technical difficulty, I do not have
>> the knowledge now Axis 2 is structured and where the I should integrate J2XB
>> (in the code). I am seeking help from you guys here to help in this
>> integration.
>>
>> I can think of 4 possible integration points:
>>
>> * marshaling and unmarshaling XML to Java classes used as parameters for
>> an Axis WS (in an AAR archive).
>>
>> * marshaling and unmarshaling MXL to Java classes used as parameters for
>> an Axis WS client
>>
>> * automatic WSDL generation for a service in an AAR.
>>
>> * extending Java2WSDL to support J2XB binding
>>
>> I am basically looking of developer involvement (from the Axis team) to
>> help creating those integrations.
>>
>> Cheers,
>>   Yoav
>>
>>
>> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <er...@gmail.com>
>> wrote:
>>
>>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>>
>>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>>> compete with J2BX :)
>>>
>>>
>>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>>
>>>> Hi Axis dev team.
>>>>
>>>> (I hope this is the right mailing list. if not, my apologies)
>>>>
>>>> I have recently released the J2XB (Java 2 XML Binding) project as an
>>>> open source project. I believe J2XB can be used as a new binding for Axis 2
>>>> and offer some unique advantages over the existing bindings.
>>>> see at http://j2xb.sourceforge.net/index.html
>>>>
>>>> J2XB is unique in that it allows to annotate Java classes and generate
>>>> the XML schema (XSD) from the Java classes, including facets, constraints,
>>>> etc. In addition, it allows to map any Java class to XML structure in a vary
>>>> flexible way, supporting any Java class (POJO) including classes with
>>>> non-trivial constructors and factories. All this is performed without need
>>>> to write code or to generate code.
>>>>
>>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>>> generated form the Java classes. The XSD generated can then be controlled
>>>> using the J2XB annotations.
>>>>
>>>> Note that J2XB allows considerably more control over the XML structure
>>>> compared to JAXB.
>>>>
>>>> In hope that there is interest to join forces,
>>>>
>>>> Cheers,
>>>>    Yoav
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> With Mettha,
>>> Eran Chinthaka
>>>
>>> --------------------------------------------------------------------
>>> Health is the greatest gift; contentment is the greatest wealth; trusting
>>> is the best relationship; nirvana is the highest joy. - Dhammapada
>>
>>
>>
>
>
> --
> With Mettha,
> Eran Chinthaka
>
> --------------------------------------------------------------------
> Health is the greatest gift; contentment is the greatest wealth; trusting
> is the best relationship; nirvana is the highest joy. - Dhammapada
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Introducing J2XB for Axis

Posted by Eran Chinthaka <er...@gmail.com>.
Hi Yoav,

Good points. I think first you should approach to WSDL2Java generation. You
can see [1] for some information on it. That article was written by our Mr.
ADB and I think he will help you if you have any problem during the process.


I think first you will have to convince the devs here, that J2XB is really
good by some sorta performance or features implemented. Then they will deep
dive in to J2XB.

Please read the above article [1] and let us know when you have problems.
Ajith and Amila (gurus of ADB) will help you for sure. ("A" in ADB can be
any of "Axis2", "Ajith" or "Amila" ;) )

One another point. ADB is not meant to be a complete data binding framework.
We designed it to be a simple framework which is tightly integrated in to
things like AXIOM within Axis2. ADB might serve the purpose most of the
time, I think. I specially like it since it is light weight and tightly
coupled in to the internals of Axiom.
If J2XB is a light weight framework to generate schema from Java classes,
then perhaps we might be able to use that to improve our Java2WSDL as well.
For the time being, IIRC, we use some sorta reflection and annotations
mechanism and definitely we like to get some help for that too.

Thanks,
Eran Chinthaka

[1] : http://wso2.org/library/35
On Sun, Jun 1, 2008 at 1:51 AM, Yoav Abrahami <yo...@gmail.com> wrote:

> Hi Eran,
>
> J2XB certainly introduces new functionality beyond ADB, XmlBeans or JiBX.
>
> * XMLBeans Supports Java code generation from an XML schema - it requires
> that the generated binding classes be separate then the application classes
> and it does not generate an XML schema from Java code.
>
> * JiBX has good support for binding Java Beans to XML and back. However, it
> is still missing some features such as XML Schema generation (which is
> important for WSDL generation), XML list styles, flexibility in enumeration
> support, etc.
>
> * ADB - well, ADB is a simplistic databinding framework, but still has a
> lot of features missing compared to J2XB.
>
> I think that integrating J2XB into Axis 2 is a good idea (and hence this
> thread). However, I find it difficult to do so myself - I am not a member in
> the Axis 2 dev team. As such, except the technical difficulty, I do not have
> the knowledge now Axis 2 is structured and where the I should integrate J2XB
> (in the code). I am seeking help from you guys here to help in this
> integration.
>
> I can think of 4 possible integration points:
>
> * marshaling and unmarshaling XML to Java classes used as parameters for an
> Axis WS (in an AAR archive).
>
> * marshaling and unmarshaling MXL to Java classes used as parameters for an
> Axis WS client
>
> * automatic WSDL generation for a service in an AAR.
>
> * extending Java2WSDL to support J2XB binding
>
> I am basically looking of developer involvement (from the Axis team) to
> help creating those integrations.
>
> Cheers,
>   Yoav
>
>
> On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <er...@gmail.com>
> wrote:
>
>> Perhaps you can integrate J2XB into Axis2 and prove, using some
>> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>>
>> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to
>> compete with J2BX :)
>>
>>
>> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>>
>>> Hi Axis dev team.
>>>
>>> (I hope this is the right mailing list. if not, my apologies)
>>>
>>> I have recently released the J2XB (Java 2 XML Binding) project as an open
>>> source project. I believe J2XB can be used as a new binding for Axis 2 and
>>> offer some unique advantages over the existing bindings.
>>> see at http://j2xb.sourceforge.net/index.html
>>>
>>> J2XB is unique in that it allows to annotate Java classes and generate
>>> the XML schema (XSD) from the Java classes, including facets, constraints,
>>> etc. In addition, it allows to map any Java class to XML structure in a vary
>>> flexible way, supporting any Java class (POJO) including classes with
>>> non-trivial constructors and factories. All this is performed without need
>>> to write code or to generate code.
>>>
>>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>>> generated form the Java classes. The XSD generated can then be controlled
>>> using the J2XB annotations.
>>>
>>> Note that J2XB allows considerably more control over the XML structure
>>> compared to JAXB.
>>>
>>> In hope that there is interest to join forces,
>>>
>>> Cheers,
>>>    Yoav
>>>
>>>
>>>
>>
>>
>> --
>> With Mettha,
>> Eran Chinthaka
>>
>> --------------------------------------------------------------------
>> Health is the greatest gift; contentment is the greatest wealth; trusting
>> is the best relationship; nirvana is the highest joy. - Dhammapada
>
>
>


-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada

Re: Introducing J2XB for Axis

Posted by Yoav Abrahami <yo...@gmail.com>.
Hi Eran,

J2XB certainly introduces new functionality beyond ADB, XmlBeans or JiBX.

* XMLBeans Supports Java code generation from an XML schema - it requires
that the generated binding classes be separate then the application classes
and it does not generate an XML schema from Java code.

* JiBX has good support for binding Java Beans to XML and back. However, it
is still missing some features such as XML Schema generation (which is
important for WSDL generation), XML list styles, flexibility in enumeration
support, etc.

* ADB - well, ADB is a simplistic databinding framework, but still has a lot
of features missing compared to J2XB.

I think that integrating J2XB into Axis 2 is a good idea (and hence this
thread). However, I find it difficult to do so myself - I am not a member in
the Axis 2 dev team. As such, except the technical difficulty, I do not have
the knowledge now Axis 2 is structured and where the I should integrate J2XB
(in the code). I am seeking help from you guys here to help in this
integration.

I can think of 4 possible integration points:

* marshaling and unmarshaling XML to Java classes used as parameters for an
Axis WS (in an AAR archive).

* marshaling and unmarshaling MXL to Java classes used as parameters for an
Axis WS client

* automatic WSDL generation for a service in an AAR.

* extending Java2WSDL to support J2XB binding

I am basically looking of developer involvement (from the Axis team) to help
creating those integrations.

Cheers,
  Yoav

On Sat, May 31, 2008 at 5:13 AM, Eran Chinthaka <er...@gmail.com>
wrote:

> Perhaps you can integrate J2XB into Axis2 and prove, using some
> experimental results, the areas J2XB is better than ADB or XMLBeans or JiBX.
>
> And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to compete
> with J2BX :)
>
>
> On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com> wrote:
>
>> Hi Axis dev team.
>>
>> (I hope this is the right mailing list. if not, my apologies)
>>
>> I have recently released the J2XB (Java 2 XML Binding) project as an open
>> source project. I believe J2XB can be used as a new binding for Axis 2 and
>> offer some unique advantages over the existing bindings.
>> see at http://j2xb.sourceforge.net/index.html
>>
>> J2XB is unique in that it allows to annotate Java classes and generate the
>> XML schema (XSD) from the Java classes, including facets, constraints, etc.
>> In addition, it allows to map any Java class to XML structure in a vary
>> flexible way, supporting any Java class (POJO) including classes with
>> non-trivial constructors and factories. All this is performed without need
>> to write code or to generate code.
>>
>> Connecting J2XB and Axis 2 will result in the ability to white a Web
>> Service the axis way (POJO in an AAR) with WSDL generated including XSD
>> generated form the Java classes. The XSD generated can then be controlled
>> using the J2XB annotations.
>>
>> Note that J2XB allows considerably more control over the XML structure
>> compared to JAXB.
>>
>> In hope that there is interest to join forces,
>>
>> Cheers,
>>    Yoav
>>
>>
>>
>
>
> --
> With Mettha,
> Eran Chinthaka
>
> --------------------------------------------------------------------
> Health is the greatest gift; contentment is the greatest wealth; trusting
> is the best relationship; nirvana is the highest joy. - Dhammapada

Re: Introducing J2XB for Axis

Posted by Eran Chinthaka <er...@gmail.com>.
Perhaps you can integrate J2XB into Axis2 and prove, using some experimental
results, the areas J2XB is better than ADB or XMLBeans or JiBX.
And I hope this will motivate our ADB team and Mr. JiBX (Dennis) to compete
with J2BX :)

On Fri, May 30, 2008 at 4:30 AM, Yoav Abrahami <yo...@gmail.com> wrote:

> Hi Axis dev team.
>
> (I hope this is the right mailing list. if not, my apologies)
>
> I have recently released the J2XB (Java 2 XML Binding) project as an open
> source project. I believe J2XB can be used as a new binding for Axis 2 and
> offer some unique advantages over the existing bindings.
> see at http://j2xb.sourceforge.net/index.html
>
> J2XB is unique in that it allows to annotate Java classes and generate the
> XML schema (XSD) from the Java classes, including facets, constraints, etc.
> In addition, it allows to map any Java class to XML structure in a vary
> flexible way, supporting any Java class (POJO) including classes with
> non-trivial constructors and factories. All this is performed without need
> to write code or to generate code.
>
> Connecting J2XB and Axis 2 will result in the ability to white a Web
> Service the axis way (POJO in an AAR) with WSDL generated including XSD
> generated form the Java classes. The XSD generated can then be controlled
> using the J2XB annotations.
>
> Note that J2XB allows considerably more control over the XML structure
> compared to JAXB.
>
> In hope that there is interest to join forces,
>
> Cheers,
>    Yoav
>
>
>


-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada

Re: Introducing J2XB for Axis

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> Hi Axis dev team.
>
> (I hope this is the right mailing list. if not, my apologies)
>
> I have recently released the J2XB (Java 2 XML Binding) project as an 
> open source project. I believe J2XB can be used as a new binding for 
> Axis 2 and offer some unique advantages over the existing bindings.
> see at http://j2xb.sourceforge.net/index.html
>
> J2XB is unique in that it allows to annotate Java classes and generate 
> the XML schema (XSD) from the Java classes, including facets, 
> constraints, etc. In addition, it allows to map any Java class to XML 
> structure in a vary flexible way, supporting any Java class (POJO) 
> including classes with non-trivial constructors and factories. All 
> this is performed without need to write code or to generate code.
Hmm, interesting we can have a extension to our POJO or come with new 
way of deploying POJO with J2XB. Probably new Deployer  ;-)

Thank you!
Deepal


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Introducing J2XB for Axis

Posted by Yoav Abrahami <yo...@gmail.com>.
Hi Matrin,

Facets is the term used by W3C to describe constraints on simple XML types,
such as the maxLength example you have below.

With J2XB, you include an annotation such as
@MOValidationString(maxLength=20)
public String getXXX() {...}

have a look at the examples and docs at
http://j2xb.sourceforge.net/index.html


As for WSDL2Java -
1. The idea of J2XB is to allow to support Java2WSDL properly, including
facets and data transformations. to support WSDL2Java we have good tools
with Axis 2 as they are (Note that if you have generated an XSD file using
J2XB, you could embed it into a WSDL and use WSDL2Java).

2. As you can see, my post was in the development group, not the users
group. J2XB integration into Axis is not done, it is just proposed. My hopes
are that the people of the Axis project will be interested in creating this
integration.

Cheers,
 Yoav


On Fri, May 30, 2008 at 4:00 PM, Martin <mg...@hotmail.com> wrote:

>  A few questions
> What is a facet a JSF TagLib or some implementation of C++ facet class?
>                                  How does J2XB implement facet?
> a constraint such as <element name=
>                                      <restriction base="string">
>                                        <maxLength value="20"/>
> how does one supply
> datatype of string
> maxLength of 20?
> Which decorator classes you utilise?
> do you use the existing Factory classes to accomplish class generation
> following this example from pom.xml?
>       <property>
>        <name>javax.xml.soap.MessageFactory</name>
>        <value>org.apache.axis2.saaj.MessageFactoryImpl</value>
>       </property>
>       <property>
>        <name>javax.xml.soap.SOAPFactory</name>
>        <value>org.apache.axis2.saaj.SOAPFactoryImpl</value>
>       </property>
>       <property>
>        <name>javax.xml.soap.SOAPConnectionFactory</name>
>        <value>org.apache.axis2.saaj.SOAPConnectionFactoryImpl</value>
>       </property>
>       <property>
>        <name>javax.xml.soap.MetaFactory</name>
>        <value>org.apache.axis2.saaj.SAAJMetaFactoryImpl</value>
>       </property>
>
> Can i use -d databinding to use the new databinding ?
> WSDL2Java -d J2XB
> (A -d databinding example from pom.xml)
>  <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>          <classpath refid="maven.runtime.classpath"/>
>          <classpath location="${compiled.classes.dir}"/>
>          <arg line="-d j2xb -ss -sd -t -o target/wsdl/Test01 -u -uri
> ${wsdl.source.dir}/Test01.wsdl"/>
>         </java>
> Can I use WSDL2Java -xsdconfig parameter to read the generated xsd? e.g.
> WSDL2Java  -xsdconfig <file path>
> Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans.
>
> Can I use <*xsd:include* schemaLocation="GeneratedXSD.xsd"/>
> to include the generated xsd?
>
> Thanks
> Martin
>
> ----- Original Message -----
> *From:* Yoav Abrahami <yo...@gmail.com>
> *To:* axis-dev@ws.apache.org
> *Sent:* Friday, May 30, 2008 7:30 AM
> *Subject:* Introducing J2XB for Axis
>
> Hi Axis dev team.
>
> (I hope this is the right mailing list. if not, my apologies)
>
> I have recently released the J2XB (Java 2 XML Binding) project as an open
> source project. I believe J2XB can be used as a new binding for Axis 2 and
> offer some unique advantages over the existing bindings.
> see at http://j2xb.sourceforge.net/index.html
>
> J2XB is unique in that it allows to annotate Java classes and generate the
> XML schema (XSD) from the Java classes, including facets, constraints, etc.
> In addition, it allows to map any Java class to XML structure in a vary
> flexible way, supporting any Java class (POJO) including classes with
> non-trivial constructors and factories. All this is performed without need
> to write code or to generate code.
>
> Connecting J2XB and Axis 2 will result in the ability to white a Web
> Service the axis way (POJO in an AAR) with WSDL generated including XSD
> generated form the Java classes. The XSD generated can then be controlled
> using the J2XB annotations.
>
> Note that J2XB allows considerably more control over the XML structure
> compared to JAXB.
>
> In hope that there is interest to join forces,
>
> Cheers,
>    Yoav
>
>
>