You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Deepal Jayasinghe <de...@gmail.com> on 2005/11/23 06:26:47 UTC

Java2Schema

Hi ;

I am an Axis2 developer and I am going to implement Java2WSDL for Axis2, =
I tried to use Aixs 1.x code but there are some restrictions on Axis 1.x =
by Axis2 so I can not directly use those.=20

Can JaxMe be used to generate schema for a java class , if so point to a =
sample or a good article to understand how to do that.


Thanks,
 Deepal
................................................................
~Future is Open~

Re: Java2Schema

Posted by Deepal Jayasinghe <de...@gmail.com>.
Hi Jochen;

I also have completed (not fully ) Java2scheam generation using JAM , and I 
have a look at your Java2 schema generation to get the best from it  :)

Thanks,
 Deepal
................................................................
~Future is Open~

----- Original Message ----- 
From: "Jochen Wiedmann" <jo...@gmail.com>
To: <di...@apache.org>
Cc: "Deepal Jayasinghe" <de...@gmail.com>; <ja...@ws.apache.org>
Sent: Friday, December 02, 2005 4:05 AM
Subject: Re: Java2Schema


> Davanum Srinivas wrote:
>
>> All we need it the following. We are going to stick the generated XSD
>> into a WSDL. That's it.
>
> Ok, have a look at the class BeanSchemaWriter, which I have just checked 
> into SVN. It is not yet documented and not yet feature complete and most 
> possibly it contains bugs. However, it already supports recursion and 
> proper mapping of subclasses to xs:extension. See the method 
> BeanReaderTest.testCreateSchema() for an example.
>
>
> Jochen 


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


Re: Java2Schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
Davanum Srinivas wrote:

> All we need it the following. We are going to stick the generated XSD
> into a WSDL. That's it.

Ok, have a look at the class BeanSchemaWriter, which I have just checked 
into SVN. It is not yet documented and not yet feature complete and most 
possibly it contains bugs. However, it already supports recursion and 
proper mapping of subclasses to xs:extension. See the method 
BeanReaderTest.testCreateSchema() for an example.


Jochen

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


Re: Java2Schema

Posted by Davanum Srinivas <da...@gmail.com>.
Jochen,

All we need it the following. We are going to stick the generated XSD
into a WSDL. That's it.

"Create a class "BeanReader", or whatever, which uses JaxMeJS
reflection to inspect a given Java bean class. The bean readers
purpose is the creation of an equivalent XML schema"

Thanks,
dims

On 11/23/05, Jochen Wiedmann <jo...@gmail.com> wrote:
> Davanum Srinivas wrote:
>
> > Nice...So what is the delta required ("required changes are few")?
>
> The required functionality requires two parts:
>
> a) Create a class "BeanReader", or whatever, which uses JaxMeJS
>     reflection to inspect a given Java bean class. The bean readers
>     purpose is the creation of an equivalent XML schema, which can
>     then be used as input for JaxMe.
>
>     If we restrict the first version to those classes, which are
>     already supported by JaxMe (in other words: Java primitive types,
>     the corresponding object types, Calendar, lists, arrays, ...
>     as opposed to arbitrary collections and instances of Map), then
>     a first working version should be ready within 8 or 10 hours of
>     work. The other data types could be added later without too much
>     effort.
>
>     The created XML schema would also need to contain special
>     annotations, which advice JaxMe that
>
>     1) no interface is being used for the created classes and
>     2) rather than creating own bean classes, the original bean
>        class is being used
>
> b) The rest of the job is adding support for 1) and 2). Setting up
>     an example, running the generator on it and looking for errors
>     in the compiled classes would easily show, what changes are
>     required. I believe, that this is more work than a), but another
>     20 or 25 hours should really do.
>
> The main question is for me to find the time. However, I was looking
> forward into work on JaxMe anyways (with different priorities, though),
> since my proposal for XML-RPC 3 is out. In other words, about 30-40
> hours of work is definitely possible within the next four weeks or so.
> (In particular, because this job is far away from being as complex as
> the support for arbitrary nested groups, which I planned to work on.)
>
>
> Jochen
>


--
Davanum Srinivas : http://wso2.com/blogs/

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


