Return-Path: Delivered-To: apmail-tuscany-user-archive@www.apache.org Received: (qmail 73848 invoked from network); 3 Jun 2009 10:22:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 10:22:25 -0000 Received: (qmail 27891 invoked by uid 500); 3 Jun 2009 10:22:37 -0000 Delivered-To: apmail-tuscany-user-archive@tuscany.apache.org Received: (qmail 27823 invoked by uid 500); 3 Jun 2009 10:22:37 -0000 Mailing-List: contact user-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@tuscany.apache.org Delivered-To: mailing list user@tuscany.apache.org Received: (qmail 27809 invoked by uid 99); 3 Jun 2009 10:22:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 10:22:37 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [132.176.114.188] (HELO cl-mailhost.FernUni-Hagen.de) (132.176.114.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 10:22:25 +0000 Received: from admin.cc.fernuni-hagen.de ([132.176.25.12] helo=server.cc.fernuni-hagen.de) by cl-mailhost.FernUni-Hagen.de with esmtp (Exim 4.24) id 1MBnbg-00005W-Kc; Wed, 03 Jun 2009 12:22:04 +0200 Received: from localhost (localhost [127.0.0.1]) by server.cc.fernuni-hagen.de (Postfix) with ESMTP id 0974FA7086; Wed, 3 Jun 2009 12:21:48 +0200 (CEST) Received: from server.cc.fernuni-hagen.de ([127.0.0.1]) by localhost (server.cc.fernuni-hagen.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bPLR9sL-rHVo; Wed, 3 Jun 2009 12:21:44 +0200 (CEST) Received: from [132.176.25.170] (unknown [132.176.25.170]) by server.cc.fernuni-hagen.de (Postfix) with ESMTP id 12303A7085; Wed, 3 Jun 2009 12:21:43 +0200 (CEST) Message-ID: <4A264EB7.3050708@fernuni-hagen.de> Date: Wed, 03 Jun 2009 12:21:43 +0200 From: Peng Han User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: user@tuscany.apache.org CC: dev@tuscany.apache.org Subject: Re: how to access another SCA Component in BPEL References: <4A23AB5F.5000903@fernuni-hagen.de> <5a75db780906022318h1ab3ce73wf6f3540d25c7441c@mail.gmail.com> In-Reply-To: <5a75db780906022318h1ab3ce73wf6f3540d25c7441c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-prewhitelist: your reply will pass through without greylisting X-Virus-Checked: Checked by ClamAV on apache.org Hello, I guess we mess up a little bit with this thread. What we are trying to do is another way round :-) saying B invokes A. The details is attached again. Dear Resende: Thanks a lot for your prompt response. I changed the binding to jsoncrpc and get the following error: Exception in thread "main" org.osoa.sca.ServiceRuntimeException: java.lang.ClassCastException: org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceImpl cannot be cast to org.apache.tuscany.sca.interfacedef.java.JavaInterface at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:220) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) at helloworld.BPELClient.main(BPELClient.java:47) Caused by: java.lang.ClassCastException: org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceImpl cannot be cast to org.apache.tuscany.sca.interfacedef.java.JavaInterface at org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCServiceBindingProvider.getTargetJavaClass(JSONRPCServiceBindingProvider.java:158) at org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCServiceBindingProvider.start(JSONRPCServiceBindingProvider.java:91) at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:630) at java.security.AccessController.doPrivileged(Native Method) at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:628) at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:560) at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:668) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:182) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.(DefaultSCADomain.java:97) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) ... 2 more However, if I change the interface of BPEL component service from WS to Java as follows: I will get a "null" return value. The code in javascript is as follows: //@Reference var mainRegReference = new Reference( "RegistrationReference" ); var mytext = "Hello again"; document.write(mytext); function getWeather() { var city = document.getElementById( "cityField" ).value; var country = document.getElementById( "countryField" ).value; var returnString = mainRegReference.hello("weather", displayWeather); } function displayWeather(weather){ document.write(weather); } Best Regards Peng > A scenario very similar to what you have described below is > demonstrated in our helloworld-reference itest, and responding to your > question, in this case we are not going to make a webservice call, but > a local call, and you can even remove the binding.ws from the > component B service. > > As for your previous question about bpel and widget, I'll see if I can > find some time to reproduce the sample scenario in my sandbox. > > [1] https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/itest/bpel/helloworld-reference > > On Tue, Jun 2, 2009 at 11:01 PM, Rupesh M G > wrote: > >> Hello, >> >> Consider this interaction scenario in the same tuscany runtime. >> >> SCA component A --> implementation.bpel >> SCA component B --> implementation.java with binding.ws >> >> If A invokes B, will it be a local java call? or a webservice call. >> >> In my understanding, BPEL can manage only webservice interactions. >> >> I would like to know if SCA / tuscany does any extra step to avoid >> this marshalling / unmarshalling overhead. >> >> >> Regards, >> Rupesh >> >> >> >> Peng Han >> >> 06/01/2009 03:50 PM >> >> Please respond to >> user@tuscany.apache.org >> To >> user@tuscany.apache.org >> cc >> Subject >> Re: how to access another SCA Component in BPEL >> >> >> >> >> >> >>> On Sat, May 30, 2009 at 12:35 PM, Peng Han wrote: >>> >>> >>>> Dear Resende: >>>> >>>> I tried to access the links you provided but it seems that it was broken. >>>> Would you please check it? >>>> >>>> >>>> >>> https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/itest/bpel/helloworld-reference/ >>> >>> >>> >>>> Also I would like to ask whether it is possible to consume a service >>>> provided by a .bpel implemented component >>>> from a component implemented as widget and how. I tried to do it in the >>>> following composite but the program >>>> seems stuck when invoking the service. >>>> >>>> >>> You should be able to do this, using json-rpc binding. >>> I responded to your other thread "Wiring a Widget Component and BPEL >>> Component" with more details on how to try to accomplish this, but >>> feel free to let me know if you are not making progress, and I can try >>> to get some examples available. >>> >>> >>> >>>> Thanks a lot! >>>> >>>> the composite is as follows: >>>> >>>> >>> >>>> >>>> xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld" >>>> xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" >>>> name="helloworld" >>>> targetNamespace="http://bpel"> >>>> >>>> >>>> >>>> >>> >>>> >>>> interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" >>>> /> >>>> >>> /> >>>> >>>> >>>> >>>> >>>> >>>> >>> /> >>>> >>>> >>>> >>> >>>> >>>> interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" >>>> /> >>>> >>> /> >>>> >>>> >>>> >>> promote="RegistrationWidgetComponent/Widget" /> >>>> >>> target="BPELHelloWorldComponent/helloPartnerLink" /> >>>> >>>> >>>> Best Regards >>>> >>>> P.Han >>>> >>>> >>>>> This is demonstrated in the following bpel-reference iTest [1]. In >>>>> this case, we have a grretings java component, and then a BPEL >>>>> component that have a reference to this service as described in the >>>>> composite below. >>>>> >>>>> >>>> targetNamespace="http://bpel" >>>>> xmlns:hns="http://helloworld" >>>>> name="helloworld"> >>>>> >>>>> >>>>> >>>>> >>>> target="GreetingsServiceComponent"/> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> interface="http://greetings#wsdl.interface(Greetings)" /> >>>>> >>>>> >>>>> >>>>> >>>>> Please let me know if you have questions or any problems running the >>>>> sample test scenario. >>>>> >>>>> >>>>> [1] >>>>> >>>>> https://svn.apache.org/repos/asf/tuscany/java/sca/itest/bpel/helloworld-reference/ >>>>> >>>>> >>>>> On Thu, Aug 28, 2008 at 8:21 PM, xuhongbo wrote: >>>>> >>>>> >>>>> >>>>>> Hi >>>>>> Now I am using the sca provided build in bpel engine, and want >>>>>> to >>>>>> invoke another sca-component in the bpel process; >>>>>> Though I could deploy the -java-implement sca component as >>>>>> web-service by ws binding,then access it in bpel by import a wsdl >>>>>> process. >>>>>> This way ask for all sca-java-componet deployed as web-service, and >>>>>> seems >>>>>> too trival for deployment. >>>>>> So does anyone know how to use a sca-reference in a BPEL >>>>>> implement >>>>>> component to access another sca component? Or some other mechanism can >>>>>> direct access sca-component? Typically sca component invoked by the >>>>>> bpel >>>>>> is >>>>>> always implement as Java Language. >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>> >>> >>> >> >> >> >> >> >> DISCLAIMER: >> >> "The information in this e-mail and any attachment is intended only for the >> person to whom it is addressed and may contain confidential and/or >> privileged material. If you have received this e-mail in error, kindly >> contact the sender and destroy all copies of the original communication. IBS >> makes no warranty, express or implied, nor guarantees the accuracy, adequacy >> or completeness of the information contained in this email or any attachment >> and is not liable for any errors, defects, omissions, viruses or for >> resultant loss or damage, if any, direct or indirect." >> >> >> >> >> >> > > > >