On Thu, Aug 4, 2011 at 9:30 AM, Luciano Resende <luckbr1...@gmail.com> wrote: > On Thu, Aug 4, 2011 at 1:23 AM, Simon Laws <simonsl...@googlemail.com> wrote: >> On Wed, Jul 27, 2011 at 5:13 PM, Subash Chaturanga <subash...@gmail.com> >> wrote: >>> Hi devs, >>> I am a tuscany user in Apache PhotArk and I have an unexpected issue with my >>> two services and I tried to resolve this many times, but couldn't figure out >>> a way. >>> I have implemented two working tuscany SCA components >>> named, FacebookFriendFinder and FaceRecognitionService. >>> >>> I use the service FaceRecognitionService inside the >>> service FacebookFriendFinder. >>> Following is a kind of a pseudo code code to explain my situation. >>> In FacebookFriendFinder Impl class >>> >>> Photo processFBFriends() { >>> ... >>> ... >>> Photo p = FaceRecognitionService.recognize("file"); // call the recognize >>> method in the service, FaceRecognitionService. >>> --- program does not return to this line, it terminates >>> } >>> >>> In FaceRecognitionService impl class >>> public Photo recognize(String s) { >>> ... >>> ... >>> Photo p = someAPI.recognize(); >>> // system.out(p) -- When I do a system.print to the Photo p before the >>> return statement, it prints the expected "p". >>> return p; >>> } >>> I am confused with this. Though "p" prints and is available just before the >>> return statement in the class FaceRecognitionService it doesn't pass to its >>> parent method any how. When I changed the return types to String from Photo, >>> it works fine and return the string. >>> So is there a problem in interacting among two tuscany SCA service >>> components when dealing with custom objects like (org.face4j.Photo) other >>> than java native ones ? >>> It will be great if I can get some idea to resolve this issue. >>> >>> Thanks >>> -- >>> Subash Chaturanga >>> Department of Computer Science & Engineering >>> University of Moratuwa >>> Sri Lanka >>> Blog - http://subashsdm.blogspot.com/ >>> Twitter - http://twitter.com/subash89 >>> >>> >> >> Hi Subash >> >> Is FacebookFriendFinder communicating with FaceRecognitionService via >> an SCA reference? From you psuedo code it looks like a static call? If >> there is an SCA wire between the two the precise behaviour will depend >> on the service interfaces the binding involved and any >> intents/annotations that may have been added so we'd need to see more >> detail of the composite you have. >> >> Regards >> >> Simon >> >> > > Subash ended up solving the problem which was related to the DTO used > by Face4j not being serialazible. I suggested him to utilize it's own > model class and that solved the problem. > > Thanks > > > -- > Luciano Resende > http://people.apache.org/~lresende > http://twitter.com/lresende1975 > http://lresende.blogspot.com/ >
Ah excellent. Thanks Luciano. Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com