You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Matthieu Riou <ma...@gmail.com> on 2007/07/06 01:48:24 UTC
BPEL implementation: WSDL and BPEL resolving
Hi guys,
I've done a few additional stuff on the BPEL implementation allowing a BPEL
file to be compiled by ODE upon deployment. The implementation is therefore
created and initialized with most of what would be needed by the runtime.
However there's still a couple of problems with resolution and finding my
way inside Tuscany code isn't that easy.
To resolve the WSDL implemented by the process I've been trying to go
through the resolution mechanism and declare the implementation I return in
the read() method of the processor as unresolved. However the resolve()
method is never called afterward and this results in a NullPointerException
in Tuscany as the InterfaceContract is never set. From what I could make out
of the code, it seems that the resolution mechanism happens for Interface
processors but not of implementations, but I could be wrong.
I've created a patch that adds the BPEL compilation and demonstrates the
problem using the test case. Please have a look at
BPELImplementationProcessor, you'll see how the implementation is built.
You'll also see that the BPEL file from now is directly loaded using an
additional "file" attribute. Ideally that should go as well to use the same
type of resolving as for the WSDL (when it will work).
Some help regarding this would be definitely welcome...
Thanks,
Matthieu
Re: BPEL implementation: WSDL and BPEL resolving
Posted by Luciano Resende <lu...@gmail.com>.
The loading of contribution has two phases : read and resolve.
* read phase : This is where you read an artifact (a document, an
XML element, classes etc.), populate a model representing the artifact
and return it. The SCA contribution service calls
ArtifactProcessor.read() on all artifacts that have an
ArtifactProcessor registered for them. If your model points to other
models, instead of trying to load these other models right away, you
should just keep the information representing that reference, which
you'll turn into a pointer to the referenced model in the resolve()
phase. Note that you don't necessarily need to fully read and populate
your model at this point, you can choose to complete it later.
* resolve phase : This phase gives you the opportunity to resolve
references to other models (a WSDL, a class, another composite, a
componentType). At this point, all models representing the artifacts
in your SCA contribution have been read, registered in the
contribution's ArtifactResolver, and are ready to be resolved.
The resolution is going to happen when the contribution is loaded, and
my understanding is that some recent changes from Raymond will also
make some loading/resolution only happen if the artifact is indeed
referenced.
Some more info here [1]
[1] http://cwiki.apache.org/confluence/display/TUSCANY/SCA+Java+Architecture+Guide
On 8/3/07, Matthieu Riou <ma...@gmail.com> wrote:
> Hi Raymond,
>
> Sorry for the late reply, your e-mail passed through my filters :) The
> approach described in the document sounds good to me, it's similar to what
> we're doing for import resolution within an ODE deployment package. So that
> should work. The only part I'm not so clear about though is when the
> resolution occurs, is it when the contribution is loaded?
>
> And thanks for the congrats!
>
> Matthieu
>
> On 7/31/07, Raymond Feng <en...@gmail.com> wrote:
> >
> > Hi, Matthieu.
> >
> > Congratulations on the ODE graduation!
> >
> > We have made some processes in Tuscany regarding to the artifact
> > resolving.
> > Please see more details at
> >
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Resolving+WSDL+and+XSD+artifacts
> > .
> >
> > I think the strategy will apply to BPEL as well. Would you please take a
> > look? Hopefully, we can get the implementation.bpel working soon.
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message -----
> > From: "Matthieu Riou" <ma...@gmail.com>
> > To: "Luciano Resende" <lu...@gmail.com>
> > Cc: <tu...@ws.apache.org>
> > Sent: Thursday, July 05, 2007 5:08 PM
> > Subject: Re: BPEL implementation: WSDL and BPEL resolving
> >
> >
> > > Sure, no problem. And thanks :-)
> > >
> > > On 7/5/07, Luciano Resende <lu...@gmail.com> wrote:
> > >>
> > >> Thanks Matthieu
> > >>
> > >> I'm little overbooked these days, but let me see if I could try to
> > >> look into the resolution thing over the weekend. Is that OK ?
> > >>
> > >> On 7/5/07, Matthieu Riou <ma...@gmail.com> wrote:
> > >> > Hi guys,
> > >> >
> > >> > I've done a few additional stuff on the BPEL implementation allowing
> > a
> > >> BPEL
> > >> > file to be compiled by ODE upon deployment. The implementation is
> > >> therefore
> > >> > created and initialized with most of what would be needed by the
> > >> runtime.
> > >> > However there's still a couple of problems with resolution and
> > finding
> > >> my
> > >> > way inside Tuscany code isn't that easy.
> > >> >
> > >> > To resolve the WSDL implemented by the process I've been trying to go
> > >> > through the resolution mechanism and declare the implementation I
> > >> > return
> > >> in
> > >> > the read() method of the processor as unresolved. However the
> > resolve()
> > >> > method is never called afterward and this results in a
> > >> NullPointerException
> > >> > in Tuscany as the InterfaceContract is never set. From what I could
> > >> > make
> > >> out
> > >> > of the code, it seems that the resolution mechanism happens for
> > >> Interface
> > >> > processors but not of implementations, but I could be wrong.
> > >> >
> > >> > I've created a patch that adds the BPEL compilation and demonstrates
> > >> > the
> > >> > problem using the test case. Please have a look at
> > >> > BPELImplementationProcessor, you'll see how the implementation is
> > >> > built.
> > >> > You'll also see that the BPEL file from now is directly loaded using
> > an
> > >> > additional "file" attribute. Ideally that should go as well to use
> > the
> > >> same
> > >> > type of resolving as for the WSDL (when it will work).
> > >> >
> > >> > Some help regarding this would be definitely welcome...
> > >> >
> > >> > Thanks,
> > >> > Matthieu
> > >> >
> > >>
> > >>
> > >> --
> > >> Luciano Resende
> > >> Apache Tuscany Committer
> > >> http://people.apache.org/~lresende
> > >> http://lresende.blogspot.com/
> > >>
> > >
> >
> >
>
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: BPEL implementation: WSDL and BPEL resolving
Posted by Matthieu Riou <ma...@gmail.com>.
Hi Raymond,
Sorry for the late reply, your e-mail passed through my filters :) The
approach described in the document sounds good to me, it's similar to what
we're doing for import resolution within an ODE deployment package. So that
should work. The only part I'm not so clear about though is when the
resolution occurs, is it when the contribution is loaded?
And thanks for the congrats!
Matthieu
On 7/31/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi, Matthieu.
>
> Congratulations on the ODE graduation!
>
> We have made some processes in Tuscany regarding to the artifact
> resolving.
> Please see more details at
>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Resolving+WSDL+and+XSD+artifacts
> .
>
> I think the strategy will apply to BPEL as well. Would you please take a
> look? Hopefully, we can get the implementation.bpel working soon.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Matthieu Riou" <ma...@gmail.com>
> To: "Luciano Resende" <lu...@gmail.com>
> Cc: <tu...@ws.apache.org>
> Sent: Thursday, July 05, 2007 5:08 PM
> Subject: Re: BPEL implementation: WSDL and BPEL resolving
>
>
> > Sure, no problem. And thanks :-)
> >
> > On 7/5/07, Luciano Resende <lu...@gmail.com> wrote:
> >>
> >> Thanks Matthieu
> >>
> >> I'm little overbooked these days, but let me see if I could try to
> >> look into the resolution thing over the weekend. Is that OK ?
> >>
> >> On 7/5/07, Matthieu Riou <ma...@gmail.com> wrote:
> >> > Hi guys,
> >> >
> >> > I've done a few additional stuff on the BPEL implementation allowing
> a
> >> BPEL
> >> > file to be compiled by ODE upon deployment. The implementation is
> >> therefore
> >> > created and initialized with most of what would be needed by the
> >> runtime.
> >> > However there's still a couple of problems with resolution and
> finding
> >> my
> >> > way inside Tuscany code isn't that easy.
> >> >
> >> > To resolve the WSDL implemented by the process I've been trying to go
> >> > through the resolution mechanism and declare the implementation I
> >> > return
> >> in
> >> > the read() method of the processor as unresolved. However the
> resolve()
> >> > method is never called afterward and this results in a
> >> NullPointerException
> >> > in Tuscany as the InterfaceContract is never set. From what I could
> >> > make
> >> out
> >> > of the code, it seems that the resolution mechanism happens for
> >> Interface
> >> > processors but not of implementations, but I could be wrong.
> >> >
> >> > I've created a patch that adds the BPEL compilation and demonstrates
> >> > the
> >> > problem using the test case. Please have a look at
> >> > BPELImplementationProcessor, you'll see how the implementation is
> >> > built.
> >> > You'll also see that the BPEL file from now is directly loaded using
> an
> >> > additional "file" attribute. Ideally that should go as well to use
> the
> >> same
> >> > type of resolving as for the WSDL (when it will work).
> >> >
> >> > Some help regarding this would be definitely welcome...
> >> >
> >> > Thanks,
> >> > Matthieu
> >> >
> >>
> >>
> >> --
> >> Luciano Resende
> >> Apache Tuscany Committer
> >> http://people.apache.org/~lresende
> >> http://lresende.blogspot.com/
> >>
> >
>
>
Re: BPEL implementation: WSDL and BPEL resolving
Posted by Raymond Feng <en...@gmail.com>.
Hi, Matthieu.
Congratulations on the ODE graduation!
We have made some processes in Tuscany regarding to the artifact resolving.
Please see more details at
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Resolving+WSDL+and+XSD+artifacts.
I think the strategy will apply to BPEL as well. Would you please take a
look? Hopefully, we can get the implementation.bpel working soon.
Thanks,
Raymond
----- Original Message -----
From: "Matthieu Riou" <ma...@gmail.com>
To: "Luciano Resende" <lu...@gmail.com>
Cc: <tu...@ws.apache.org>
Sent: Thursday, July 05, 2007 5:08 PM
Subject: Re: BPEL implementation: WSDL and BPEL resolving
> Sure, no problem. And thanks :-)
>
> On 7/5/07, Luciano Resende <lu...@gmail.com> wrote:
>>
>> Thanks Matthieu
>>
>> I'm little overbooked these days, but let me see if I could try to
>> look into the resolution thing over the weekend. Is that OK ?
>>
>> On 7/5/07, Matthieu Riou <ma...@gmail.com> wrote:
>> > Hi guys,
>> >
>> > I've done a few additional stuff on the BPEL implementation allowing a
>> BPEL
>> > file to be compiled by ODE upon deployment. The implementation is
>> therefore
>> > created and initialized with most of what would be needed by the
>> runtime.
>> > However there's still a couple of problems with resolution and finding
>> my
>> > way inside Tuscany code isn't that easy.
>> >
>> > To resolve the WSDL implemented by the process I've been trying to go
>> > through the resolution mechanism and declare the implementation I
>> > return
>> in
>> > the read() method of the processor as unresolved. However the resolve()
>> > method is never called afterward and this results in a
>> NullPointerException
>> > in Tuscany as the InterfaceContract is never set. From what I could
>> > make
>> out
>> > of the code, it seems that the resolution mechanism happens for
>> Interface
>> > processors but not of implementations, but I could be wrong.
>> >
>> > I've created a patch that adds the BPEL compilation and demonstrates
>> > the
>> > problem using the test case. Please have a look at
>> > BPELImplementationProcessor, you'll see how the implementation is
>> > built.
>> > You'll also see that the BPEL file from now is directly loaded using an
>> > additional "file" attribute. Ideally that should go as well to use the
>> same
>> > type of resolving as for the WSDL (when it will work).
>> >
>> > Some help regarding this would be definitely welcome...
>> >
>> > Thanks,
>> > Matthieu
>> >
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany Committer
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: BPEL implementation: WSDL and BPEL resolving
Posted by Matthieu Riou <ma...@gmail.com>.
Sure, no problem. And thanks :-)
On 7/5/07, Luciano Resende <lu...@gmail.com> wrote:
>
> Thanks Matthieu
>
> I'm little overbooked these days, but let me see if I could try to
> look into the resolution thing over the weekend. Is that OK ?
>
> On 7/5/07, Matthieu Riou <ma...@gmail.com> wrote:
> > Hi guys,
> >
> > I've done a few additional stuff on the BPEL implementation allowing a
> BPEL
> > file to be compiled by ODE upon deployment. The implementation is
> therefore
> > created and initialized with most of what would be needed by the
> runtime.
> > However there's still a couple of problems with resolution and finding
> my
> > way inside Tuscany code isn't that easy.
> >
> > To resolve the WSDL implemented by the process I've been trying to go
> > through the resolution mechanism and declare the implementation I return
> in
> > the read() method of the processor as unresolved. However the resolve()
> > method is never called afterward and this results in a
> NullPointerException
> > in Tuscany as the InterfaceContract is never set. From what I could make
> out
> > of the code, it seems that the resolution mechanism happens for
> Interface
> > processors but not of implementations, but I could be wrong.
> >
> > I've created a patch that adds the BPEL compilation and demonstrates the
> > problem using the test case. Please have a look at
> > BPELImplementationProcessor, you'll see how the implementation is built.
> > You'll also see that the BPEL file from now is directly loaded using an
> > additional "file" attribute. Ideally that should go as well to use the
> same
> > type of resolving as for the WSDL (when it will work).
> >
> > Some help regarding this would be definitely welcome...
> >
> > Thanks,
> > Matthieu
> >
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
Re: BPEL implementation: WSDL and BPEL resolving
Posted by Luciano Resende <lu...@gmail.com>.
Thanks Matthieu
I'm little overbooked these days, but let me see if I could try to
look into the resolution thing over the weekend. Is that OK ?
On 7/5/07, Matthieu Riou <ma...@gmail.com> wrote:
> Hi guys,
>
> I've done a few additional stuff on the BPEL implementation allowing a BPEL
> file to be compiled by ODE upon deployment. The implementation is therefore
> created and initialized with most of what would be needed by the runtime.
> However there's still a couple of problems with resolution and finding my
> way inside Tuscany code isn't that easy.
>
> To resolve the WSDL implemented by the process I've been trying to go
> through the resolution mechanism and declare the implementation I return in
> the read() method of the processor as unresolved. However the resolve()
> method is never called afterward and this results in a NullPointerException
> in Tuscany as the InterfaceContract is never set. From what I could make out
> of the code, it seems that the resolution mechanism happens for Interface
> processors but not of implementations, but I could be wrong.
>
> I've created a patch that adds the BPEL compilation and demonstrates the
> problem using the test case. Please have a look at
> BPELImplementationProcessor, you'll see how the implementation is built.
> You'll also see that the BPEL file from now is directly loaded using an
> additional "file" attribute. Ideally that should go as well to use the same
> type of resolving as for the WSDL (when it will work).
>
> Some help regarding this would be definitely welcome...
>
> Thanks,
> Matthieu
>
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: BPEL implementation: WSDL and BPEL resolving - FOUND YOUR PROBLEM
Posted by Mike Edwards <mi...@gmail.com>.
Matthieu,
Comments inline....
Matthieu Riou wrote:
> Hi guys,
>
> I've done a few additional stuff on the BPEL implementation allowing a BPEL
> file to be compiled by ODE upon deployment. The implementation is therefore
> created and initialized with most of what would be needed by the runtime.
> However there's still a couple of problems with resolution and finding my
> way inside Tuscany code isn't that easy.
>
> To resolve the WSDL implemented by the process I've been trying to go
> through the resolution mechanism and declare the implementation I return in
> the read() method of the processor as unresolved.
I've done the Spring implementation type which has some characteristics
similar to that of your BPEL implementation type.
Take a look at the implementation-spring module in Tuscany SCA. The
relevant file is SpringArtifactProcessor...
There read() is called and a SpringImplementation returned which is
unresolved (see line 139) and then resolve() is called later, resulting
in the Spring application context getting loaded and the Spring runtime
initialized.
PS You might like to rename "BPELImplementationProcessor" to
"BPELArtifactProcessor" to make it clearer what that class does - it
processes an <implementation.bpel.../> element in the composite file (we
refer to that as the artifact, rather than the implementation.
> However the resolve()
> method is never called afterward and this results in a NullPointerException
> in Tuscany as the InterfaceContract is never set. From what I could make
> out
> of the code, it seems that the resolution mechanism happens for Interface
> processors but not of implementations, but I could be wrong.
Well, it definitely works for the Spring implementation, for sure. If
resolve is not being called, then there must be something odd about the
implementation object that you return.
AHA - yes there is something odd!! Go look at these lines in
BPELImplementationImpl:
public boolean isUnresolved() {
// The sample BPEL implementation is always resolved
return false;
}
...notice that is always returns "false" !!
So your implementation type always says that it is resolved. No wonder
resolve() does not get called. Change the code here to return the value
of some boolean field which gets set by setUnresolved() -
setUnresolved() also does nothing at the moment....
>
> I've created a patch that adds the BPEL compilation and demonstrates the
> problem using the test case. Please have a look at
> BPELImplementationProcessor, you'll see how the implementation is built.
> You'll also see that the BPEL file from now is directly loaded using an
> additional "file" attribute. Ideally that should go as well to use the same
> type of resolving as for the WSDL (when it will work).
>
> Some help regarding this would be definitely welcome...
>
> Thanks,
> Matthieu
>
Yours, Mike.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org