tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Laws <simonsl...@googlemail.com>
Subject Re: I need to have the json-p binding on Tuscany 1.4
Date Tue, 06 Apr 2010 17:41:21 GMT
On Tue, Apr 6, 2010 at 4:58 PM, <fabianoa@br.ibm.com> wrote:

>
> Hi Simon,
>
> Thanks for the quick answer.
>
> The 1st thing I´ll do is to check the META-INF\services for json-rpc on 1.4
> and for json-p on 2.0 and see If I move forward on this.
> Would you have a link or more a resource with more detailed information
> about this 'registration' mechanism of extensions?
>
>
> The 2nd is worse for me because I have no idea on how to migrate the code
> build on version 2.0 to version 1.4, would you have also  some
> link/resources on that?
>
>
>
> Thanks for your help,*
> ____________________________________________*
>
>   *Fabiano Amorim Oliveira**
> IT Specialist - J2EE Developer
> IBM Global Business Services*
> Sun Certified Java Programmer 6
> WebSphere Application Server 7.0 Admin. Certified
>
>   E-mail: *fabianoa@br.ibm.com* <fabianoa@br.ibm.com>
>   Phone: +55 41 2141-4864
>   Tie-line: 732-4864
>   Mobile: +55 41 8861-9212
> Please consider the environment before printing this email P
>
>
>  *Simon Laws <simonslaws@googlemail.com>*
>
> 04/06/2010 12:29 PM
>  Please respond to
> dev@tuscany.apache.org
>
>   To
> dev@tuscany.apache.org
> cc
>   Subject
> Re: I need to have the json-p binding on Tuscany 1.4
>
>
>
>
> Hi
>
>
>         I have a whole system application developed in Tuscany 1.4 and I´m
> adding new services to the composite file, unfortunately I discovered that
> json-p binding is not available on version 1.4, I have talked with one of
> the tuscany development team members and he instructed me to port the json-p
> functionality from version 2.0 to version 1.4, but I have no idea on how to
> do that...
>
> There were SPI changes between 1.x and 2.x so there would be code changes
> required to make the 2.x extension work in 1.x. I don't know without trying
> it whether there are other difficult problems to overcome. The sort of thing
> that comes to mind is conflicting dependencies where we have multiple
> extensions depending on different 3rd party libraries. The easiest thing to
> do would be to move the 2.x code to 1.x and fix all the problems due to SPI
> changes and then see what happens.
>
>
>         I started by adding the piece of xml code in my original (1.4)
> composite file:
>
>         <component name="HelloWorldComponent">
>         <implementation.java class="*helloworld*.HelloWorldImpl"/>
>         <service name="HelloWorldService" >
>             <tuscany:binding.*jsonp* />
>         </service>
>     </component>
>
>     <component name="HelloWorldClient">
>         <implementation.java class="*helloworld*.HelloWorldClient"/>
>         <reference name="*ref*" >
>             <tuscany:binding.*jsonp* *uri*="*
> http://localhost:8081/HelloWorldComponent/HelloWorldService*<http://localhost:8081/HelloWorldComponent/HelloWorldService>
> "/>
>             <!-- tuscany:binding.*jsonp* *uri*="*
> http://localhost:8081/HelloWorldComponent/HelloWorldService*<http://localhost:8081/HelloWorldComponent/HelloWorldService>"
> -->
>         </reference>
>     </component>
>
> These components (HelloWorldComponent , HelloWorldClient) I got from the
> Tuscany SVN´s project´s : binding-jsonp and binding-jsonp-runtime. And I´m
> trying to make it work in my environment.
>
> I´m running it on TomCat, and the console shows:
>
> pr 6, 2010 11:32:01 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> WARNING: Element {*http://tuscany.apache.org/xmlns/sca/1.0*<http://tuscany.apache.org/xmlns/sca/1.0>
> *}binding.jsonp cannot be processed*. ([row,col {unknown-source}]:
> [28,13])
> Apr 6, 2010 11:32:01 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> WARNING: Element {*http://tuscany.apache.org/xmlns/sca/1.0*<http://tuscany.apache.org/xmlns/sca/1.0>
> *}binding.jsonp cannot be processed.* ([row,col {unknown-source}]:
> [28,13])
> Apr 6, 2010 11:32:01 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> WARNING: Element {*http://tuscany.apache.org/xmlns/sca/1.0*<http://tuscany.apache.org/xmlns/sca/1.0>
> *}binding.jsonp cannot be processed.* ([row,col {unknown-source}]:
> [35,13])
> Apr 6, 2010 11:32:01 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> WARNING: Element {*http://tuscany.apache.org/xmlns/sca/1.0*<http://tuscany.apache.org/xmlns/sca/1.0>
> *}binding.jsonp cannot be processed. *([row,col {unknown-source}]:
> [35,13])
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: Service not found for component service: Component =
> HelloWorldComponent Service = HelloWorldService
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> SEVERE: Reference not found for component reference: Component =
> HelloWorldClient Reference = ref
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: No type specified on component property: Component =
> HelloWorldClient Property = ref
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: Service not found for component service: Component =
> HelloWorldComponent Service = HelloWorldService
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> SEVERE: Reference not found for component reference: Component =
> HelloWorldClient Reference = ref
> Apr 6, 2010 11:32:04 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: No type specified on component property: Component =
> HelloWorldClient Property = ref
>
> I guess I need to make the 'json-p' binding be recognized by the Tuscany
> 1.4 mechanism, but I don´t know how to do it.
> I would appreciate if you can give a roadmap to implement it.
>
>
> The "cannot be processed" warnings you see are because the Tuscany runtime
> doesn't know about the jsonp processors that read these binding specific
> elements from the composite file. If, for example, you take a look at
> modules\binding-jsonrpc\src\main\resources\META-INF\services\org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
> you can see how the jsonrpc binding processor extension is registered with
> the StAXArtifaceProcessor extension point. There are other extensions you'll
> need to register for the binding. Start by looking is what is registered via
> META-INF/services for binding-jsonp in 2.x.
>
> Simon
>
> --
> Apache Tuscany committer: *tuscany.apache.org*<http://tuscany.apache.org/>
> Co-author of a book about Tuscany and SCA: *tuscanyinaction.com*<http://tuscanyinaction.com/>
>


Hi

We have a guide for going from 1.x to 2.x [1] but not the other way. This
may be of some help. We can try and guide you here when you get stuck.

Regards

Simon

[1]
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Converting+Tuscany+1.x+Extensions


-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Mime
View raw message