Re: New using Tuscany
On 10/11/07, b anton.etra-id [EMAIL PROTECTED] wrote: Dear Simon, I have tried that you propose. I have modified the @Service annotation to @Service(InformationService.class). I had changed some names of classes before and some of them had been missed by me. Sorry. However I am getting the same error: Exception in thread main org.osoa.sca.ServiceUnavailableException: No service invoker is available for reference default (bindingURI=InformationServiceComponent operation=getInformationObject). at ... Thanks, Ana Belen -Original Message- From: Simon Laws [EMAIL PROTECTED] To: tuscany-user@ws.apache.org Date: Thu, 11 Oct 2007 17:17:20 +0100 Subject: Re: New using Tuscany On 10/11/07, Ana Belén Antón Gironés [EMAIL PROTECTED] wrote: Hi Simon! First of all, thank you very much for your help. I have some problems running my application. When I run my isClient.javaI get this exception: Starting ... 11-oct-2007 16:45:23 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1problem ADVERTENCIA: [WARNING] No targets for reference: getInformationObject null 11-oct-2007 16:45:23 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1problem ADVERTENCIA: [WARNING] No targets for reference: getAllInformationObject null Information.composite ready Exception in thread main org.osoa.sca.ServiceUnavailableException: No service invoker is available for reference default (bindingURI=InformationGroundingServiceComponent operation=getGroundingService). at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.c reateInvoker(RuntimeSCAReferenceBindingProvider.java:192) at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor (R untimeWireImpl.java:214) at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains (Ru ntimeWireImpl.java:156) at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains (Run timeWireImpl.java:97) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationCha in(JDKInvocationHandler.java:190) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke (JDKInvoca tionHandler.java:124) at $Proxy7.getInformationObject(Unknown Source) at Client.isClient.main(isClient.java:34) I know that I am missing some refence to getInformationObject and getAllInformationObject and something is missing in the composite, but I don't know what it is. My application has a complex estructure but I am going to try to explain it. isClient.java is: * package Client; import org.apache.tuscany.sca.host.embedded.SCADomain; import eu.services.information.exceptions.ISNotFoundException; import eu.services.information.io.InformationObject; import eu.services.information.is.InformationService; public class isClient { public static void main(String[] args) throws Exception { System.out.println(Starting ...); SCADomain scaDomain = SCADomain.newInstance(Information.composite); System.out.println(Information.composite ready); InformationService is = scaDomain.getService(InformationService.class, InformationServiceComponent); InformationObject iobj; try { iobj = is.getInformation(c1dee5cd); System.out.println(Description: + iobj.getDescription()); System.out.println(Lang: + iobj.getLang()); System.out.println(Name: + iobj.getName());; System.out.println(Protocol: + iobj.getProtocol()); System.out.println(URL: + iobj.getURL()); System.out.println(ID: + iobj.getID()); } catch (ISNotFoundException e1) { e1.printStackTrace(); } scaDomain.close(); } } * the composite: * ?xml version=1.0 encoding=UTF-8? compositexmlns=http://www.osoa.org/xmlns/sca/1.0 [http://www.osoa.org/xmlns/sca/1.0]; name=InformationComposite component name=InformationServiceComponent implementation.java class= eu.services.information.rh.InformationServiceImpl/ /component /composite * my src structure is: * -Client -isClient.java -eu.services.information.exceptions -GCException.java
strange dependency change
Hi, our web service build using SCA is implemented as a WAR application. Our WAR pom.xml (Maven) file has the following dependencies: dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-host-webapp/artifactId version1.0-incubating/version /dependency dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-binding-ws-axis2/artifactId version1.0-incubating/version /dependency dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-implementation-java-runtime/artifactId version1.0-incubating/version /dependency Some time ago (at the end of last month), this generated a WAR file without servlet-api JAR in it's WEB-INF\lib folder. Now, for some reason, it generates a war file with servlet-api in it, resulting in the war file not working on Websphere or Weblogic. Do you know what happened and is there any way of excluding the jar from war automatically at tuscany side? We solved the problem by adding an exclusion to the following dependency: dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-binding-ws-axis2/artifactId version1.0-incubating/version exclusions exclusion groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId /exclusion /exclusions /dependency I feel a bit unconfortable about the fact that we supply a product with clear dependency list and all of a sudden it stops working because somewhere on the way, the dependencies have changed. Do you think there would be anything you can do to prevent this happening? Are you aware of the change that happened somewhere on the way? I think the WS examples supplied with the product will not work now if they are build using Maven. Please let me know your comments. Thanks a lot, Radim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuscany service with bea WebLogic
I should have added that there is a work around already suggested by Nishant - just move the .composite files out of the classes folder, eg to the meta-inf folder next to the sca-contribution.xml works fine. And having the .composite files in the meta-inf folder works fine in Tomcat too. Anyone know why all the Tuscany samples put the .composite files where they do? ...ant On 10/12/07, ant elder [EMAIL PROTECTED] wrote: I've been doing a bit of debugging of this on a friends WebLogic install. This is a real issue, none of the Tuscany webapp samples work on WebLogic. The problem is that when the installed war gets exploded onto the file system the contents of the classes folder is not included, thats where the .composite file is so as its not there it can't get found by the Tuscany contribution service. For example installing the calculator webapp sample in weblogic creates a folder: C:\bea\weblogic92\samples\domains\wl_server\servers\examplesServer\tmp\_WL_user\sample-calculator-webapp\eck9ra\war That has the same folder structure as the calculator sample war but the WEB-INF\classes folder is empty. I guess WebLogic puts the classpath resources somewhere else. I'm not sure what to do about this, but it does seem like a bug in the way Tuscany is discovering the contribution resources. These resources are available in the webapp's classloader and thats probably where Tuscany should be getting them from instead of hoping they're in some temporary folder in the file system. ...ant On 10/12/07, Nishant Joshi [EMAIL PROTECTED] wrote: correct, If i keep .composite file in classes, at time of deployment It was resides in jar file under lib so it was not working for us. We need to move . composite file to any other location where it was not keep in any jar file. -- Thanks Nishant Joshi
TuscanyServletFilter in debug mode
Hello. I have got one question. How to run TuscanyServletFilter in debug mode to view debug pages in browser (on address /SCADomain/index.html)? My web.xml contains: filter filter-nametuscany/filter-name filter-class org.apache.tuscany.sca.host.webapp.TuscanyServletFilter /filter-class /filter filter-mapping filter-nametuscany/filter-name url-pattern/*/url-pattern /filter-mapping Best regards, Karol Kopacz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TuscanyServletFilter in debug mode
Hello. I have got one question. How to run TuscanyServletFilter in debug mode to view debug pages in browser (on address /SCADomain/index.html)? My web.xml contains: filter filter-nametuscany/filter-name filter-class org.apache.tuscany.sca.host.webapp.TuscanyServletFilter /filter-class /filter filter-mapping filter-nametuscany/filter-name url-pattern/*/url-pattern /filter-mapping -- Pozdrawiam, Karol. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuscany service with bea WebLogic
I've been doing a bit of debugging of this on a friends WebLogic install. This is a real issue, none of the Tuscany webapp samples work on WebLogic. The problem is that when the installed war gets exploded onto the file system the contents of the classes folder is not included, thats where the .composite file is so as its not there it can't get found by the Tuscany contribution service. For example installing the calculator webapp sample in weblogic creates a folder: C:\bea\weblogic92\samples\domains\wl_server\servers\examplesServer\tmp\_WL_user\sample-calculator-webapp\eck9ra\war That has the same folder structure as the calculator sample war but the WEB-INF\classes folder is empty. I guess WebLogic puts the classpath resources somewhere else. I'm not sure what to do about this, but it does seem like a bug in the way Tuscany is discovering the contribution resources. These resources are available in the webapp's classloader and thats probably where Tuscany should be getting them from instead of hoping they're in some temporary folder in the file system. ...ant On 10/12/07, Nishant Joshi [EMAIL PROTECTED] wrote: correct, If i keep .composite file in classes, at time of deployment It was resides in jar file under lib so it was not working for us. We need to move .composite file to any other location where it was not keep in any jar file. -- Thanks Nishant Joshi
Re: strange dependency change
[snip] Radim Kolarik wrote: Hi, our web service build using SCA is implemented as a WAR application. Our WAR pom.xml (Maven) file has the following dependencies: dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-host-webapp/artifactId version1.0-incubating/version /dependency dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-binding-ws-axis2/artifactId version1.0-incubating/version /dependency dependency groupIdorg.apache.tuscany.sca/groupId artifactIdtuscany-implementation-java-runtime/artifactId version1.0-incubating/version /dependency Some time ago (at the end of last month), this generated a WAR file without servlet-api JAR in it's WEB-INF\lib folder. Now, for some reason, it generates a war file with servlet-api in it, resulting in the war file not working on Websphere or Weblogic. Which levels of Tuscany were you using before? and now? Do you know what happened and is there any way of excluding the jar from war automatically at tuscany side? We solved the problem by adding an exclusion to the following dependency: It'll depend on your answer to the above question :) -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SCA C++ : WS Exception example
Hi Nitin, AFAIR we don't currently handle exceptions from web services in the SCA Native code. Any exceptions thrown in a SCA composite exported via the WS binding are caught in the WS service code and simply printed to the log. In the future it might b good to support exceptions via the use of WSDL Faults. Hope this answers your question Cheers Andy On 10/11/07, Taori, Nitin [EMAIL PROTECTED] wrote: Hello All, Does any body have an illustrative example for Exceptions from WS in C++ client? Thanks in advance Nitin CENIT AG Systemhaus, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.de Geschaeftsstellen: Berlin, Duesseldorf, Frankfurt, Hamburg, Hannover, Muenchen, Saarbruecken Vorstandsmitglieder: Kurt Bengel, Christian Pusch Aufsichtsratsmitglieder: Falk Engelmann (Vorsitzender des Aufsichtsrats), Hubert Leypoldt, Dr. Dirk Lippold Bankverbindungen: Deutsche Bank (BLZ 600 700 70) Kto. 1661 040, Commerzbank (BLZ 600 400 71) Kto. 532 015 500, BW-Bank (BLZ 600 501 01) Kto. 2 403 313 Registergericht: Amtsgericht Stuttgart Handelsregister: HRB Nr. 19117 Umsatzsteuer: ID-Nr. DE 147 862 777 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Promote?
Hello all. I am trying to understand what the promote keyword in the composite file means? I've so far been able to find a definition of that, and the composite file in general. Thanks, Jason
Re: Promote?
Hi, A SCA composite can be used as an implementation (implementation.composite) for a component. This is so-called recursive composition. It allows pre-assembled composites to be reused. promote can be used to make services or references declared on a component inside the composite visible for wiring at the composite level. The composite services and references can be then further configured when it's used as a component implementation at outer level. Hope the following samples help. composite name=Composite1 xmlns:ns=http://dummy; component name=C1 implementation.composite name=ns:Composite2 !-- wire ref1 to component C3's service1 -- reference name=ref1 target=C3/service1/ !-- configure the service with ws binding -- service name=svc1 binding.ws .../ /service /component /composite composite name=Composite2 targetNamespace=http://dummy; xmlns:ns=http://dummy; component name=C2 implementation.java class=my.C2Impl /component !-- innerService of component C2 is promoted as svc1 -- service name=svc1 promote=C2/innerService/ !-- innerReference of component C2 is promoted as ref1 -- reference name=ref1 promote=C2/innerReference/ /composite Thanks, Raymond - Original Message - From: Jason Clark [EMAIL PROTECTED] To: tuscany-user@ws.apache.org Sent: Friday, October 12, 2007 2:21 PM Subject: Promote? Hello all. I am trying to understand what the promote keyword in the composite file means? I've so far been able to find a definition of that, and the composite file in general. Thanks, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Promote?
That makes sense. Thanks for the reply. My follow-up question is regarding the composite file in the user's guide on the Tuscany website regarding the calculator example. In the file: composite xmlns=http://www.osoa.org/xmlns/sca/1.0; name=Calculator service name=CalculatorService promote=CalculatorServiceComponent/CalculatorService interface.java interface=calculator.CalculatorService/ binding.jsonrpc/ /service component name=CalculatorServiceComponent implementation.java class=calculator.CalculatorServiceImpl/ reference name=addService target=AddServiceComponent / /component component name=AddServiceComponent implementation.java class=calculator.AddServiceImpl/ /component /composite In this example, in the first service, they promote CalculatorServiceComponent/CalculatorService, but when I run the project, I get the following error: Promoted component service not found: CalculatorServiceComponent/CalculatorService null Am I missing something here? In the promote, I see it refers to the CalculatorServiceComponent, but I don't see where the CalculatorService comes from following that. Also, am I correct is saying what it is trying to do is expose the CalculatorServiceComponent as a Service on the Composite? Thanks again. -Jason # This electronic mail transmission contains confidential information intended only for the person(s) named. Any use, distribution, copying or disclosure by another person is strictly prohibited. # -Original Message- From: Raymond Feng [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 12:50 PM To: tuscany-user@ws.apache.org Subject: Re: Promote? Hi, A SCA composite can be used as an implementation (implementation.composite) for a component. This is so-called recursive composition. It allows pre-assembled composites to be reused. promote can be used to make services or references declared on a component inside the composite visible for wiring at the composite level. The composite services and references can be then further configured when it's used as a component implementation at outer level. Hope the following samples help. composite name=Composite1 xmlns:ns=http://dummy; component name=C1 implementation.composite name=ns:Composite2 !-- wire ref1 to component C3's service1 -- reference name=ref1 target=C3/service1/ !-- configure the service with ws binding -- service name=svc1 binding.ws .../ /service /component /composite composite name=Composite2 targetNamespace=http://dummy; xmlns:ns=http://dummy; component name=C2 implementation.java class=my.C2Impl /component !-- innerService of component C2 is promoted as svc1 -- service name=svc1 promote=C2/innerService/ !-- innerReference of component C2 is promoted as ref1 -- reference name=ref1 promote=C2/innerReference/ /composite Thanks, Raymond - Original Message - From: Jason Clark [EMAIL PROTECTED] To: tuscany-user@ws.apache.org Sent: Friday, October 12, 2007 2:21 PM Subject: Promote? Hello all. I am trying to understand what the promote keyword in the composite file means? I've so far been able to find a definition of that, and the composite file in general. Thanks, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuscany and Websphere
Matthew Peters wrote: I am trying to understand how a contribution that contains a mix of artifacts, including JEE artifacts, should be handled by Tuscany and the runtime into which it is being deployed. SCA-enabling of a JEE runtime and the scenarios that this will address are introduced in a whitepaper at: http://www.osoa.org/pages/viewpage.action?pageId=3980 Tuscany currently supports what's described in this whitepaper as Single Module Assembly: A Web module is used as an SCA contribution containing component implementations. Components are assembled inside the Web module using SCA composites. The whitepaper mentions a single META-INF/web.composite, right now in Tuscany we allow you to name your composite however you want. I'd like to tacke the main other scenarios described in the whitepaper in the next releases, as mentioned in the Tuscany Roadmap discussion at: http://marc.info/?l=tuscany-userm=119203494411767w=2 Some of this work has already started in the context of the Tuscany - Geronimo plugin at http://svn.apache.org/repos/asf/geronimo/plugins/tuscany/trunk. Here's a scenario just to make it concrete. Imagine I have a contribution that includes some JEE UI components like some servlets or JSPs, some Java SCA components, and just to make it tricky an EJB that is also an SCA component (if that's not possible yet then I am guessing it will be in the future). If I understand correctly, this will probably translate to something like follows (using the terminology from the whitepaper): composite component name=MyUI implementation.web module=ui.war/ reference name=myBackendService target=MyBackend/MyService/ /component component name=MyBackend implementation.ejb ejb=backend.jar/ /component /component /composite As a first step, I think we could just represent Web modules and EJB modules as component implementations and not necessary try to boil the ocean right away with individual EJBs as component implementations, maybe later... And suppose, to be specific, that I want to deploy this onto Websphere Application Server (WAS). In this scenario I really want to understand things like what should happen during deployment and runtime, and how Tuscany and WAS should cooperate during class loading and instantiation and do any dependency injection. I can think of two different approaches. The first is to put Tuscany firmly in charge [snip] The other approach is to leave WAS in charge as far as possible. [snip] Tuscany is not trying to reinvent a JEE container. It seems that the JEE container should be running the JEE artifacts and Tuscany would just inspect the JEE artifacts and derive their SCA ComponentType from it would find in them. [snip] Essentially it seems to me that Tuscany and WAS are both meaty runtimes that are used to being in charge by themselves, especially WRT class loading and instantiation. Has anyone thought this all through and can tell me how it ought to work? We only started to discuss the JEE integration in the roadmap this week... so it's a little too early to say how it ought to work :). I don't think that Tuscany should impose its own classloading and instantiation mechanism. I think that Classloading is a function of the hosting environment. Tuscany needs to use the ClassLoader provided by your particular J2SE / OSGi / Tomcat / Geronimo / WebSphere / WebLogic / JBoss / Glassfish / etc hosting environment. If it doesn't, then it's a bug which ought to be fixed. It looks like there's active discussions on our dev list and people working on it to help Tuscany play well with OSGi as we speak :). IMO instantiation of an implementation is a function of the particular implementation type container: - An implementation.java is instantiated by the Tuscany implementation-java container, according to the rules in the SCA Java CI spec. - An implementation.bpel is instantiated by Apache ODE (the BPEL engine integrated with Tuscany). - An implementation.web is instantiated by the Web container in which it is deployed. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DISCUSS] Tuscany SCA Roadmap and next releases
Matthew Peters wrote: As you'll guess from the post on Websphere and Tuscany that I put up a couple of days ago, My response: http://marc.info/?l=tuscany-userm=119223827124704 I would like to see where you want to go in the area of - Webapp and EJB module integration I'd like to track the OASIS work on this and implement it in parallel in Tuscany. Many users have existing J2EE EJB and EAR modules that they'll need to integrate in bigger SCA compositions. Also Webapp developers will need a non-intrusive way to wire a Webapp with other SCA components in an SCA domain. For example when you wire a webapp to an SCA component, how is the SCA domain found, I think that an SCA-enabled runtime (a JEE runtime or any other form of SCA enabled runtime) needs to be configured with a domain URI that it will belong to. At the moment in Tuscany we just pass that URI when we bootstrap the runtime. If you're up for a long read, see the SCA Domain discussion thread on the tuscany-dev list, here's a pointer to the last email in that thread: http://marc.info/?l=tuscany-devm=119196408721454w=2 and who starts and stops it? The domain administrator :) independent of what JEE or other apps are deployed to it. How and when did the components get deployed into it? I can think of three main scenarios: - An SCA domain administrator goes to his domain management application and uploads a contribution, then adds some composites from the contribution to the domain level composite. At that point the SCA domain management app finds the appropriate runtime node for the contribution, distributes the contribution to the node. - An administrator goes to a node belonging to an SCA domain, uploads a contribution, then adds some composites from the contribution to the domain level composite. - A contribution and composites have already been installed on a node by some mechanisms unknown to Tuscany, the SCA domain administrator goes to the domain management application to register the presence of these composites in the domain. ... and all kinds of variations of the above, but these scenarios are not really specific to JEE integration, it's just how I view an SCA domain being used. And wre we ever going to have webapps which *are* SCA components so that we want to do dependency injection directly into a servlet for example? I guess this is the idea of being able to declare a JEE Web module as an SCA component implementation. You can declare SCA references on the Web module, wire them to SCA services, and invoke them from code running in the Webapp. I'm not very fond of mixing programming models, as it makes tech people happy but usually gets in the way of the business application developer who's trying to achieve something without having to learn 4 programming languages, 12 APIs, and 37 different ways to bind XML to Java. So I hope we can do this in a non-intrusive way without introducing too many SCA programming model artifacts in the JEE Webapp. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]