Monosij Dutta-Roy wrote:
As requested here are the attached files.
Thanks for taking a look at my war. Its attached along with the three
composites and two contributions.
It contains the dependent jars: entityBCA and qmController.
The errors I get is in the earlier part of the thread.
I am trying to create a basic db search app with three components.
So the structure is as follows:
----------
entityBCA - domain.composite - sca-contribution.xml - pom.xml
has domain objects such as patients, addresses.
qmController - querycontroller.composite - sca-contribution.xml - pom.xml
a search controller that has a searchComposer and searchExecutor.
qmApp - web.composite - no sca-contribution.xml
the webapp which passes the query to qmController
----------
What I was trying to figure out is - as you show in the examples -
client do the entityBCA and qmController need to be loaded as nodes? Or
does Tuscany within Jetty already do it?
My goal is to keep the webapp framework - jsp / jsf and such completely
separate from the core components such that the front end technologies
can be changed while configuring the other components to be run in a
distributed environment.
----------
My background is Java / C++ and somewhat new to the JEE frameworks such
as Tuscany, Maven and such - so XML configs is a little new to me.
Thanks a lot!
monosij
Thanks for posting this. From a quick look at the war file it appears
that you are using Tuscany 2.x. Is this correct?
My understanding is that the JSP invokes QueryService correctly,
but QueryService can't invoke QueryController because QueryController
isn't part of the same webapp. To fix this, you could expose
QueryController using an interoperable binding such as binding.ws,
and configure the reference in QueryService to also use binding.ws
with an endpoint URI that matches the deployment URI for QueryController.
You would also need to use a separate Tuscany domain (not part of the
webapp) to load and deploy QueryController.
In Tuscany 2.x (not 1.x) there is an SCA client API which allows you to
invoke SCA services running in a different SCA domain. This is intended
for use from non-SCA code, such as a servlet running in a webapp. As you
are using some SCA code within the webapp (though only as a UI front end)
I think it's better to use an interoperable binding to invoke
QueryController rather than using the SCA client API.
Simon
On Sun, Apr 3, 2011 at 10:26 AM, Simon Nash <n...@apache.org
<mailto:n...@apache.org>> wrote:
Monosij Dutta-Roy wrote:
New to Tuscany and following SCA in Action. Have a question on a
webapp I created using the Maven tasks.
The webapp works fine as a single composite - broken up by
several components.
------------------------
However when I create several composites (different
contributions using Maven tasks) and wire them together - again
webapp compiles and sets up in Jetty fine. When I hit a
component that has a reference in a separate composite I get an
error as below:
------------------------
Problem accessing /qmApp/. Reason:
org.oasisopen.sca.SCARuntimeException: Unable to bind
(@31214809)EndpointReference: URI =
QueryServiceComponent#reference(queryController)
WIRED_TARGET_NOT_FOUND Target = (@3751575)Endpoint: URI =
QueryController#service(QueryControllerService) [Unresolved]
The QueryController/QueryControllerService is setup as a reference.
------------------------
Its a small app and I have looked at the configs in detail and
think they are correct. Of course Maven compiles all of them
fine - and as I said deploys fine as well.
However I am not sure I am loading the QueryController (the
other contribution/composite/reference - setup as a service)
properly. I have checked the composite file quite thoroughly and
relevant code. I can upload them if needed.
------------------------
I assume when the war is build all the dependent jars are
packaged in by Maven and when Jetty starts the Tuscany API sorts
out the dependencies? Or is there anything else I need to do for
this quite simple setup? But a setup that involves a webapp with
different contributions.
The reason I ask is also because the webapp generated by Maven
does not have a sca-contribution.xml file where I import /
export other packages.
------------------------
Thanks.
It would be very useful if you could upload the failing war file. This
might provide some important clues to the cause of the problem.
Simon