Does Tuscany support jaxws implementation?
Hi all I create a web service using stp jaxws project, and now, I want assembly these services as using sca components, I wondered if Tuscany supports jaxws service as its implementation. I am trying to create a sca component in composite file by following MikeEdwards's article in OSOA which url is http://www.osoa.org/display/Main/JAX-WS+Services+Integration. Does Tuscany know the tag "implementation.jaxws" Thanks Denny
Re: An update collision occurred when update the primary key property !
UpdateGenerator forms update statement with "where" clause like this - iterate over all PKs and include them in "where" clause. Then iterate over all changed fields and include them in "where" clause with values set to old values from change summary. In case the PK itself is being changed, this results in something like below - update tableX set idX=? where idX=? and idX=oldValueOfidX Later in ChangeOperation.execute(), when the changed fields in DObj are scanned referring to propertyNames,for idX, the new value is found and set for both idX params above with "?", this is because the first "where" clause idX is not marked as Collision param. This results in - update tableX set idX=newValueOfIdx where idX=newValueOfIdx and idX=oldValueOfidX This results in 0 rows update in DB and seen by DAS as OCC Exception. A simple fix will be - when changedFields includes a PK, avoid first inclusion in where clause in UpdateGenerator. For other cases (i.e. changedFields do not include PK), keep the logic as is. There can be cases where the PK needs to be modified in the tables - like data migration, system upgrades etc. So the above simple fix will be useful in supporting update of PK. Old discussion ref - http://www.mail-archive.com/[EMAIL PROTECTED]/msg16310.html Minor change on the top of the above discussion is making update efficient by avoiding duplicate inclusion of same column in "where" clause. New test case - AliasTests.testModifyPK() Submitting patch soon for this. Regards, Amita On Dec 31, 2007 8:48 AM, <[EMAIL PROTECTED]> wrote: > Hi All , > >I write a sample to test the DAS work with the DB , when execute a > update operation on primary key , > > an update collision occurred , how to deal with it if I need update the > primary key value ? > > > Best Regards > > Leo > >
Re: Does Tuscany support jaxws implementation?
Hi Denny, We don't have this support in Tuscany currently. I think it would be good to add it. I have been doing some work recently to provide better support for JAX-WS semantics in the Tuscany implementations of implementation.java and binding.ws, but this is not the same as what's described in the article. However, this code should be reusable as part of the work to support implementation.jaxws components. For example, the fix for TUSCANY-1939 adds data binding support for the default JAX-WS mapping of thrown POJO exceptions. Are you interested in helping with adding support for implementation.jaxws components in Tuscany? Simon Denny Xu wrote: Hi all I create a web service using stp jaxws project, and now, I want assembly these services as using sca components, I wondered if Tuscany supports jaxws service as its implementation. I am trying to create a sca component in composite file by following MikeEdwards's article in OSOA which url is http://www.osoa.org/display/Main/JAX-WS+Services+Integration. Does Tuscany know the tag "implementation.jaxws" Thanks Denny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sample crud implementation
Luciano Resende wrote: The one in the host-embedded is used for unit testing, and to make sure extensions are working ok. The one in samples, is basically a copy, and it's used as an example of how to build a new implementation type. As you said in the first e-mail, the two are basically the same, and I'd recommend you to stick with one of them (the sample version that is more well documented) Yes. Stick to the sample and ignore the test case, I'm going to change the test case to avoid confusion in the future. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sample crud implementation
Jean-Sebastien Delfino wrote: Luciano Resende wrote: The one in the host-embedded is used for unit testing, and to make sure extensions are working ok. The one in samples, is basically a copy, and it's used as an example of how to build a new implementation type. As you said in the first e-mail, the two are basically the same, and I'd recommend you to stick with one of them (the sample version that is more well documented) Yes. Stick to the sample and ignore the test case, I'm going to change the test case to avoid confusion in the future. Done. I have refactored the test case and also cleaned up the CRUD sample and added more relevant comments to it. Hope this helps. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web service problem (and configuration)
I don't think you can pass or return an interface type across the Web Service binding, only a class type. This is a rather nasty limitation. I believe there is some deep JAXB magic ("factory" annotations) that could work around this limitation, but I haven't got far enough into this to know how to use it or whether it currently works in Tuscany. Simon Mariano Kohan wrote: hello, this is an example that shows the problem. listSalePointCodesOA and listSalePointCodesIA return an array and works well, but listSalePointCodes return a List and have the commented problems.They are defined in.Services and implemented in ServicesImplementation. Runner is the class that start the application. The web services are published in http://localhost:8887/Services?wsdl. thanks, Mariano Source classes: package application.services.interfaces; import java.rmi.Remote; import java.rmi.RemoteException; import java.util.List; import org.osoa.sca.annotations.Remotable; /** * @author Mariano Kohan * @version 1.0 * */ @Remotable public interface Services extends Remote { //prueba de retorno de un listado con tipos basicos public List listSalePointCodes() throws RemoteException, Exception; //se prueba retornando un arreglo de objetos public Object[] listSalePointCodesOA() throws RemoteException, Exception; //se prueba retornando un arreglo de objetos basicos public Integer[] listSalePointCodesIA() throws RemoteException, Exception; } import application.services.interfaces.Services; //@Service(Services.class) public class ServicesImplementation implements Services { public ServicesImplementation() throws RemoteException { } public List listSalePointCodes() throws RemoteException, Exception { //shows only the first and last elements //List codes = new LinkedList(); //shows no elements List codes = new ArrayList(); codes.add(new Integer(1)); codes.add(new Integer(2)); codes.add(new Integer(14)); codes.add(new Integer(61)); codes.add(new Integer(1)); codes.add(new Integer(8)); codes.add(new Integer(33)); return codes; } public Object[] listSalePointCodesOA() throws RemoteException, Exception { List codes = this.listSalePointCodes(); return codes.toArray(); } public Integer[] listSalePointCodesIA() throws RemoteException, Exception { List codes = this.listSalePointCodes(); Integer[] codesArray = new Integer[codes.size()]; int i = 0; for (Iterator iterator = codes.iterator(); iterator.hasNext();) { Integer code = (Integer) iterator.next(); codesArray[i++] = code; } return codesArray; } } package application.server; import org.apache.tuscany.sca.host.embedded.SCADomain; public class Runner { public Runner(){ } /** * inicializacion del dominio SCA */ public void initialize(String xmlFileNameString) throws Exception { System.out.println("Starting of the SCA Application exposed as RMI and Web Services ..."); SCADomain scaDomain = SCADomain.newInstance(xmlFileNameString); System.out.println("... Press Enter to Exit..."); System.in.read(); scaDomain.close(); System.out.println("Exited..."); System.exit(0); } public static void main(String[] args) throws Exception { Runner applicationServicesRunner = new Runner(); applicationServicesRunner.initialize(args[0]); } } Configuration Files: -composite http://www.osoa.org/xmlns/sca/1.0"; xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"; targetNamespace="http://application"; name="application"> http://localhost:8887/Services"/> -spring beans http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:sca="http://www.springframework.org/schema/sca"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/sca http://www.springframework.org/schema/sca/spring-sca.xsd";> 2007/12/20, Simon Laws <[EMAIL PROTECTED]>: On Dec 20, 2007 5:44 PM, Mariano Kohan <[EMAIL PROTECTED]> wrote: hello, I have a problem when I expose a service with ws binding. When I want to return a collection of elements, if I use a List type the web service invocation return only 2 elements of the list (when I use LinkedList) or an empty collection (when I use Array). I suppose the problem is in the implementation of the web service with axis2. It's that right? How can I change the configuration of axis to return all the elements of the List? thanks, Mariano Hi Mariano Can you provide a example of this problem. If you can
Re: sample crud implementation
Jean-Sebastien Delfino wrote: Jean-Sebastien Delfino wrote: Luciano Resende wrote: The one in the host-embedded is used for unit testing, and to make sure extensions are working ok. The one in samples, is basically a copy, and it's used as an example of how to build a new implementation type. As you said in the first e-mail, the two are basically the same, and I'd recommend you to stick with one of them (the sample version that is more well documented) Yes. Stick to the sample and ignore the test case, I'm going to change the test case to avoid confusion in the future. Done. I have refactored the test case and also cleaned up the CRUD sample and added more relevant comments to it. Hope this helps. I added more comments to the implementation-pojo-extension module too. You may want to take a look at it, it's another example that shows how to write a (simplistic) implementation extension for Java implementation classes with a default constructor, public methods and optional init and destroy methods. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tuscany support jaxws implementation?
Hi Simon I would like to add support for implementation.jaxws components in Tuscany, but for now , I have been working on Eclipse STP project and have to spent more time on the project for next release. I'm very interested in Tuncany and very pleasure to contribute to it when I have more time. So far, in my project, I am trying to assemble jaxws services into SCA components and run with tuncany, do you have any suggestions on how to create sca components with jaxws implementation? where can I get a sample about it? Thanks Denny On Jan 2, 2008 7:42 PM, Simon Nash <[EMAIL PROTECTED]> wrote: > Hi Denny, > We don't have this support in Tuscany currently. I think it would > be good to add it. > > I have been doing some work recently to provide better support for > JAX-WS semantics in the Tuscany implementations of implementation.java > and binding.ws, but this is not the same as what's described in the > article. However, this code should be reusable as part of the work > to support implementation.jaxws components. For example, the fix for > TUSCANY-1939 adds data binding support for the default JAX-WS mapping > of thrown POJO exceptions. > > Are you interested in helping with adding support for implementation.jaxws > components in Tuscany? > > Simon > > Denny Xu wrote: > > Hi all > > > > I create a web service using stp jaxws project, and now, I want > assembly > > these services as using sca components, I wondered if Tuscany supports > jaxws > > service as its implementation. I am trying to create a sca component in > > composite file by following MikeEdwards's article in OSOA which url is > > http://www.osoa.org/display/Main/JAX-WS+Services+Integration. > > > > > > > > > > > > Does Tuscany know the tag "implementation.jaxws" > > > > Thanks > > Denny > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >