Re: Webapp integration test with maven cargo plugin
On Dec 6, 2007 5:06 AM, Raymond Feng [EMAIL PROTECTED] wrote: Hi, We have been painful with running the web application tests manually a few days before a release. I think it would be beneficial to automate the tests as part of the maven build. To get it started, I checked in [1] an example to demonstrate how to use the cargo [2] maven plugin to automate the integration test of Tuscany web applications. The maven build now goes with the following steps: 1) package: generate the artifacts as a WAR 2) pre-integration-test: start the Jetty web server (embedded or external) and deploy the WAR to the server using Cargo 3) integration-test: run the integration test cases using surefire plugin. The test case should be the client program that talks to the web app 4) post-integration-test: stop the Jetty web server using Cargo Thanks, Raymond [1] http://svn.apache.org/viewvc?rev=601610view=rev [2] http://cargo.codehaus.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hey Raymond, good thinking What I'd like to do based on this is have maven run Sebastien's ant generator plugin and then run the ant script to build the war file. I'll have a play when I get time. Simon
Re: Implementation Policies
On Dec 5, 2007 11:04 PM, Raymond Feng [EMAIL PROTECTED] wrote: Would it help if the Intent/PolicySet has a pointer to the its attachpoint (i.e., where the intent/policy is declared)? Thanks, Raymond - Original Message - From: Venkata Krishnan [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Wednesday, December 05, 2007 1:40 AM Subject: Implementation Policies Hi, To set the context its about specification of policies on implementation elements in a composite. Since we have implementation model instances being reused we have trouble with capturing what policies were set on an implementation under a specific Component. I have this going in the trunk but with a bit of a hack in ComponentImpl.getImplementation. Now am looking at cleaning that a bit and exploring options. One of the alternatives suggested earlier is to have the implementation policies stored in the component itself. But the problem is Component themselves can have policies specified over them which will have be inherited by the service, implementation and reference child elements within. One way of getting around this is to add up the component's policies to the services and references child elements right at the time of reading from the scdl. Then when the implementation child element is loaded we read its policies and store it into the component. This seems a good way out but bites during the build phase as follows :- - One of the things we do in the build phase is validating if policysets specified on an implementation element i.e. checking to see if a specified policyset does apply to the implementation type in question. The specs says that its ok if this validation fails for policysets that have been inherited (say from the composite or the component), but if this validation fails for a policyset directly specified for the element then its an error in defining the composite and it must be flagged. * 551 When computing the policySets that apply to a particular element, the @appliesTo attribute 552 of each relevant policySet is checked against the element. If the policySet is attached 553 directly to the element and does not apply to that element an error is raised. If a policySet 554 that is attached to an ancestor element does not apply to the element in question, it is simply 555 discarded. - * So if we are going to store in the component model, the policysets specified on its implementation then during validation its not possible to figure out if the policyset came thro inheriting the component's policyset or from direct definition. Is there a way out of this ? Thanks. - Venkat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Or have a pointer from each attachpoint to their policy and also a pointer from the component which aggregates them. A similar thing happens in contributions and the domain where composites are both contributed composites and deployable composite. Simon
Re: Implementation Policies
Hi, First, thanks for the help. I am not so comfortable with having inside an intent or a policyset, a pointer to an assembly model artifact. I somehow see a one way dependency that goes from the assembly model to the policy model i.e. an assembly model artifact must know the policies attached to it, but a policy (intent or policyset) doesn't quite need to know where it is attached. The fact that a policy intent 'constrains' or a policyset 'appliesTo' a particular 'class' of assembly model artifacts is a different thing. I am trying another work around for this. Will let you folks know of it once I am sure it works for me locally and get your views. Thanks - Venkat On Dec 6, 2007 2:36 PM, Simon Laws [EMAIL PROTECTED] wrote: On Dec 5, 2007 11:04 PM, Raymond Feng [EMAIL PROTECTED] wrote: Would it help if the Intent/PolicySet has a pointer to the its attachpoint (i.e., where the intent/policy is declared)? Thanks, Raymond - Original Message - From: Venkata Krishnan [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Wednesday, December 05, 2007 1:40 AM Subject: Implementation Policies Hi, To set the context its about specification of policies on implementation elements in a composite. Since we have implementation model instances being reused we have trouble with capturing what policies were set on an implementation under a specific Component. I have this going in the trunk but with a bit of a hack in ComponentImpl.getImplementation. Now am looking at cleaning that a bit and exploring options. One of the alternatives suggested earlier is to have the implementation policies stored in the component itself. But the problem is Component themselves can have policies specified over them which will have be inherited by the service, implementation and reference child elements within. One way of getting around this is to add up the component's policies to the services and references child elements right at the time of reading from the scdl. Then when the implementation child element is loaded we read its policies and store it into the component. This seems a good way out but bites during the build phase as follows :- - One of the things we do in the build phase is validating if policysets specified on an implementation element i.e. checking to see if a specified policyset does apply to the implementation type in question. The specs says that its ok if this validation fails for policysets that have been inherited (say from the composite or the component), but if this validation fails for a policyset directly specified for the element then its an error in defining the composite and it must be flagged. * 551 When computing the policySets that apply to a particular element, the @appliesTo attribute 552 of each relevant policySet is checked against the element. If the policySet is attached 553 directly to the element and does not apply to that element an error is raised. If a policySet 554 that is attached to an ancestor element does not apply to the element in question, it is simply 555 discarded. - * So if we are going to store in the component model, the policysets specified on its implementation then during validation its not possible to figure out if the policyset came thro inheriting the component's policyset or from direct definition. Is there a way out of this ? Thanks. - Venkat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Or have a pointer from each attachpoint to their policy and also a pointer from the component which aggregates them. A similar thing happens in contributions and the domain where composites are both contributed composites and deployable composite. Simon
Re: Tuscany and other Apache projects
Bringing this up again just to remind people to keep thinking about it. If we can get Tuscany integrated with other projects then the community around those other projects is opened up to joining the Tuscany community. People using that other project get exposure to Tuscany and might ask for help on the Tuscany mailing lists, report or fix our bugs, or even potentially help write new functions to make it work better. Any new participation is good for Tuscany and helps grow our community. When Tuscany contributors become involved with other projects it helps our graduation chances. If people on the IPMC know us as helpful from our participating in other projects then they are much more likely to vote for us than if we're a bunch of unknowns. We use lots of other Apache projects in Tuscany so there's plenty of potential for contributing something back. How many times have you found some deficiency with one of the projects we use and not done something about it or even told them? It doesn't have to be through writing a lots of new code it can be all the same things we'd like people to be doing on our project such as participating in mailing list discussions, updating/correcting documentation, reporting bugs, reviewing new releases etc etc. ...ant On Nov 22, 2007 9:42 AM, Simon Laws [EMAIL PROTECTED] wrote: There are quite a few Apache projects that Tuscany is already using in one way or another. Looking through the list of all the projects on the Apache web site gives some inspiration for other things that we could look into. Here is a summary of a quick spin through the list trying to pick out the Apache projects that we do/could use or that could possibly use Tuscany. In reality I know very little of the details of these project so this is pure speculation. But if there are experts out there with an interested in Tuscany we could come up with some real ideas. From this list the MINA project looks immediately interesting to me as it could help out with some more performant default bindings and 'in JVM' bindings using pipe IO. Also the OFBiz project is something that I hadn't come across before and could provide some useful use cases. The OFBiz site talks about a Loosely coupled multi-layer component architecture and it set me thinking about how their components might sit in an SCA runtime. Anyhow if anyone has ideas (or time:-), or if this is already happening and it just isn't very visible, then it would be great to hear. ActiveMQ We use in binding.jms and binding.ws Are there adapters on ActiveMQ side that could be constructed Coccon Could we include SCA components in the component pipeline? Commons There are parts of Tuscany that could be more generally useful, for example, graph driven databinding framework a scdl4j tool could be built Validation Could validation be used with SCDL Data Does DAS have a role here? Directory LDAP DAS Use Directory as a registry implementation Felix We are using this for our OSGi support Harmony Could we get Tuscany running on Harmony? James Wrap James components with SCA services? MINA Could use as the domain transport Develop a MINA binding Myfaces (Tapestry, Struts, Tiles, Turbine, Wicket, Sling) There are many tools related to web app development We could certainly use some of these tools in any monitoring and management apps we need but is there value in tighter integration? For example, Turbine talks about SOA, could we provide some infrastructure for them? ODE We are using this for our BPEL support We could offer a patch to update their website to include Tuscany as a user OFBiz Looks interesting as they talk of services and components and of service based logic OpenJPA We use this in our new openJPA implementation I don't know if we a re contributing to the project though. Portals Could we do something along the lines of wiring in portlets as part of an SCA composite like we do with javascript Velocity Be interesting to have a velocity implementation type Not sure how refs would be done Synapse Has been discussed on the mailing list. I believe, in the first instance, the proposal is to use SCA composites as a configuration alternative. Be interesting to look how be can introduce it to the SCA domain Muse We some management interfaces and WSDM is an option Abdera Use as an alternative Atom engine (we use Rome at the moment) Cxf Could resurrect the CxF binding. There used to be one but it doesn't work anymore CxF could have an SDO binding FTP Would be good to have an FTP binding in a similar vein to the HTTP binding Could be used as a deployment vehicle in the distributed runtime case Lokai Don't know the details of this but we need some management framework so we should look to see what this does Qpid We could use as an alternative messaging transport. Plug into binding.jms ? ServiceMix
Missing Saxon 9.0.0.2 dependency
We've now a dependency on Saxon 9.0.0.2 but thats not in any Maven repository we use so the build fails. Must we use Saxon 9.0.0.2 or does anyone know of a public repository we could get it from? ...ant
Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO
This approach sounds good to me. I'd like to suggest one small addition to the final else clause, based on the following spec quote: Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. If the binding uses XML serialization, then the proposed final else will do the right thing. (For Tuscany, this includes the default binding.sca.) However, if the binding uses some other serialization such as JSON, then it might be more compatible to use this same serialization in the local pass-by-value case. There are libraries (e.g., [1]) that provide this functionality. So the final else would become: else // if we have a simple JavaBean and an XML binding symbol is copied using JAXB XML serialization else else // if we have a simple JavaBean and a JSON binding symbol is copied using JSON serialization else // I'm not going to list all possible bindings but you get // the picture... Thoughts? Simon [1] http://json-lib.sourceforge.net/usage.html Raymond Feng wrote: Hi, What we have today is mostly in line with your proposal. Only a few twicks are needed. 1) If the data type is recognized by a known databinding, for example, SDO or JAXB, the databinding specific-copy is used. For SDO, it will be SDO CopyHelper.copy and for JAXB, it will be marshal/unmarshal. (This is the what we do in the code). 2) If the object implements java.io.Serializable, it is copied using Java serialization [2] (We already have it) 3) Assuming we have a simple JavaBean, and it is copied using JAXB XML serialization [3] (To be added) Thanks, Raymond - Original Message - From: Jean-Sebastien Delfino [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Tuesday, December 04, 2007 3:26 PM Subject: Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO Jean-Sebastien Delfino wrote: Some answers after researching the spec docs: Raymond Feng wrote: Hi, I think this issue needs to be brought up at the spec level. Basically, the following have to be clarified: 1) What interfaces are qualified to be remotable? 2) What are the characteristics of the input/output types for remotable interfaces? Assembly spec: 697 Whether a service of a component implementation is remotable is defined by the interface of the service. In the case of Java this is defined by adding the @Remotable annotation to the Java interface (see Client and Implementation Model Specification for Java). WSDL defined interfaces are always remotable. Java SCA Annotations and APIs spec: 297 Java interfaces generated from a WSDL portType are always remotable. I think that says that JAX-WS generated interfaces should be considered remotable even in the absence of an @Remotable interface. Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. For example, if the service is going to be exposed using the standard web service binding, then the parameters must be Service Data Objects (SDOs) 2.0 [2] or JAXB [3] types. Independent of whether the remotable service is called from outside of the composite that contains it or from another component in the same composite, the data exchange semantics are by-value. This leaves the door open for other data representations supported by other service bindings, e.g. a DOM or a Java Serializable object. The Java SCA Annotations and APIs spec Errata adds this: The SCA Client and Implementation Model for Java applies the WSDL to Java and Java to WSDL mapping rules as defined by the JAX-WS specification [4] for generating remotable Java interfaces from WSDL portTypes and vice versa. For the purposes of the Java-to-WSDL mapping algorithm, the interface is treated as if it had a @WebService annotation on the class, even if it doesn't, and the org.osoa.OneWay annotation should be treated as a synonym for javax.jws.OneWay. For the WSDL-to-Java, the generated @WebService annotation should imply that the interface is @Remotable. For the mapping from Java types to XML schema types SCA supports both the SDO 2.1 [2] mapping and the JAXB [3] mapping. Having a choice of binding technologies is allowed, as noted in the first paragraph of section 5 of the JSR 181 (version 2) specification, which is referenced by the JAX-WS specification. EJB binding spec: 105 When used with the EJB binding, a service or reference interface must be compatible with a session bean interface, according to the following rules: - The interface offered by a reference MUST be remotable if the remote session bean interface is being accessed, and MUST be local if the local session bean interface is being accessed. - The methods on the session bean MUST be a compatible superset of the methods in the interface used by
[jira] Commented: (TUSCANY-1493) Snapshot mapping framework to convert DataObjects to and from Java objects
[ https://issues.apache.org/jira/browse/TUSCANY-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549058 ] Kelvin Goodson commented on TUSCANY-1493: - I've just made some observations on the tuscany-user mailing list which should appear in the mailing list archives shortly, under the thread that contains http://www.mail-archive.com/[EMAIL PROTECTED]/msg02162.html Snapshot mapping framework to convert DataObjects to and from Java objects -- Key: TUSCANY-1493 URL: https://issues.apache.org/jira/browse/TUSCANY-1493 Project: Tuscany Issue Type: New Feature Components: Java SDO Implementation Reporter: bert.robben Fix For: Java-SDO-Next Attachments: agfasdo.tar.gz, sdo-snapshot.zip, sdo.zip We're developing 3-tier applications with a swing client, JBoss app server and a couple of databases in the back-end. We use sdo as mechanism to exchange data between our client and our server. On the server side we have a fairly complex implementation based partially on Hibernate pojo's, partially on an inhouse legacy persistency system. The legacy part (although written in Java) is very hard to change. In this environment we often need to convert between data objects and server side objects (typically, but not always at a transition from server to client or vice versa). To support this we developed a mapping framework that allows us to convert data between SDO and ordinary Java objects. This framework defines a number of important concepts. - A snapshot is an opaque collection of structured data at a given moment in time. It is opaque in the sense that the data inside can't be accessed directly. - A Mapper is an interface that defined how data can be accessed from an object. We have implementations for SDO DataObjects, normal Java POJO's (following java beans convention). hibernate pojos, and support for customizing this to access any kind of object (as we need for instance for our legacy objects). - We defined a DataAccessService (sorry for the confusing name) that given a mapper and some objects can create a snapshot. Given a snapshot and a mapper it can instantiate new objects. As such we can convert data to and from data objects very easily. This framework is part of our in-house developed implementation of the SDO spec. We want to share our code and experience with the open-source community. As such, Frank Budinsky proposed that we make JIRA request for this to start the discussion. I'll attach the core classes for this feature to this JIRA. At this moment I'm not making the entire code available because we implemented more than one additional feature (I'll add some more JIRA over the next days) and I'd like to have a more focussed discussion. Also, at this moment in time some smaller parts of implementation (for instance the hibernate integration) are still implemented as a specialization of our SDO implementation. As such they can't be built outside of the rest of our application (which is not open-sourced). However this is just a matter of finding enough time to move them to our sdo component. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Distributed online store scenario, was: Updated online store tutorial
On Dec 5, 2007 6:54 PM, Simon Laws [EMAIL PROTECTED] wrote: On Dec 5, 2007 8:29 AM, Simon Laws [EMAIL PROTECTED] wrote: Hi An update of where I'm up to... Simon On Dec 4, 2007 9:53 PM, Jean-Sebastien Delfino [EMAIL PROTECTED] wrote: [snip] Simon Laws wrote: To get me going on this I've experimented with moving the FruitsCatalog out of the cloud and into a webapp. The web app relies on the evolving deep tomcat integration so starting the scenario requires the following steps Unzip the distribution/tomcat zip over your tomcat installation Set the tomcat/sca-contributions/tuscany.properties file to include node and domain URLs that are to your liking. Copy tutorial-catalog-jse.war to tomcat/webapps Run LaunchCloud Run LaunchStoreDistributed And you are set. Thanks a lot, I'll update and will try it. It's all a bit fragile at the moment so lots of things to do, for example, the domain is a pain as it doesn't track when things go away so it can get confusing. However lets try and get the majority of the scenario working and we can then look back and see where the holes are. I haven't done anything with the EJB code you made yet other than look at it. I could start building the EJB for the vegetable catalog if you like. Yes, here are the steps I was thinking about: 1. develop the EJB code 2. deploy it to Geronimo 3. come up with a version of store.composite with the vegetablesCatalog reference configured with the proper EJB binding 4. figure what the business interface for that reference looks like (I'm hoping that this will help shed some light on the POJO and databindings discussion) 5. get that working end to end I've done 1-5 but with very little thought about 4 other than take the VegetablesCatalog interface as it. There is a catalog-ejb project now under tutorial. This deploys to Geronimo and I've updated the distributed store to use a specifically configured binding. I had to change the domain to 9998 as Geronimo uses so some of the other bits of the tutorial may not work at the moment. and in a second step: 6. add a description of the EJB app to the domain 7. on the vegetablesCatalog reference, replace the binding.ejb uri=.../ by a wire with target=VegetableCatalog 8. get that working end to end I'm assuming from what you say that we will deploy the EJB app to Geronimo standalone as if it had existed before we came along with SCA. Yes Where will the composite that references this EJB be deployed to? I'm struggling with how to satisfy The idea is to be able to develop the scenario and explore how to work with existing JEE apps and different containers in an SCA domain without piling more runtime code into Tuscany. as it seems that we will need to deploy the composite that references the EJB to Geronimo which, in turn, means bringing up the Geronimo/Tuscany integration code again. I think that adding a composite to the domain does not necessarily imply download that composite to the Tuscany-enabled container that runs the components it describes. In other words I'm hoping that we can add to the domain a composite that describes an application without having to install the Tuscany Java runtime to the container that runs it. That's one of the reasons why I brought up that scenario: To help us explore what a domain really is and the idea that an SCA domain is more than a bunch of Tuscany-Java runtimes that use a Tuscany-specific protocol to advertise/discover their services. I have been working on bringing the Geronimo plugin back up again with the code in trunk and that is almost done now so we have some options about how we want to ply this. We could add the ability to introduce service descriptions to the domain regardless of whether the service is running on a Tuscany enabled endpoint although I haven't done this yet. We need to agree how this would be achieved from the users point of view. For example, is this a specific interface for associating the domain with existing services or is it to use the existing contribution interfaces with composites marked in some way that indicates that they are not to be deployed for real but simply added to the domain. Generally we need the ability on the domain to view and manipulate component definitions so that the deployment process is more flexible for situations when the domain level composite is modified. The deployment of virtual components could be part of this. I'll have a play this morning and see if any inspiration comes. I have spent time bringing up the Geronimo plugin to work with the code in trunk so we can play with a number of different scenarios.
Re: [jira] Problems calling the real stock quote
I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient(Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Caused by: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient(Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:66) ... 10 more Raymond Feng [EMAIL PROTECTED] wrote: Hi, It seems that the component business logic ran into a RemoteException and the Tuscany runtime doesn't know how to map it to a fault for the Web Service. The bad news is that we don't dump the orginal exception in this case. The error handling could be improved. I suggest you look into the component implementation code to figure out what's behind the exception. Thanks, Raymond - Original Message - From: Mahi To: tuscany-dev@ws.apache.org Sent: Monday, December 03, 2007 1:58 PM Subject: [jira] Problems calling the real stock quote Driver: apache-tuscany-sca-1.0.1-incubating-src I am trying to invoke the live stock service that was used in older (m1 ans m2) drivers. I have attached the WSDL file. I have tested this web service in Web Services Explorer in RAD, and it works. I am pasting code followed by the exception when I run it. Stockquote.composite xmlns:wsdli=http://www.w3.org/2006/01/wsdl-instance;
Data transformation errors
I'm seeing a couple of new errors after and update which could be related to changes I've made but look a little odd so if anyone recognizes then please should. For example, from itest-conversations-ws org.apache.tuscany.sca.databinding.TransformationException: No path found for the transformation: java:simpleType-org.apache.axiom.om.OMElement at org.apache.tuscany.sca.databinding.impl.MediatorImpl.getTransformerChain( MediatorImpl.java:149) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate( MediatorImpl.java:61) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform (Input2InputTransformer.java:148) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform (Input2InputTransformer.java:43) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate( MediatorImpl.java:73) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.transform (DataTransformationInterceptor.java:175) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke (DataTransformationInterceptor.java:72) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:249) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:146) at $Proxy24.initializeCount(Unknown Source) at org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl.runConversationFromInjectedReference (ConversationalClientStatelessImpl.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke( PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:249) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:146) at $Proxy22.runConversationFromInjectedReference(Unknown Source) at org.apache.tuscany.sca.itest.conversational.ConversationWSDLTestCase.testStatelessStatefulConversationFromInjectedReference (ConversationWSDLTestCase.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.junit.internal.runners.TestMethodRunner.executeMethodBody( TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected( TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected( BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod( TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java :45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod( TestClassMethodsRunner.java:75) at org.junit.internal.runners.TestClassMethodsRunner.run( TestClassMethodsRunner.java:36) at org.junit.internal.runners.TestClassRunner$1.runUnprotected( TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected( BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java :52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run( TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196) Regards Simon
Distributed SCA support for applications was: Distributed online store scenario, was: Updated online store tu
I've still problems with JIRA 1907. So for now I have to refrain to create dynamic wiring for now, because ComponentUpdater doens't work as I intended. I misunderstand something that happens in wiring so i need more debugging on it but and now it's time for me to build performance test in our cluster. We want to see if your infrastructure is efficient. I'm going to use callable reference instead of calling back. My previous callback problem was due to the fact that in CallableReferenceImpl, there's not enough state to recreate a proper wire to callback. The Object callback is trasient, oif you set it and serialize and send away that reference, you'll loose it. What it miss is a way to recreate a callback properly in this case. I might investigate on how to solve this use case, but i lack of time. Any suggestions? Let me explain better: Suppose the following scenario: - Scenario A The actors are : ComonentA, ComponentB, ComponentC * ComponentA holds a CallableReference's ComponentC (it contains ComponentC scdl) , send it to ComponentB sets itself as callback to ComponentC, calls a Component C method and the callback from Component C will fail. There are performance problems in using the current domain implementation. If you see the code, every nodes when it looks for a service, whether it's local gives out the endpoint string, but if the service is remote (not in that node) for each request to the service. The node queries the domain node, and this it don't scale up. I've created an endpoint's string cache with an expiring ttl to fix this problem.Just testing it now. That's because in my application i call the same method a lot of times. Looking into the future work, it will be nice: * having a membership support, that it scale up for a domain. A domain is a business enviroment, and it could be made of a lot of nodes. I looked Apache Tribes, it needs some work, using an hearthbeat is a scalability issue if the nodes are more then 100. And when i was looking P2P system research, I found a Scalable Membership protocol called SCAMP. You'll discover more in my homepage at cli : http://www.cli.di.unipi.it/~zoppi/scamp.pdf * having the possibility to move composite from a node to another node in order to achieve load balancing and fail over. This requires that a composite have to be stopped in a safe way: when all components/services inside it are stopped, you can stop the composite and move around. This is a lot of work and there're a lot of research papers about it. Just find the way that you think more appropriate for this task, and just find it, i.e: http://asna.ewi.utwente.nl/research/Ph.D.%20Theses/wegdam-PhD-dyn-reconf-load-distr-middleware-2003.pdf Well, these are my thoughts about current limitations in SCA scalability. Maybe i'll discover more after testing. The cool thing about SCA is its inherent simplicity, and it could be used for composing complex software distributed around Internet. Just 1 cent, to start a discussion. Cheers, Giorgio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Data transformation errors
Hi, Did you rebuild the modules? The commit I made for the databinding stuff require a clean build as some of the dependencies are changed. Thanks, Raymond - Original Message - From: Simon Laws [EMAIL PROTECTED] To: tuscany-dev tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 7:53 AM Subject: Data transformation errors I'm seeing a couple of new errors after and update which could be related to changes I've made but look a little odd so if anyone recognizes then please should. For example, from itest-conversations-ws org.apache.tuscany.sca.databinding.TransformationException: No path found for the transformation: java:simpleType-org.apache.axiom.om.OMElement at org.apache.tuscany.sca.databinding.impl.MediatorImpl.getTransformerChain( MediatorImpl.java:149) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate( MediatorImpl.java:61) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform (Input2InputTransformer.java:148) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform (Input2InputTransformer.java:43) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate( MediatorImpl.java:73) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.transform (DataTransformationInterceptor.java:175) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke (DataTransformationInterceptor.java:72) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:249) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:146) at $Proxy24.initializeCount(Unknown Source) at org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl.runConversationFromInjectedReference (ConversationalClientStatelessImpl.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke( PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:249) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:146) at $Proxy22.runConversationFromInjectedReference(Unknown Source) at org.apache.tuscany.sca.itest.conversational.ConversationWSDLTestCase.testStatelessStatefulConversationFromInjectedReference (ConversationWSDLTestCase.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.junit.internal.runners.TestMethodRunner.executeMethodBody( TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected( TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected( BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod( TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java :45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod( TestClassMethodsRunner.java:75) at org.junit.internal.runners.TestClassMethodsRunner.run( TestClassMethodsRunner.java:36) at org.junit.internal.runners.TestClassRunner$1.runUnprotected( TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected( BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java :52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run( TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196) Regards Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Saxon 9.0.0.2 dependency
Hi, At this moment, I use an ant script to download the zip and install the jars to the local maven repo. It's integrated with the pom.xml so it should work with mvn in the source build. I realized that the binary build will fail after that. I'm starting to improve the implementation.xquery based on the new APIs provided in saxon 9.0.0.2. There was a discussion with saxon team before. They are OK to get the jars published into maven but they don't want to take the responsiblity. Can we publish the jars (which are not in a public maven repo yet) in our svn repo as a maven repo as Geronimo is doing? See https://svn.apache.org/repos/asf/geronimo/server/tags/2.0.2/repository/. Thanks, Raymond - Original Message - From: ant elder [EMAIL PROTECTED] To: tuscany-dev tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 3:07 AM Subject: Missing Saxon 9.0.0.2 dependency We've now a dependency on Saxon 9.0.0.2 but thats not in any Maven repository we use so the build fails. Must we use Saxon 9.0.0.2 or does anyone know of a public repository we could get it from? ...ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Problems calling the real stock quote
Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient(Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Caused by: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient(Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java:66) ... 10 more Raymond Feng [EMAIL PROTECTED] wrote: Hi, It seems that the component business logic ran into a RemoteException and the Tuscany runtime doesn't know how to map it to a fault for the Web Service. The bad news is that we don't dump the orginal exception in this case. The error handling could be improved. I suggest you look into the component implementation code to figure out what's behind the exception. Thanks, Raymond - Original Message - From: Mahi To: tuscany-dev@ws.apache.org Sent: Monday, December 03, 2007 1:58 PM Subject: [jira] Problems calling the real stock quote Driver: apache-tuscany-sca-1.0.1-incubating-src I am trying to invoke the live stock service that was used in older
Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO
Simon Nash wrote: This approach sounds good to me. I'd like to suggest one small addition to the final else clause, based on the following spec quote: Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. If the binding uses XML serialization, then the proposed final else will do the right thing. (For Tuscany, this includes the default binding.sca.) However, if the binding uses some other serialization such as JSON, then it might be more compatible to use this same serialization in the local pass-by-value case. There are libraries (e.g., [1]) that provide this functionality. So the final else would become: else // if we have a simple JavaBean and an XML binding symbol is copied using JAXB XML serialization else else // if we have a simple JavaBean and a JSON binding symbol is copied using JSON serialization else // I'm not going to list all possible bindings but you get // the picture... Thoughts? Simon [1] http://json-lib.sourceforge.net/usage.html I agree that we need to take JSON into account (that was my next thought too I just didn't want to pile too many aspects in this discussion). I think it would be useful to put a table together comparing the JSON mapping and the JAXB mapping. Wouldn't it be nice if we could tell application developers if you use these patterns and types, your business object will work unchanged with XML and JSON? Concrete use case in hand, the store scenario flows the Item bean over XML, JSON and in-VM pass-by-value interactions. I'd hate to have to write 3 different Item beans and mediation code to cover these 3 cases. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Webapp integration test with maven cargo plugin
Simon Laws wrote: On Dec 6, 2007 5:06 AM, Raymond Feng [EMAIL PROTECTED] wrote: Hi, We have been painful with running the web application tests manually a few days before a release. I think it would be beneficial to automate the tests as part of the maven build. To get it started, I checked in [1] an example to demonstrate how to use the cargo [2] maven plugin to automate the integration test of Tuscany web applications. The maven build now goes with the following steps: 1) package: generate the artifacts as a WAR 2) pre-integration-test: start the Jetty web server (embedded or external) and deploy the WAR to the server using Cargo 3) integration-test: run the integration test cases using surefire plugin. The test case should be the client program that talks to the web app 4) post-integration-test: stop the Jetty web server using Cargo Thanks, Raymond [1] http://svn.apache.org/viewvc?rev=601610view=rev [2] http://cargo.codehaus.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hey Raymond, good thinking What I'd like to do based on this is have maven run Sebastien's ant generator plugin and then run the ant script to build the war file. I'll have a play when I get time. Simon ++1 This will help a lot validate the samples and other WAR based projects. Let me know if you need help with the ant generator plugin. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Problems calling the real stock quote
Hi, Also, can you check if your service interface class has the '@Remotable' annotation ? In a recent experience with our demos missing this ended me up in the exception that you state. Thanks - Venkat On Dec 6, 2007 10:11 PM, Raymond Feng [EMAIL PROTECTED] wrote: Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Caused by: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) ... 10 more Raymond Feng [EMAIL PROTECTED] wrote: Hi, It seems that the component business logic ran into a RemoteException and the Tuscany runtime doesn't know how to map it to a fault for the Web Service. The bad news is that we don't dump the orginal exception in this case.
Re: [jira] Problems calling the real stock quote
Good catch. For local interfaces, we won't apply databinding transformers. Thanks, Raymond - Original Message - From: Venkata Krishnan [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 8:55 AM Subject: Re: [jira] Problems calling the real stock quote Hi, Also, can you check if your service interface class has the '@Remotable' annotation ? In a recent experience with our demos missing this ended me up in the exception that you state. Thanks - Venkat On Dec 6, 2007 10:11 PM, Raymond Feng [EMAIL PROTECTED] wrote: Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Caused by: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) ... 10 more Raymond Feng [EMAIL PROTECTED] wrote: Hi, It seems that the component business logic ran into a
Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO
Giorgio Zoppi wrote: 2007/12/5, Jean-Sebastien Delfino [EMAIL PROTECTED]: Jean-Sebastien Delfino wrote: Some answers after researching the spec docs: Raymond Feng wrote: Hi, I think this issue needs to be brought up at the spec level. Basically, the following have to be clarified: 1) What interfaces are qualified to be remotable? 2) What are the characteristics of the input/output types for remotable interfaces? Assembly spec: 697 Whether a service of a component implementation is remotable is defined by the interface of the service. In the case of Java this is defined by adding the @Remotable annotation to the Java interface (see Client and Implementation Model Specification for Java). WSDL defined interfaces are always remotable. Java SCA Annotations and APIs spec: 297 Java interfaces generated from a WSDL portType are always remotable. I think that says that JAX-WS generated interfaces should be considered remotable even in the absence of an @Remotable interface. Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. For example, if the service is going to be exposed using the standard web service binding, then the parameters must be Service Data Objects (SDOs) 2.0 [2] or JAXB [3] types. Independent of whether the remotable service is called from outside of the composite that contains it or from another component in the same composite, the data exchange semantics are by-value. This leaves the door open for other data representations supported by other service bindings, e.g. a DOM or a Java Serializable object. The Java SCA Annotations and APIs spec Errata adds this: The SCA Client and Implementation Model for Java applies the WSDL to Java and Java to WSDL mapping rules as defined by the JAX-WS specification [4] for generating remotable Java interfaces from WSDL portTypes and vice versa. For the purposes of the Java-to-WSDL mapping algorithm, the interface is treated as if it had a @WebService annotation on the class, even if it doesn't, and the org.osoa.OneWay annotation should be treated as a synonym for javax.jws.OneWay. For the WSDL-to-Java, the generated @WebService annotation should imply that the interface is @Remotable. For the mapping from Java types to XML schema types SCA supports both the SDO 2.1 [2] mapping and the JAXB [3] mapping. Having a choice of binding technologies is allowed, as noted in the first paragraph of section 5 of the JSR 181 (version 2) specification, which is referenced by the JAX-WS specification. EJB binding spec: 105 When used with the EJB binding, a service or reference interface must be compatible with a session bean interface, according to the following rules: - The interface offered by a reference MUST be remotable if the remote session bean interface is being accessed, and MUST be local if the local session bean interface is being accessed. - The methods on the session bean MUST be a compatible superset of the methods in the interface used by the reference. - The interface used by a reference MAY NOT contain any methods inherited from EJBObject or EJBLocalObject. - Compatibility for an individual method is defined by the SCA Assembly Model Specification [4], and can be stated simply as compatibility of the signature. That is, the method name, input types, and output types MUST be identical. - The order of the input and output types also MUST be identical. This brings interesting points: - EJB binding does not imply remote, local interfaces are also supported (contrary to the common belief that binding implies remote). - an SCA reference can use a newly defined Java interface (compatible with the session bean interface but not dragging javax.ejb.Remote) with a @Remotable annotation. 3) What are the semantics of pass-by-value? Assembly spec: 706 Independent of whether the remotable service is called remotely from outside the process where the service runs or from another component running in the same process, the data exchange semantics are by-value. Implementations of remotable services may modify input messages (parameters) during or after an invocation and may modify return messages (results) after the invocation. If a remotable service is called locally or remotely, the SCA container is responsible for making sure that no modification of input messages or post-invocation modifications to return messages are seen by the caller. Does that help answer your questions? So, based on all the above, I'd like to come up with a reasonable implementation of the pass-by-value behavior for in-VM interactions. By in-VM I mean: - a reference is wired to a service - both run in the same node - the SCA binding is used. Disclaimer: In-VM can have many different meanings so people not comfortable with that definition of in-VM, valid only withing the context of the present email, can call it in-Foo if they want :) Assuming the
Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO
We had some discussions before on this list how the pass-by-value should be enforced. IIRC, the conclusion is that it would be a joint effort between the implementation/binding type and the runtime. In most cases, bindings representing remote protocols marshal/unmarshal the data on the wire. And the pass-by-value is enforced by default and there is no need to do a copy by runtime. For some implementation types, for example, xquery, it won't modify the java objects, pass-by-value is guaranteed at the implementation type level. Thanks, Raymond - Original Message - From: Simon Nash [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 6:32 AM Subject: Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO This approach sounds good to me. I'd like to suggest one small addition to the final else clause, based on the following spec quote: Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. If the binding uses XML serialization, then the proposed final else will do the right thing. (For Tuscany, this includes the default binding.sca.) However, if the binding uses some other serialization such as JSON, then it might be more compatible to use this same serialization in the local pass-by-value case. There are libraries (e.g., [1]) that provide this functionality. So the final else would become: else // if we have a simple JavaBean and an XML binding symbol is copied using JAXB XML serialization else else // if we have a simple JavaBean and a JSON binding symbol is copied using JSON serialization else // I'm not going to list all possible bindings but you get // the picture... Thoughts? Simon [1] http://json-lib.sourceforge.net/usage.html Raymond Feng wrote: Hi, What we have today is mostly in line with your proposal. Only a few twicks are needed. 1) If the data type is recognized by a known databinding, for example, SDO or JAXB, the databinding specific-copy is used. For SDO, it will be SDO CopyHelper.copy and for JAXB, it will be marshal/unmarshal. (This is the what we do in the code). 2) If the object implements java.io.Serializable, it is copied using Java serialization [2] (We already have it) 3) Assuming we have a simple JavaBean, and it is copied using JAXB XML serialization [3] (To be added) Thanks, Raymond - Original Message - From: Jean-Sebastien Delfino [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Tuesday, December 04, 2007 3:26 PM Subject: Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO Jean-Sebastien Delfino wrote: Some answers after researching the spec docs: Raymond Feng wrote: Hi, I think this issue needs to be brought up at the spec level. Basically, the following have to be clarified: 1) What interfaces are qualified to be remotable? 2) What are the characteristics of the input/output types for remotable interfaces? Assembly spec: 697 Whether a service of a component implementation is remotable is defined by the interface of the service. In the case of Java this is defined by adding the @Remotable annotation to the Java interface (see Client and Implementation Model Specification for Java). WSDL defined interfaces are always remotable. Java SCA Annotations and APIs spec: 297 Java interfaces generated from a WSDL portType are always remotable. I think that says that JAX-WS generated interfaces should be considered remotable even in the absence of an @Remotable interface. Java SCA Annotations and APIs spec: 1531 Complex data types exchanged via remotable service interfaces must be compatible with the marshalling technology used by the service binding. For example, if the service is going to be exposed using the standard web service binding, then the parameters must be Service Data Objects (SDOs) 2.0 [2] or JAXB [3] types. Independent of whether the remotable service is called from outside of the composite that contains it or from another component in the same composite, the data exchange semantics are by-value. This leaves the door open for other data representations supported by other service bindings, e.g. a DOM or a Java Serializable object. The Java SCA Annotations and APIs spec Errata adds this: The SCA Client and Implementation Model for Java applies the WSDL to Java and Java to WSDL mapping rules as defined by the JAX-WS specification [4] for generating remotable Java interfaces from WSDL portTypes and vice versa. For the purposes of the Java-to-WSDL mapping algorithm, the interface is treated as if it had a @WebService annotation on the class, even if it doesn't, and the org.osoa.OneWay annotation should be treated as a synonym for javax.jws.OneWay. For the WSDL-to-Java, the generated @WebService annotation should imply that the interface is
Re: Remotable interfaces and pass by value, was: Data transformation from/to POJO
Great! Giorgio, if I understand correctly, the above scheme will help you trigger the XStream databinding for objects that implement the XStreamable interface you've defined. Yes. I use it also for serializing Jobs, but I'm going to change this. I feel that too much xml is compute extensive. You also said that you were using Java serialization and tunneling the resulting bytes as base64. Could you expand a little on this and help me understand how you do it? Simple. Look in the same way I patched CallableReferenceImpl. I serialize and base64 and then i add a trasformer for it. Are you doing the serialization in your SCA component's implementation logic and then passing the bytes to a service interface like: JobManager { run(byte[] serializedJob); } No it has something like the following: and then letting the Axis2 binding send the byte[] as base64 (using the JAXB mapping)? No. a custom trasformer, that now it's useless :) I'm planning to use java.io.Serializable and sending a bunch of jobs at time. Jean Sebastian, this is what i'm doing. That's my workpool readme, work in progress..it might change: README. This readme explains how to use my workpool application. You can configure the workers by subclassing the WorkerServiceImpl class, and you should give to this class a COMPOSITE scope, i.e.: import org.apache.tuscany.sca.core.context.CallableReferenceImpl; import org.apache.tuscany.sca.databinding.job.Job; import org.apache.tuscany.sca.databinding.job.JobDataMap; import org.osoa.sca.annotations.Scope; /* This is the example class in order to use the workpool service */ @Scope(COMPOSITE) public class MyWorker extends WorkerServiceImplObject, Integer { @Override public ResultJob computeTask(JobObject,Integer job) { ResultJob result = new ResultJob(); JobDataMap map = new JobDataMap(); map.addJobData(result, job.compute(new Integer(5))); result.setJobDataMap(map); return result; } } This worker class receives a job stream and it give us a result a so called in a hashmap. This way of working is quite similar to how Quartz Scheduler handles the results. In order to customize your workpool application, you also should modify the Workpool.composite. For example for my nodeB: composite xmlns=http://www.osoa.org/xmlns/sca/1.0; targetNamespace=http://sample; xmlns:sample=http://sample; name=Workpool component name=WorkerManagerNodeBComponent implementation.java class=workpool.WorkerManagerImpl/ property name=nodeNamenodeB/property property name=compositeNameWorkpool.composite/property property name=workerClassworkpool.MyWorker/property service name=WorkerManagerInitService interface.java interface=org.apache.tuscany.sca.node.NodeManagerInitService/ binding.sca/ /service service name=WorkerManager binding.sca uri=http://localhost:13000/WorkerManagerNodeBComponent/ /service /component /composite In the slaves nodes. So each slave node in the workpool is managed by a WorkerManager, which is in charge to add/remove dynamically workers in order to adapt all the system to the load. At boot time each nodes has no worker component instance until the workpool master starts. The workpool master node is made up of two components: - WorkpoolManager - which has the task to control/adapt worker numbers - WorkpoolService - which simply submit jobs to a worker on demand. I say on demand because when a worker gets started from its node manager send it a NullJob, and then it refers to the WorkpoolService's queue to get other jobs. The peculiar structure of this system is that the WorkpoolManager holds on its internals a Rule Engine for its business decisions. It's simply a Java Drools instance, an open source engine widely used in SOA enviroments. In this way you can post to the WorkpoolManager (by WebServices) your own rule set in order to adapt the system to your particular computing task. Now in this system, the features that can be checked and controlled are incapsulated in a JavaBean, called WorkpoolBean. public class WorkpoolBean { private double loadAverage = 0; private int nodeNumbers = 0; private int workers = 0; private double averageServiceTime = 0; // skipped setter/getter methods } This Workbean is registered inside the rule engine, and when one of its properties change, a rule is fired. That's all for now. Cheers, Giorgio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Problems calling the real stock quote
Adding '@Remotable' annotation did take me further, but now I am see'ing the same exception I saw the first time, i.e org.apache.tuscany.sca.databinding.TransformationException: (for complete stack trace see all the way below that is stated in my first email). Running this thru the debugger, the following is the actual exception that is occuring which is not being thrown.. org.apache.axis2.AxisFault: The system cannot infer the transport information from the / URL. Axis2BindingInvoker.java public Message invoke(Message msg) { try { Object resp = invokeTarget(msg); msg.setBody(resp); } catch (AxisFault e) { if (e.getDetail() != null) { FaultException f = new FaultException(e.getMessage(), e.getDetail()); f.setLogical(e.getDetail().getQName()); msg.setFaultBody(f); } else { msg.setFaultBody(e); } } catch (Throwable e) { msg.setFaultBody(e); } return msg; } I am attaching the message object from the debug session.. Raymond Feng [EMAIL PROTECTED] wrote: Good catch. For local interfaces, we won't apply databinding transformers. Thanks, Raymond - Original Message - From: Venkata Krishnan To: Sent: Thursday, December 06, 2007 8:55 AM Subject: Re: [jira] Problems calling the real stock quote Hi, Also, can you check if your service interface class has the '@Remotable' annotation ? In a recent experience with our demos missing this ended me up in the exception that you state. Thanks - Venkat On Dec 6, 2007 10:11 PM, Raymond Feng wrote: Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi To: Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at
Re: [jira] Problems calling the real stock quote
The attachment cannot go through the ML. Can you attach it to a JIRA? The composite file and WSDL will be helpful too. Thanks, Raymond - Original Message - From: Mahi To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 9:45 AM Subject: Re: [jira] Problems calling the real stock quote Adding '@Remotable' annotation did take me further, but now I am see'ing the same exception I saw the first time, i.e org.apache.tuscany.sca.databinding.TransformationException: (for complete stack trace see all the way below that is stated in my first email). Running this thru the debugger, the following is the actual exception that is occuring which is not being thrown.. org.apache.axis2.AxisFault: The system cannot infer the transport information from the / URL. Axis2BindingInvoker.java public Message invoke(Message msg) { try { Object resp = invokeTarget(msg); msg.setBody(resp); } catch (AxisFault e) { if (e.getDetail() != null) { FaultException f = new FaultException(e.getMessage(), e.getDetail()); f.setLogical(e.getDetail().getQName()); msg.setFaultBody(f); } else { msg.setFaultBody(e); } } catch (Throwable e) { msg.setFaultBody(e); } return msg; } I am attaching the message object from the debug session.. Raymond Feng [EMAIL PROTECTED] wrote: Good catch. For local interfaces, we won't apply databinding transformers. Thanks, Raymond - Original Message - From: Venkata Krishnan To: Sent: Thursday, December 06, 2007 8:55 AM Subject: Re: [jira] Problems calling the real stock quote Hi, Also, can you check if your service interface class has the '@Remotable' annotation ? In a recent experience with our demos missing this ended me up in the exception that you state. Thanks - Venkat On Dec 6, 2007 10:11 PM, Raymond Feng wrote: Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi To: Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't handle mixed payloads betweem OMElements and other types.; nested exception is: java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types.
Re: Distributed SCA support for applications was: Distributed online store scenario, was: Updated online store tu
Hi Girogio Thanks for posting you thoughts. Some comments below... Regards Simon On Dec 6, 2007 4:22 PM, Giorgio Zoppi [EMAIL PROTECTED] wrote: I've still problems with JIRA 1907. So for now I have to refrain to create dynamic wiring for now, because ComponentUpdater doens't work as I intended. I misunderstand something that happens in wiring so i need more debugging on it but and now it's time for me to build performance test in our cluster. We want to see if your infrastructure is efficient. I'm going to use callable reference instead of calling back. My previous callback problem was due to the fact that in CallableReferenceImpl, there's not enough state to recreate a proper wire to callback. The Object callback is trasient, oif you set it and serialize and send away that reference, you'll loose it. What it miss is a way to recreate a callback properly in this case. I might investigate on how to solve this use case, but i lack of time. Any suggestions? Let me explain better: Suppose the following scenario: - Scenario A The actors are : ComonentA, ComponentB, ComponentC * ComponentA holds a CallableReference's ComponentC (it contains ComponentC scdl) , send it to ComponentB sets itself as callback to ComponentC, calls a Component C method and the callback from Component C will fail. I not sure if here you are saying that ComponentA calls ComponentC or ComponentB calls ComponentC And which component should the callback be delivered to? I think you are saying that if you set a callback object on a ServiceReference then the details are not serialized and don't flow across the wire if the reference is passed to some other component. Is that correct? There are performance problems in using the current domain implementation. If you see the code, every nodes when it looks for a service, whether it's local gives out the endpoint string, but if the service is remote (not in that node) for each request to the service. The node queries the domain node, and this it don't scale up. I've That not good. Possibly another way to look at this is if we change the protocol and make the domain responsible to telling nodes when things change. This process of asking the domain for information about registered services is causing other problems also. For example, now that we are trying to wire bindings other than the sca binding we have to be careful of the order in which composites are started as none of the other bindings know anything about the domain. The service infomation is injected into bindings the by the node on startup so this doesn't cover the case where a node is started but all of it's referenced services are not yet available in the domain. Switching to a notification based approach would make this much easier to manage. Does this make sense? The cache will likely be valuable for local reference so can you say a little more about how it fits in? created an endpoint's string cache with an expiring ttl to fix this problem.Just testing it now. That's because in my application i call the same method a lot of times. Looking into the future work, it will be nice: * having a membership support, that it scale up for a domain. A domain is a business enviroment, and it could be made of a lot of nodes. Yes - membership has been ignored until now mainly because others already do this kind of thing. But you are right that we should start thinking about it. We know currently when nodes are added to the domain as they register. But, as is always the case, the problematic thing is working out when they go away except in the unlikely event that they shut down cleanly. We could potentially do something with service references and have then report any invocation error they have to the domain and then have the domain only ping nodes that have had invocation errors reported. We could probably tie this into the management funtion we should be building as we may at some stage need to be able to offer information about the messages that are flowing through the system and any errors that are occuring so using this info to test for node problem s sounds attractive to me. I looked Apache Tribes, it needs some work, using an hearthbeat is a scalability issue if the nodes are more then 100. And when i was haven't tried tribe. How much control do you have over how frequently the heartbeat happens? looking P2P system research, I found a Scalable Membership protocol called SCAMP. You'll discover more in my homepage at cli : http://www.cli.di.unipi.it/~zoppi/scamp.pdfhttp://www.cli.di.unipi.it/%7Ezoppi/scamp.pdf * having the possibility to move composite from a node to another node in order to achieve load balancing and fail over. This requires that a composite have to be stopped in a safe way: when all components/services inside it are stopped, you can stop the composite and move around. This is a lot of work and there're a lot of research papers about it. Just find
Re: [jira] Problems calling the real stock quote
I was using the old syntax, i.e using of endpoint attribute for binding.ws, once I changed it to the SCA 1.0 spec syntax, it works fine. Thanks Raymond for pointing it out. Raymond Feng [EMAIL PROTECTED] wrote: The attachment cannot go through the ML. Can you attach it to a JIRA? The composite file and WSDL will be helpful too. Thanks, Raymond - Original Message - From: Mahi To: tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 9:45 AM Subject: Re: [jira] Problems calling the real stock quote Adding '@Remotable' annotation did take me further, but now I am see'ing the same exception I saw the first time, i.e org.apache.tuscany.sca.databinding.TransformationException: (for complete stack trace see all the way below that is stated in my first email). Running this thru the debugger, the following is the actual exception that is occuring which is not being thrown.. org.apache.axis2.AxisFault: The system cannot infer the transport information from the / URL. Axis2BindingInvoker.java public Message invoke(Message msg) { try { Object resp = invokeTarget(msg); msg.setBody(resp); } catch (AxisFault e) { if (e.getDetail() != null) { FaultException f = new FaultException(e.getMessage(), e.getDetail()); f.setLogical(e.getDetail().getQName()); msg.setFaultBody(f); } else { msg.setFaultBody(e); } } catch (Throwable e) { msg.setFaultBody(e); } return msg; } I am attaching the message object from the debug session.. Raymond Feng wrote: Good catch. For local interfaces, we won't apply databinding transformers. Thanks, Raymond - Original Message - From: Venkata Krishnan To: Sent: Thursday, December 06, 2007 8:55 AM Subject: Re: [jira] Problems calling the real stock quote Hi, Also, can you check if your service interface class has the '@Remotable' annotation ? In a recent experience with our demos missing this ended me up in the exception that you state. Thanks - Venkat On Dec 6, 2007 10:11 PM, Raymond Feng wrote: Hi, What data types are you using the invoke the Web Service? It seems that the required databinding is missing on the classpath. Thanks, Raymond - Original Message - From: Mahi To: Sent: Thursday, December 06, 2007 7:49 AM Subject: Re: [jira] Problems calling the real stock quote I started from scratch and I am not hitting with the following exception, any idea what might be going on? Text in the console: Dec 6, 2007 10:41:11 AM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart java.lang.IllegalArgumentException: Can't handle mixed payloads betweem OMElements and other types. at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.createOperationClient (Axis2BindingInvoker.java:128) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget (Axis2BindingInvoker.java:93) at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke( Axis2BindingInvoker.java:75) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy6.getQuote(Unknown Source) at stockquote.StockQuoteServiceImpl.getQuotes(StockQuoteServiceImpl.java :66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke (JavaImplementationInvoker.java:105) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke (PassByValueInterceptor.java:49) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:233) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke( JDKInvocationHandler.java:130) at $Proxy5.getQuotes(Unknown Source) at test.StockClient.main(StockClient.java:20) Exception in thread main java.rmi.RemoteException: java.lang.IllegalArgumentExceptionCan't
Re: Missing Saxon 9.0.0.2 dependency
Hi, I think now I understand what's going on. Even though we have the pom.xml configured to run an ant script to download the saxon 9.0.0.2 and install it to the local maven repo, the build fails before the ant plugin is triggered because we have explicit dependencies on saxon declared on the same module. I think we need to put the jars into a remote repo. The short-term workaround is to run the build-saxon.xml under databinding-saxon using ant -f build-saxon.xml. Thanks, Raymond - Original Message - From: Raymond Feng [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org; [EMAIL PROTECTED] Sent: Thursday, December 06, 2007 8:38 AM Subject: Re: Missing Saxon 9.0.0.2 dependency Hi, At this moment, I use an ant script to download the zip and install the jars to the local maven repo. It's integrated with the pom.xml so it should work with mvn in the source build. I realized that the binary build will fail after that. I'm starting to improve the implementation.xquery based on the new APIs provided in saxon 9.0.0.2. There was a discussion with saxon team before. They are OK to get the jars published into maven but they don't want to take the responsiblity. Can we publish the jars (which are not in a public maven repo yet) in our svn repo as a maven repo as Geronimo is doing? See https://svn.apache.org/repos/asf/geronimo/server/tags/2.0.2/repository/. Thanks, Raymond - Original Message - From: ant elder [EMAIL PROTECTED] To: tuscany-dev tuscany-dev@ws.apache.org Sent: Thursday, December 06, 2007 3:07 AM Subject: Missing Saxon 9.0.0.2 dependency We've now a dependency on Saxon 9.0.0.2 but thats not in any Maven repository we use so the build fails. Must we use Saxon 9.0.0.2 or does anyone know of a public repository we could get it from? ...ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]