You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by James Strachan <js...@protique.com> on 2004/09/14 21:10:17 UTC

Generating interfaces from WSDL using XMLBeans

I like XMLBeans, and would like to use it as a simple to use SOAP stack.

e.g. given a WSDL for each port type generate an interface, then for 
each operation on the port type, add a method. For each 
parameter/return type on the method, use the XMLBean generated document 
type interface.

This seems such an obvious thing to do I'm surprised noone's done it 
yet - or maybe they have? Anyone ever tried such a thing or would there 
be interest in extending the scomp to be able to generate interfaces 
for WSDL ports? I noticed that scomp can take WSDLs, it seems a shame 
not to go the next step and provide a nice & simple XMLBeans style POJO 
interface to WSDL endpoints.

James

/**********************************
* James Strachan
*
* Protique
* http://protique.com/
* Enterprise Open Source
*
* Blog:
* http://radio.weblogs.com/0112098/
**********************************/


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


Re: Generating interfaces from WSDL using XMLBeans

Posted by James Strachan <js...@protique.com>.
On 16 Sep 2004, at 07:32, Aleksander Slominski wrote:
> James Strachan wrote:
>> I like XMLBeans, and would like to use it as a simple to use SOAP 
>> stack.
>>
>> e.g. given a WSDL for each port type generate an interface, then for 
>> each operation on the port type, add a method. For each 
>> parameter/return type on the method, use the XMLBean generated 
>> document type interface.
>>
>> This seems such an obvious thing to do I'm surprised noone's done it 
>> yet - or maybe they have? Anyone ever tried such a thing or would 
>> there be interest in extending the scomp to be able to generate 
>> interfaces for WSDL ports?
>
> i started doing it and discussed it few weeks ago (you can check 
> archives) but never had time to finish it ...

Cool, thanks - I hunted around the archives and googled but couldn't 
find any code or discussion of where the code is (though I did see some 
discussion of the idea of a WSDL2Java which generates XMLBeans aware 
interfaces/stubs). Did you ever submit a patch or check stuff in? I'll 
happily take it on & try finish off where you'd got to.


>> I noticed that scomp can take WSDLs, it seems a shame not to go the 
>> next step and provide a nice & simple XMLBeans style POJO interface 
>> to WSDL endpoints.
>
> i wanted to create my own wsdl2java that would use Xmlbeans generated 
> types corresponding to wsdl:types/xsd:schema in wsdl:defintions file - 
> when generating Java interface wsld2java would and use scomp only to 
> compile wsdl:types/xsd:schema (or picked generated classes from 
> CLASSPATH).

Sounds like just what I was after too. Though I'm happy currently to 
take a bunch of WSDLs and generate the interfaces and the XMLBeans in 
one step. i.e. generate all the message types and the interfaces at the 
same time, rather than having to find them on the classpath - but that 
could be handy too.


> BTW: we use XmlBeans v1 in XSOAP4/XSUL for some of message oriented 
> services and it worked pretty well (it is not always needed to have 
> both full XML infoset *and* XML schema generated Java classes 
> represention in memory - it gives double overhead of both DOM and POJO 
> and instead you may elect to bind XML to Java types and discard XML 
> ifnoset or use XML infoset directly and provide wrappers which 
> manipulate XML infoset...)

Agreed.

James

/**********************************
* James Strachan
*
* Protique
* http://protique.com/
* Enterprise Open Source
*
* Blog:
* http://radio.weblogs.com/0112098/
**********************************/


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


Re: Generating interfaces from WSDL using XMLBeans

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
James Strachan wrote:

> I like XMLBeans, and would like to use it as a simple to use SOAP stack.
>
> e.g. given a WSDL for each port type generate an interface, then for 
> each operation on the port type, add a method. For each 
> parameter/return type on the method, use the XMLBean generated 
> document type interface.
>
> This seems such an obvious thing to do I'm surprised noone's done it 
> yet - or maybe they have? Anyone ever tried such a thing or would 
> there be interest in extending the scomp to be able to generate 
> interfaces for WSDL ports?

i started doing it and discussed it few weeks ago (you can check 
archives) but never had time to finish it ...

> I noticed that scomp can take WSDLs, it seems a shame not to go the 
> next step and provide a nice & simple XMLBeans style POJO interface to 
> WSDL endpoints.

i wanted to create my own wsdl2java that would use Xmlbeans generated 
types corresponding to wsdl:types/xsd:schema in wsdl:defintions file - 
when generating Java interface wsld2java would and use scomp only to 
compile wsdl:types/xsd:schema (or picked generated classes from CLASSPATH).

thanks,

alek

BTW: we use XmlBeans v1 in XSOAP4/XSUL for some of message oriented 
services and it worked pretty well (it is not always needed to have both 
full XML infoset *and* XML schema generated Java classes represention in 
memory - it gives double overhead of both DOM and POJO and instead you 
may elect to bind XML to Java types and discard XML ifnoset or use XML 
infoset directly and provide wrappers which manipulate XML infoset...)

-- 
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