You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tom Oinn <tm...@ebi.ac.uk> on 2004/05/15 14:02:37 UTC
Generic invocation with complex document types
Hi all,
We have a workflow system called Taverna (taverna.sf.net) which uses
axis for the parts it need to call web service based components. I was
able to use the dynamic invocation example to construct this and to use
wsdl4j and axis's wsdl parsing to present the user with a view on the
service that looks like a standard 'chip' type thing, has inputs and
outputs and a big button marked go (this is per operation, obviously).
This all works very nicely, can consume .net service and others as long
as they're using simple types, so string, byte[] and arrays of these. As
it happens this is normally sufficient, in our community
(bioinformatics) these are far and away the most common services,
descending as they do from wrapped command line tools - obviously a
command line tool consumes files so binary or text is cool.
There are a few services out there, however, which are document oriented
and use complex types. All well and good, but of course our current
framework panics and so our users can't construct workflows containing
these types and that's a shame. What I was thinking of doing was
presenting an operation that consumed complex types as always being
document oriented, so in the workflow it would have a single input xml
and a single output xml document. These can then be parsed and created
by adjacent processing entities in the workflow.
So - how easy is it going to be to modify the existing dynamic
invocation code to a) notice that there's a complex type and b) switch
automagically into something that looks like a document style invocation?
Any pointers or experiences would be most helpful.
Cheers,
Tom
Re: Generic invocation with complex document types
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Davanum Srinivas wrote:
>If you can find a simple webservice/wsdl in the wild (one that i can
>access) that you'd like to use as an example, i'd be happy to hack
>DynamicInvoker to work with it. It'd take me a few days to get to it
>and you will have to open an enhancement request in JIRA (with the
>wsdl), just so that we don't forget this.
>
>
>
it is surprisingly hard to find WSDL for service that takes complex
types as input (plenty that output complex types) i wonder why ...
>On Sat, 15 May 2004 12:23:18 -0700, Jeff Greif
><jg...@alumni.princeton.edu> wrote:
>
>
>>You would crack the wsdl for the operations. Determine the types of the
>>parts (or the elements in doc/lit), find out if they are complex types, and
>>if so, register an ElementSerializer or Deserializer (depending on whether
>>an input or return part) for the corresponding xml type or element name.
>>
>>
maybe this could work better if ElementSerializer/Deserializer was used
by default for all XML elements that have no ser/deserializer
associated? this way one would be able to receive messages that may have
unknown XML content instead of trying to register ser/deser for all
possible XML element names?
alek
>>Then you would pass in an Element (or subclass) for each complex input part,
>>and get back an Element for each complex return.
>>
>>Jeff
>>
>>
>>----- Original Message -----
>>From: "Tom Oinn" <tm...@ebi.ac.uk>
>>To: <ax...@ws.apache.org>
>>Sent: Saturday, May 15, 2004 10:03 AM
>>Subject: Re: Generic invocation with complex document types
>>
>>
>>
>>>Davanum Srinivas wrote:
>>>
>>>
>>>
>>>>Tom,
>>>>
>>>>You will need to traverse the symbol table and register say the
>>>>ElementSerializer/ElementDeserializer or your own custom ser/deser
>>>>before invoke. It should not be very difficult.
>>>>
>>>>
>>>Dims,
>>>
>>>That's what I was guessing but I haven't had much luck finding more
>>>information, could you point me in the right direction? I assume you
>>>mean to determine in the first stage what type axis is going to want a
>>>serializer for and then registering the ElementSerializer explicitly for
>>>that type?
>>>
>>>Cheers,
>>>
>>>Tom
>>>
>>>btw - anyone fancy hacking on an open source workflow project?
>>>
>>>
>>>
>>
>>
--
The best way to predict the future is to invent it - Alan Kay
Re: Generic invocation with complex document types
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
I know a way to do this (but the code is WSIF-based and proprietary, so I
can't just post it). I was attempting to answer the OP's question.
There is quite a bit of information on the wsif-user list on this subject.
I looked in the archives on marc.theaimsgroup.com and found a few threads
using the words "dynamic invoker complex type" The techniques apply to axis
also.
Jeff
----- Original Message -----
From: "Davanum Srinivas" <da...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Saturday, May 15, 2004 2:31 PM
Subject: Re: Generic invocation with complex document types
> Jeff,
>
> If you can find a simple webservice/wsdl in the wild (one that i can
> access) that you'd like to use as an example, i'd be happy to hack
> DynamicInvoker to work with it. It'd take me a few days to get to it
> and you will have to open an enhancement request in JIRA (with the
> wsdl), just so that we don't forget this.
>
> thanks,
> dims
>
> On Sat, 15 May 2004 12:23:18 -0700, Jeff Greif
> <jg...@alumni.princeton.edu> wrote:
> >
> > You would crack the wsdl for the operations. Determine the types of the
> > parts (or the elements in doc/lit), find out if they are complex types,
and
> > if so, register an ElementSerializer or Deserializer (depending on
whether
> > an input or return part) for the corresponding xml type or element name.
> >
> > Then you would pass in an Element (or subclass) for each complex input
part,
> > and get back an Element for each complex return.
> >
> > Jeff
> >
> >
> > ----- Original Message -----
> > From: "Tom Oinn" <tm...@ebi.ac.uk>
> > To: <ax...@ws.apache.org>
> > Sent: Saturday, May 15, 2004 10:03 AM
> > Subject: Re: Generic invocation with complex document types
> >
> > > Davanum Srinivas wrote:
> > >
> > > > Tom,
> > > >
> > > > You will need to traverse the symbol table and register say the
> > > > ElementSerializer/ElementDeserializer or your own custom ser/deser
> > > > before invoke. It should not be very difficult.
> > >
> > > Dims,
> > >
> > > That's what I was guessing but I haven't had much luck finding more
> > > information, could you point me in the right direction? I assume you
> > > mean to determine in the first stage what type axis is going to want a
> > > serializer for and then registering the ElementSerializer explicitly
for
> > > that type?
> > >
> > > Cheers,
> > >
> > > Tom
> > >
> > > btw - anyone fancy hacking on an open source workflow project?
> > >
> >
> >
>
Re: Generic invocation with complex document types
Posted by Davanum Srinivas <da...@gmail.com>.
Jeff,
If you can find a simple webservice/wsdl in the wild (one that i can
access) that you'd like to use as an example, i'd be happy to hack
DynamicInvoker to work with it. It'd take me a few days to get to it
and you will have to open an enhancement request in JIRA (with the
wsdl), just so that we don't forget this.
thanks,
dims
On Sat, 15 May 2004 12:23:18 -0700, Jeff Greif
<jg...@alumni.princeton.edu> wrote:
>
> You would crack the wsdl for the operations. Determine the types of the
> parts (or the elements in doc/lit), find out if they are complex types, and
> if so, register an ElementSerializer or Deserializer (depending on whether
> an input or return part) for the corresponding xml type or element name.
>
> Then you would pass in an Element (or subclass) for each complex input part,
> and get back an Element for each complex return.
>
> Jeff
>
>
> ----- Original Message -----
> From: "Tom Oinn" <tm...@ebi.ac.uk>
> To: <ax...@ws.apache.org>
> Sent: Saturday, May 15, 2004 10:03 AM
> Subject: Re: Generic invocation with complex document types
>
> > Davanum Srinivas wrote:
> >
> > > Tom,
> > >
> > > You will need to traverse the symbol table and register say the
> > > ElementSerializer/ElementDeserializer or your own custom ser/deser
> > > before invoke. It should not be very difficult.
> >
> > Dims,
> >
> > That's what I was guessing but I haven't had much luck finding more
> > information, could you point me in the right direction? I assume you
> > mean to determine in the first stage what type axis is going to want a
> > serializer for and then registering the ElementSerializer explicitly for
> > that type?
> >
> > Cheers,
> >
> > Tom
> >
> > btw - anyone fancy hacking on an open source workflow project?
> >
>
>
Re: Generic invocation with complex document types
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
You would crack the wsdl for the operations. Determine the types of the
parts (or the elements in doc/lit), find out if they are complex types, and
if so, register an ElementSerializer or Deserializer (depending on whether
an input or return part) for the corresponding xml type or element name.
Then you would pass in an Element (or subclass) for each complex input part,
and get back an Element for each complex return.
Jeff
----- Original Message -----
From: "Tom Oinn" <tm...@ebi.ac.uk>
To: <ax...@ws.apache.org>
Sent: Saturday, May 15, 2004 10:03 AM
Subject: Re: Generic invocation with complex document types
> Davanum Srinivas wrote:
>
> > Tom,
> >
> > You will need to traverse the symbol table and register say the
> > ElementSerializer/ElementDeserializer or your own custom ser/deser
> > before invoke. It should not be very difficult.
>
> Dims,
>
> That's what I was guessing but I haven't had much luck finding more
> information, could you point me in the right direction? I assume you
> mean to determine in the first stage what type axis is going to want a
> serializer for and then registering the ElementSerializer explicitly for
> that type?
>
> Cheers,
>
> Tom
>
> btw - anyone fancy hacking on an open source workflow project?
>
Re: Generic invocation with complex document types
Posted by Tom Oinn <tm...@ebi.ac.uk>.
Davanum Srinivas wrote:
> Tom,
>
> You will need to traverse the symbol table and register say the
> ElementSerializer/ElementDeserializer or your own custom ser/deser
> before invoke. It should not be very difficult.
Dims,
That's what I was guessing but I haven't had much luck finding more
information, could you point me in the right direction? I assume you
mean to determine in the first stage what type axis is going to want a
serializer for and then registering the ElementSerializer explicitly for
that type?
Cheers,
Tom
btw - anyone fancy hacking on an open source workflow project?
Re: Generic invocation with complex document types
Posted by Davanum Srinivas <da...@gmail.com>.
See http://marc.theaimsgroup.com/?l=axis-dev&m=108481109425165&w=2.
Got google search working with DynamicInvoker. The result is in a
org.w3c.dom.Element object.
-- dims
On Sat, 15 May 2004 09:58:28 -0400, Davanum Srinivas <da...@gmail.com> wrote:
> Tom,
>
> You will need to traverse the symbol table and register say the
> ElementSerializer/ElementDeserializer or your own custom ser/deser
> before invoke. It should not be very difficult.
>
> -- dims
>
>
>
> On Sat, 15 May 2004 13:02:37 +0100, Tom Oinn <tm...@ebi.ac.uk> wrote:
> >
> > Hi all,
> >
> > We have a workflow system called Taverna (taverna.sf.net) which uses
> > axis for the parts it need to call web service based components. I was
> > able to use the dynamic invocation example to construct this and to use
> > wsdl4j and axis's wsdl parsing to present the user with a view on the
> > service that looks like a standard 'chip' type thing, has inputs and
> > outputs and a big button marked go (this is per operation, obviously).
> >
> > This all works very nicely, can consume .net service and others as long
> > as they're using simple types, so string, byte[] and arrays of these. As
> > it happens this is normally sufficient, in our community
> > (bioinformatics) these are far and away the most common services,
> > descending as they do from wrapped command line tools - obviously a
> > command line tool consumes files so binary or text is cool.
> >
> > There are a few services out there, however, which are document oriented
> > and use complex types. All well and good, but of course our current
> > framework panics and so our users can't construct workflows containing
> > these types and that's a shame. What I was thinking of doing was
> > presenting an operation that consumed complex types as always being
> > document oriented, so in the workflow it would have a single input xml
> > and a single output xml document. These can then be parsed and created
> > by adjacent processing entities in the workflow.
> >
> > So - how easy is it going to be to modify the existing dynamic
> > invocation code to a) notice that there's a complex type and b) switch
> > automagically into something that looks like a document style invocation?
> >
> > Any pointers or experiences would be most helpful.
> >
> > Cheers,
> >
> > Tom
> >
>
Re: Generic invocation with complex document types
Posted by Davanum Srinivas <da...@gmail.com>.
Tom,
You will need to traverse the symbol table and register say the
ElementSerializer/ElementDeserializer or your own custom ser/deser
before invoke. It should not be very difficult.
-- dims
On Sat, 15 May 2004 13:02:37 +0100, Tom Oinn <tm...@ebi.ac.uk> wrote:
>
> Hi all,
>
> We have a workflow system called Taverna (taverna.sf.net) which uses
> axis for the parts it need to call web service based components. I was
> able to use the dynamic invocation example to construct this and to use
> wsdl4j and axis's wsdl parsing to present the user with a view on the
> service that looks like a standard 'chip' type thing, has inputs and
> outputs and a big button marked go (this is per operation, obviously).
>
> This all works very nicely, can consume .net service and others as long
> as they're using simple types, so string, byte[] and arrays of these. As
> it happens this is normally sufficient, in our community
> (bioinformatics) these are far and away the most common services,
> descending as they do from wrapped command line tools - obviously a
> command line tool consumes files so binary or text is cool.
>
> There are a few services out there, however, which are document oriented
> and use complex types. All well and good, but of course our current
> framework panics and so our users can't construct workflows containing
> these types and that's a shame. What I was thinking of doing was
> presenting an operation that consumed complex types as always being
> document oriented, so in the workflow it would have a single input xml
> and a single output xml document. These can then be parsed and created
> by adjacent processing entities in the workflow.
>
> So - how easy is it going to be to modify the existing dynamic
> invocation code to a) notice that there's a complex type and b) switch
> automagically into something that looks like a document style invocation?
>
> Any pointers or experiences would be most helpful.
>
> Cheers,
>
> Tom
>