Re: Web Service References

2008-05-22 Thread Jean-Jacques Dubray
Mike:

I don't know if you are talking about this sample:
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/helloworld-bpel-ws/

If it's the case, the helloworld.composite does not have a reference, it
simply exposes a BPEL implementation as a service.

I think I understand a bit better the rationale for not modeling external
references as components and why components need to have an
implementation. I am fine with it since a component must belong to a domain.


I have tried to do some cross-domain work by modeling a service (external to
the domain) invoked by a BPEL implementation and I get some errors. I don't
know if anyone could help me.

Here is my composite file (I replaced the GreetingsService component by a
reference to an external web service (implemented in a different domain)):

?xml version=1.0 encoding=ISO-8859-15?
composite xmlns=http://www.osoa.org/xmlns/sca/1.0; xmlns:sca=
http://www.osoa.org/xmlns/sca/1.0; xmlns:hns=http://helloworld;
xmlns:instance=http://www.w3.org/2004/08/wsdl-instance; xmlns:tuscany=
http://tuscany.apache.org/xmlns/sca/1.0; name=helloworld targetNamespace=
http://bpel;
  component name=HelloWorldService
tuscany:implementation.bpel process=hns:HelloWorld/
reference name=greetingsPartnerLink /
  /component
  reference name=GreetingsService
promote=HelloWorldService/greetingsPartnerLink
tuscany:interface.wsdl interface=
http://laptop2:8085/GreetingsService#wsdl.portType(Greetings)/
binding.ws wsdlElement=
http://laptop2:8085/GreetingsService#wsdl.service(GreetingsService)
instance:wsdlLocation=http://laptop2:8085/GreetingsService.wsdl/
  /reference
/composite

I do get a series of errors coming from the domain trying to implement this
composite:

