tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fabia...@br.ibm.com
Subject Re: I need to have the json-p binding on Tuscany 1.4
Date Wed, 07 Apr 2010 15:02:15 GMT
What´s the puporse/difference between projects named:  projectname.jar and 
projectname-runtime.jar?

Per example , binding-jsonp and binding-jsonp-runtime?

I´m trying to port the jsonp binding from 2.0 to version 1.4. Do I have to 
work on both projects: binding-jsonp and binding-jsonp-runtime?



Thanks & Regards,
____________________________________________ 


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
  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"/> 
            <!-- tuscany:binding.jsonp uri="
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}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}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}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}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
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Mime
View raw message