Re: Java2Schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
Davanum Srinivas wrote:

> Nice...So what is the delta required ("required changes are few")?

The required functionality requires two parts:

a) Create a class "BeanReader", or whatever, which uses JaxMeJS
    reflection to inspect a given Java bean class. The bean readers
    purpose is the creation of an equivalent XML schema, which can
    then be used as input for JaxMe.

    If we restrict the first version to those classes, which are
    already supported by JaxMe (in other words: Java primitive types,
    the corresponding object types, Calendar, lists, arrays, ...
    as opposed to arbitrary collections and instances of Map), then
    a first working version should be ready within 8 or 10 hours of
    work. The other data types could be added later without too much
    effort.

    The created XML schema would also need to contain special
    annotations, which advice JaxMe that

    1) no interface is being used for the created classes and
    2) rather than creating own bean classes, the original bean
       class is being used

b) The rest of the job is adding support for 1) and 2). Setting up
    an example, running the generator on it and looking for errors
    in the compiled classes would easily show, what changes are
    required. I believe, that this is more work than a), but another
    20 or 25 hours should really do.

The main question is for me to find the time. However, I was looking 
forward into work on JaxMe anyways (with different priorities, though), 
since my proposal for XML-RPC 3 is out. In other words, about 30-40 
hours of work is definitely possible within the next four weeks or so. 
(In particular, because this job is far away from being as complex as 
the support for arbitrary nested groups, which I planned to work on.)


Jochen

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


Re: Java2Schema

Posted by Davanum Srinivas <da...@gmail.com>.
Nice...So what is the delta required ("required changes are few")?

thanks,
dims

On 11/23/05, Jochen Wiedmann <jo...@gmail.com> wrote:
> On 11/23/05, Davanum Srinivas <da...@gmail.com> wrote:
>
> > Are u talking about parsing a java source file? or introspecting using
> > reflection on the compiled code?
>
> Dims,
>
> the proposed solution would offer both: See
>
>    http://ws.apache.org/jaxme/js/jparser.html
>
> Jochen
>
>
> --
> Often it does seem a pity that Noah and his party did not miss the
> boat. (Mark Twain)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: jaxme-dev-help@ws.apache.org
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

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


Re: Java2Schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/23/05, Davanum Srinivas <da...@gmail.com> wrote:

> Are u talking about parsing a java source file? or introspecting using
> reflection on the compiled code?

Dims,

the proposed solution would offer both: See

   http://ws.apache.org/jaxme/js/jparser.html

Jochen


--
Often it does seem a pity that Noah and his party did not miss the
boat. (Mark Twain)

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


Re: Java2Schema

Posted by Davanum Srinivas <da...@gmail.com>.
Jochen,

Are u talking about parsing a java source file? or introspecting using
reflection on the compiled code?

thanks,
dims

On 11/23/05, Jochen Wiedmann <jo...@gmail.com> wrote:
> Deepal Jayasinghe wrote:
>
> > I am an Axis2 developer and I am going to implement Java2WSDL for Axis2, =
> > I tried to use Aixs 1.x code but there are some restrictions on Axis 1.x =
> > by Axis2 so I can not directly use those.=20
> >
> > Can JaxMe be used to generate schema for a java class , if so point to a =
> > sample or a good article to understand how to do that.
>
> Deepal,
>
> it is currently not possible. However, the required changes are few, and
> if you request this as a feature for Axis 2, then we'll simply make it
> possible in the short term, say till the end of December. Will that do?
>
> Jochen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: jaxme-dev-help@ws.apache.org
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

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


Re: Java2Schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
Deepal Jayasinghe wrote:

> I am an Axis2 developer and I am going to implement Java2WSDL for Axis2, =
> I tried to use Aixs 1.x code but there are some restrictions on Axis 1.x =
> by Axis2 so I can not directly use those.=20
> 
> Can JaxMe be used to generate schema for a java class , if so point to a =
> sample or a good article to understand how to do that.

Deepal,

it is currently not possible. However, the required changes are few, and 
if you request this as a feature for Axis 2, then we'll simply make it 
possible in the short term, say till the end of December. Will that do?

Jochen

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