[java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
 [java] WARNING: Element {
http://tuscany.apache.org/xmlns/sca/1.0}implementation.bpel cannot be
processed. ([row,col {unknown-source}]: [4,5])
 [java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
read
 [java] WARNING: Element {
http://tuscany.apache.org/xmlns/sca/1.0}interface.wsdl cannot be processed.
([row,col {unknown-source}]: [8,5])
 [java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
 [java] WARNING: No implementation for component: HelloWorldService
 [java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
 [java] WARNING: Reference not found for component reference:
HelloWorldService/greetingsPartnerLink
 [java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
 [java] WARNING: No implementation for component: HelloWorldService
 [java] May 22, 2008 7:44:59 AM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
 [java] WARNING: Reference not found for component reference:
HelloWorldService/greetingsPartnerLink
 [java] No service is declared on component HelloWorldService

BTW, of course the greetings service is up and running and I can query its
WSDL (v1.1)

In the composite I did try both wsdl.interface and wsdl.portType and got the
same result (same interface.wsdl cannot be processed)

thanks,

JJ-





On Sat, May 17, 2008 at 7:29 AM, Jean-Jacques Dubray [EMAIL PROTECTED]
wrote:

 Luciano, Mike:

 thanks for the detailed answer. Yes, I am aware there are different types.
 I am not so concerned having to declare an implementation within the same
 domain. As a matter of fact, it looks to me that it is not even within an
 entire domain, but within a composite since there is an implementation type
 which is implementation.composite, so the scope to which an implementation
 declaration is exposed is fairly limited (which is good).

 I am more concerned of cross domain interactions and in particular how,
 say, a .Net based web service gets assembled. In that case you won't be
 able to find a valid implementation to expose as a composite. In cross
 domain interactions you are also left to use Web Services technologies
 (which I'm fine with, it'd be a shame to find no real use for WS-* after all
 this energy spent :-).

 Do you have a sample for that use case?

 thanks,

 JJ-


 On Sat, May 17, 2008 at 5:34 AM, Mike Edwards 
 [EMAIL PROTECTED] wrote:

 Jean-Jacques Dubray wrote:

 Luciano:

 thanks, actually in the test/bpel/helloworld-reference composite
 definition
 you also have a component defined with a binding.ws and there to, there
 is
 an implementation.java element. Is it required?

 !-- Simple ws-reference --
!--
component name=HelloWorldService
implementation.java class=helloworld.HelloWorldServiceImpl/
reference name=greetingsService
binding.ws uri=http://localhost:8085/GreetingsService/
/reference
/component
--

 Would you consider ws

Re: Web Service References

2008-05-22 Thread Jean-Jacques Dubray
Good point, I removed the tuscany namespace that had been added by the
Composite Editor and the errors are gone

I do get however:
 [java] Starting setup
 [java] [INFO] - GeronimoLog.info(79) | Using embedded Geronimo
transaction manager
 [java] java.lang.NullPointerException

The same behavior is true whether I use:
 interface.wsdl interface=
http://192.168.2.2:8085/GreetingsService#wsdl.interface(Greetings)/

or  interface.wsdl interface=
http://192.168.2.2:8085/GreetingsService#wsdl.portType(Greetings)/


JJ-

On Thu, May 22, 2008 at 8:49 AM, Luciano Resende [EMAIL PROTECTED]
wrote:

 The errors you are getting usually means that the necessary
 dependencies that register processors to parse those elements are not
 available (e.g implementation.bpel and interface.wsdl).

 On Thu, May 22, 2008 at 8:11 AM, Jean-Jacques Dubray [EMAIL PROTECTED]
 wrote:
  Mike:
 
  I don't know if you are talking about this sample:
 
 https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/helloworld-bpel-ws/
 
  If it's the case, the helloworld.composite does not have a reference, it
  simply exposes a BPEL implementation as a service.
 
  I think I understand a bit better the rationale for not modeling external
  references as components and why components need to have an
  implementation. I am fine with it since a component must belong to a
 domain.
 
 
  I have tried to do some cross-domain work by modeling a service (external
 to
  the domain) invoked by a BPEL implementation and I get some errors. I
 don't
  know if anyone could help me.
 
  Here is my composite file (I replaced the GreetingsService component by a
  reference to an external web service (implemented in a different
 domain)):
 
  ?xml version=1.0 encoding=ISO-8859-15?
  composite xmlns=http://www.osoa.org/xmlns/sca/1.0; xmlns:sca=
  http://www.osoa.org/xmlns/sca/1.0; xmlns:hns=http://helloworld;
  xmlns:instance=http://www.w3.org/2004/08/wsdl-instance; xmlns:tuscany=
  http://tuscany.apache.org/xmlns/sca/1.0; name=helloworld
 targetNamespace=
  http://bpel;
   component name=HelloWorldService
 tuscany:implementation.bpel process=hns:HelloWorld/
 reference name=greetingsPartnerLink /
   /component
   reference name=GreetingsService
  promote=HelloWorldService/greetingsPartnerLink
 tuscany:interface.wsdl interface=
  http://laptop2:8085/GreetingsService#wsdl.portType(Greetings)http://laptop2:8085/GreetingsService#wsdl.portType%28Greetings%29
 /
 binding.ws wsdlElement=
  http://laptop2:8085/GreetingsService#wsdl.service(GreetingsService)http://laptop2:8085/GreetingsService#wsdl.service%28GreetingsService%29
 
  instance:wsdlLocation=http://laptop2:8085/GreetingsService.wsdl/
   /reference
  /composite
 
  I do get a series of errors coming from the domain trying to implement
 this
  composite:
 
  [java] May 22, 2008 7:44:59 AM
 
 org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
  read
  [java] WARNING: Element {
  http://tuscany.apache.org/xmlns/sca/1.0}implementation.bpelhttp://tuscany.apache.org/xmlns/sca/1.0%7Dimplementation.bpelcannot
   be
  processed. ([row,col {unknown-source}]: [4,5])
  [java] May 22, 2008 7:44:59 AM
 
 org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
  read
  [java] WARNING: Element {
  http://tuscany.apache.org/xmlns/sca/1.0}interface.wsdlhttp://tuscany.apache.org/xmlns/sca/1.0%7Dinterface.wsdlcannot
   be processed.
  ([row,col {unknown-source}]: [8,5])
  [java] May 22, 2008 7:44:59 AM
  org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
 problem
  [java] WARNING: No implementation for component: HelloWorldService
  [java] May 22, 2008 7:44:59 AM
  org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
 problem
  [java] WARNING: Reference not found for component reference:
  HelloWorldService/greetingsPartnerLink
  [java] May 22, 2008 7:44:59 AM
  org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
 problem
  [java] WARNING: No implementation for component: HelloWorldService
  [java] May 22, 2008 7:44:59 AM
  org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
 problem
  [java] WARNING: Reference not found for component reference:
  HelloWorldService/greetingsPartnerLink
  [java] No service is declared on component HelloWorldService
 
  BTW, of course the greetings service is up and running and I can query
 its
  WSDL (v1.1)
 
  In the composite I did try both wsdl.interface and wsdl.portType and got
 the
  same result (same interface.wsdl cannot be processed)
 
  thanks,
 
  JJ-
 
 
 
 
 
  On Sat, May 17, 2008 at 7:29 AM, Jean-Jacques Dubray [EMAIL PROTECTED]
  wrote:
 
  Luciano, Mike:
 
  thanks for the detailed answer. Yes, I am aware there are different
 types.
  I am not so concerned having to declare an implementation within the
 same
  domain. As a matter of fact, it looks to me that it is not even within

Re: Sun is asking for proof that users want Sun support for SCA, A call to arms!

2008-05-17 Thread Jean-Jacques Dubray
Jeff:

IMHO, people are not emphasizing enough how significant SCA's contribution
is to the evolution of the programming model of information systems (while
accomplishing it without disrupting existing investments).

People have been building information systems with a CRUD-Oriented
Synchronous Client/Server application model for the past 40 years or so
(since the OLTP days). A COSC/S is not well suited to create
*composite *information
systems (a.k.a connected systems). SCA augments COSC/S (without disrupting
it) with an Asynchronous Inter-Action Oriented Peer-to-Peer programming
model. The foundations of this programming model include bidirectional
interfaces, orchestrations and assemblies (I would also add resources, but
that's another debate). I have  written a minibook on Composite Software
Construction (free to download after registration) (
http://www.infoq.com/minibooks/composite-software-construction)

If you want to see a spectacular application of SCA, think BPM, but think
BPM in a totally different way that people have thought about it. Today we
are hitting a hard wall in the BPM space. Lots of people have tried it
without much success. SCA opens up the way to make Composite Information
Systems a reality by offering a service oriented, process centric, model
driven programming model. I explain the relation between BPM and SCA in
this article: http://www.infoq.com/articles/seven-fallacies-of-bpm

I urge you to consider the business case for creating Composite Information
Systems http://www.ebpml.org/com/an_introduction_to_soa4.swf and focus on
that. If people see SCA as a replacement for J2EE or Spring the interest
will remain marginal.

JJ-

On Sat, May 17, 2008 at 12:06 PM, Jeff Anderson 
[EMAIL PROTECTED] wrote:

 To everybody out there interested in seeing SCA being more widely adopted.

 Recently I posted a general overview of SCA coverage at JavaWorld last
 week in San Francisco. Which can be found at

 http://agileconsulting.blogspot.com/2008/05/highlights-of-sca-at-javaworld-2008.html

 I spoke briefly about the SCA panel that was attended by members of
 IBM, Sun SAP and MCd by David Chapelle. After the panel, I had the
 chance to briefly speak with Peter Walker of Sun Microsystems
 concerning Sun support for SCA. In his opinion, Sun will probably not
 support SCA, because in his mind there is no user demand. Peter has
 actually invited me to tell him more about what users want directly
 on my above-mentioned blog entry.

 I personally think that having Sun support SCA in a more active
 fashion, and incorporating it into the JavaEE world would do a lot to
 reduce the noise around fractures within the Java community
 (especially from Microsoft) and would be excellent for the Java
 platform in general.

 Is anybody else concerned with Sun's lack of support? Please provide
 your comments at


 http://agileconsulting.blogspot.com/2008/05/highlights-of-sca-at-javaworld-2008.html

 I will make sure to forward your comments over to Peter. Feel free to
 share any evidence of the real world adoption of SCA and the value
 that it has provided. Be generic when referring to specific clients or
 projects if you need to protect the innocent :-).


 It would be great if we can provide hard evidence to convince Sun that
 SCA is real, valuable, and worth considering.

 Of course, I will also share the results of this with the community.

 --
 Jeff Anderson

 http://agileconsulting.blogspot.com/




-- 
Jean-Jacques Dubray
425-445-4467


Re: Web Service References

2008-05-16 Thread Jean-Jacques Dubray
Luciano:

thanks, actually in the test/bpel/helloworld-reference composite definition
you also have a component defined with a binding.ws and there to, there is
an implementation.java element. Is it required?

!-- Simple ws-reference --
!--
component name=HelloWorldService
implementation.java class=helloworld.HelloWorldServiceImpl/
reference name=greetingsService
binding.ws uri=http://localhost:8085/GreetingsService/
/reference
/component
--

Would you consider ws bindings as the preferred way to implement  cross
domain composites?

JJ-

On Fri, May 16, 2008 at 12:06 AM, Luciano Resende [EMAIL PROTECTED]
wrote:

 Hey Jean-Jacques Dubray

 Let me try to respond your questions :

 The helloworld.composite defined in the
 itest/bpel/helloworld-reference defines a GreetingsServiceComponent
 that is implemented by a simple pojo and has its interface contract
 defined by a wsdl, in this case greetings.wsdl.  This component does
 not use the binding.ws, thus is not exposed as web services.

 The helloworld-ws-reference does use the binding.ws to wire to the
 service exposed by the helloworld-ws-service sample.

 As for the ws binding, you can use it to consume services available on
 the cloud, you can see this in the demos/xml-bigbank


 On Thu, May 15, 2008 at 1:07 PM, Jean-Jacques Dubray [EMAIL PROTECTED]
 wrote:
  Luciano has pointed me towards a BPEL reference sample. It was
 constructed
  by using the HelloWord sample which inovkes a GreetingsService. The
  Greeting Service is a regular web service implemented as an SCA composite
  (similar to the hello-ws sample).
 
  The hello world bpel definition exposes itself a service.
 
  Even though GreetingsService is a plain vanilla Web Service its reference
  definition includes an implementation.java element:
 
 component name=GreetingsServiceComponent
 implementation.java class=greetings.GreetingsServiceImpl /
 
 service name=GreetingsService
 interface.wsdl interface=
  http://greetings#wsdl.interface(Greetings)http://greetings#wsdl.interface%28Greetings%29
 /
 /service
 /component
 
  this is also true for the helloworld-ws-reference sample:
 
 reference name=HelloWorldService
  promote=HelloWorldServiceComponent/helloWorldService
 interface.java interface=helloworld.HelloWorldService /
 binding.ws wsdlElement=
  http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)http://helloworld#wsdl.port%28HelloWorldService/HelloWorldSoapPort%29
 /
 /reference
 
  Why is not a WSDL enough?
 
  The other question is if you use a WS binding, why does the service has
 to
  be part of the same domain as the consumers? Could they belong to two
  different SCA domains? As a matter of fact can a composite consume a WSDL
  reference that is not part of an SCA domain at all?
 
  thanks,
 
  --
  Jean-Jacques Dubray
  425-445-4467
 



 --
 Luciano Resende
 Apache Tuscany Committer
 http://people.apache.org/~lresende http://people.apache.org/%7Elresende
 http://lresende.blogspot.com/




-- 
Jean-Jacques Dubray
425-445-4467


Web Service References

2008-05-15 Thread Jean-Jacques Dubray
Luciano has pointed me towards a BPEL reference sample. It was constructed
by using the HelloWord sample which inovkes a GreetingsService. The
Greeting Service is a regular web service implemented as an SCA composite
(similar to the hello-ws sample).

The hello world bpel definition exposes itself a service.

Even though GreetingsService is a plain vanilla Web Service its reference
definition includes an implementation.java element:

component name=GreetingsServiceComponent
implementation.java class=greetings.GreetingsServiceImpl /

service name=GreetingsService
interface.wsdl interface=
http://greetings#wsdl.interface(Greetings) /
/service
/component

this is also true for the helloworld-ws-reference sample:

reference name=HelloWorldService
promote=HelloWorldServiceComponent/helloWorldService
interface.java interface=helloworld.HelloWorldService /
binding.ws wsdlElement=
http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)/
/reference

Why is not a WSDL enough?

The other question is if you use a WS binding, why does the service has to
be part of the same domain as the consumers? Could they belong to two
different SCA domains? As a matter of fact can a composite consume a WSDL
reference that is not part of an SCA domain at all?

thanks,

-- 
Jean-Jacques Dubray
425-445-4467


Re: What's next for SCA BPEL Integration

2008-04-24 Thread Jean-Jacques Dubray
Luciano:

congrats on this milestone. You might also want to consider the other way
around, from an SCA component type, generate the skeleton BPEL
(send/receive/invokes, partner links...).

I am looking forward to build some samples with it !

JJ-

On Thu, Apr 24, 2008 at 8:37 AM, Luciano Resende [EMAIL PROTECTED]
wrote:

 Now that we are making more progress with the SCA  BPEL integration
 and have figured out how to make References to work, let's discuss
 what could be the next steps on this area. Below are couple examples
 of what we could do next

 - WS-BPEL Process Introspection : Currently we are requiring SCA
 componentType files, we could introspect the BPEL process file to
 generate the component type information from it.

 - Integrate BEPL with the store scenario tutorial : We could add a
 OrderProcessing step to the store checkout, and illustrate a more real
 integration scenario.

 Other then these, we could review the
 SCA_ClientAndImplementationModelFor BPEL and identify other areas that
 we might need enhancements. Scenarios / Samples / Demos are always
 welcome too. Or if you have other suggestions, feel free to jump to
 the discussion.

 BTW: Copying the ODE list in case they want to jump and help, or in
 case they have other ideas.

 --
 Luciano Resende
 Apache Tuscany Committer
 http://people.apache.org/~lresende http://people.apache.org/%7Elresende
 http://lresende.blogspot.com/




-- 
Jean-Jacques Dubray
425-445-4467


Re: WS outside of control

2008-03-21 Thread Jean-Jacques Dubray
Albert:

my understanding is that SCA is based on an automatic (semantic) mapping.
The method signatures had to be the same. This is not a severe limitation
because at some point 2 interfaces have to match to communicate. The pattern
to compose arbitrary interfaces is to use a mediator component that bridges
the two interfaces. Again, this is not a big limitation, because when you
need to compose arbitrary interfaces, you could have a lot going on in the
mediator (transformation, even some state management...)

JJ-

On Fri, Mar 21, 2008 at 5:53 AM, Albert Rainer [EMAIL PROTECTED] wrote:

 I'm giving a lecture in Web Service Composition at the Vienna University
 of Technology and I want to use tuscany as an advances technique for system
 configuration. But first of all I've to understand the technology befor
 annoying my students. I've gone through the examples but didn't find any
 solution for my problem.
 :
 I have a composite that defines a component and binds it to a Web Service
 outside of my control, somewhere on the Web.
 The service is axis2 and generated from a Java class.
 package at.move;
 public class MathService {
public double addiere(double a,double b){
return a+b;
}
public int aufrunden(double a){
return (int)Math.ceil(a);
}
 }
 The Calculaor.composite looks like that:
 composite xmlns=http://www.osoa.org/xmlns/sca/1.0;
   targetNamespace=http://sample;
   xmlns:sample=http://sample;
   name=Calculator

component name=CalculatorServiceComponent
implementation.java class=
 calculator.CalculatorServiceImpl/
reference name=addService
binding.ws uri=
 http://localhost:8080/zong/services/MathService; /
/reference
reference name=subtractService
 target=SubtractServiceComponent/reference
reference name=multiplyService
 target=MultiplyServiceComponent/reference
reference name=divideService
 target=DivideServiceComponent/reference
/component

component name=SubtractServiceComponent
implementation.java class=calculator.SubtractServiceImpl/
/component
...
 /composite

 The idea is: For the addService and method add() I want to use the The Web
 Service with the method: addiere()
  I need to map the AddService to the MathService and the add method from
 the Calculator to the addiere method from MathService
  @Reference
public void setAddService(AddService addService) {
this.addService = addService;
}
   public double add(double n1, double n2) {
return addService.add(n1, n2);
}

 What steps are required in order to achieve such a mapping? Or is this not
 in the intetntion of tuscany and it is not possible?

 Many thanks in advance.


 
 Dr. Albert Rainer
 EC3 - Electronic Commerce Competence Center
 www.ec3.at
 Donau-City Strasse 1
 A-1220 Wien
 Tel: +43 1 522 71 71 - 33
 Fax: +43 1 522 71 71 - 71


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Jean-Jacques Dubray
425-445-4467


Re: Conversation and Message exchange patterns

2008-03-13 Thread Jean-Jacques Dubray
Simon:

my understanding is that it cannot be done with BPEL yet.

Do you know if this can be achieved with pure Web Services (regardless of
whether they have been written in Java or not).

JJ-

On Thu, Mar 13, 2008 at 12:05 PM, Simon Laws [EMAIL PROTECTED]
wrote:

 On Wed, Mar 12, 2008 at 3:35 PM, James, Steven [EMAIL PROTECTED]
 wrote:

  We are investigating using SCA and are trying to understand if SCA could
  support complex Message exchange patterns (MEP's). What I mean by MEP is
  similar to those defined by WSDL 2.0 i.e. In-out Out-Only etc.
 
  I have been looking at the conversation capabilities of SCA and am
  starting to think we could create our message patterns using this
 mechanism.
  The types of pattern we are intrested in are for instance the ability to
  make a request and then get a configurable number of progress updates.
 Is
  this possible using conversations? in addition is there any language or
  transport constraints to this?
 
  Best regards,
 
  Steve.
 
 
  This e-mail and any attachment is for authorised use by the intended
  recipient(s) only. It may contain proprietary material, confidential
  information and/or be subject to legal privilege. It should not be
 copied,
  disclosed to, retained or used by, any other party. If you are not an
  intended recipient then please promptly delete this e-mail and any
  attachment and all copies and inform the sender. Thank you.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 Hi Steve

 Welcome to Tuscany!

 Let me make sure I have your scenario correct then we can work up some
 sample interface  together for how to make it work. So IIUC you have
 service
 A and service B and they call each other as follows:

 A calls B.doSomething asynchronously
 B calls A.progressReport
 B calls A.progressReport
 B calls A.progressReport

 The progress reports stops after a set number have been delivered?

 On the language or transport constraints to this point. The general
 support for conversations, callbacks etc is good for Java over the SCA and
 WebServices bindings. I don't think other languages/transports have been
 addressed but I'm sure someone will jump in and correct me.

 Regards

 Simon




-- 
Jean-Jacques Dubray
425-445-4467