There error you're seeing looks like its because the 1.x runtime doesn't
work with the 2.x style composites and webapp structure, just changing the
annotation package isnt enough. There is a version of the helloworld-servlet
sample for the OSOA based 1.x code at:

https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/samples/helloworld-servlet/

For some reason thats not been included in the recent Tuscany releases but
i've just tried it with the Tuscany 1.5.1 release and it works ok for me
deployed to Tomcat. There have been dependency changes so the pom.xml needs
to be updated, the diff of the changes needed is below. Feel free to ping me
on Gtalk or Sametime if youre still having trouble getting it to work.

   ...ant

Index: pom.xml
===================================================================
--- pom.xml     (revision 830640)
+++ pom.xml     (working copy)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.tuscany.sca</groupId>
         <artifactId>tuscany-sca</artifactId>
-        <version>1.6-SNAPSHOT</version>
+        <version>1.5.1</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <artifactId>sample-helloworld-servlet</artifactId>
@@ -34,16 +34,28 @@
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-sca-api</artifactId>
-            <version>1.6-SNAPSHOT</version>
+            <version>1.5.1</version>
             <scope>compile</scope>
         </dependency>

         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-implementation-web-runtime</artifactId>
-            <version>1.6-SNAPSHOT</version>
+            <version>1.5.1</version>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>1.5.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-webapp</artifactId>
+            <version>1.5.1</version>
+            <scope>runtime</scope>
+        </dependency>

         <dependency>
             <groupId>javax.servlet</groupId>


On Wed, Oct 28, 2009 at 2:59 PM, Willis C White <whiw...@us.ibm.com> wrote:

>
>  totally lost
>
> I am trying to use the implementation.web instead of the binding.http. I am
> looking at (http://tuscany.apache.org/sca-java-implementationweb.html) for
> help. Doesn't seem that current but not sure if there is something better.
> The link for the example under "*Using implementation.web with Servlets,
> Filters, and Event listeners*" doesn't work so I played with the URL and
> got to the page (
> https://svn.apache.org/repos/asf/tuscany/java/sca/samples/webapps/helloworld-servlet/).
> Again doesn't seem all that current but I am not sure if there is something
> more up-to-date. So now I am trying to get this example to work. After
> changeing
> import org.oasisopen.sca.ComponentContext;
> import org.oasisopen.sca.annotation.Reference;
> to
> *import* org.osoa.sca.ComponentContext;
> *import* org.osoa.sca.annotations.Reference;
>
> I get the following errors when starting the server
>
> Oct 28, 2009 10:38:42 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> WARNING: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [97,6])
> Oct 28, 2009 10:38:42 AM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> WARNING: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [97,6])
> Oct 28, 2009 10:38:43 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: No implementation for component: Component = WebClient
> Oct 28, 2009 10:38:43 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> SEVERE: Reference not found for component reference: Component = WebClient
> Reference = service
> Oct 28, 2009 10:38:43 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: No implementation for component: Component = WebClient
> Oct 28, 2009 10:38:43 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> SEVERE: Reference not found for component reference: Component = WebClient
> Reference = service
> Oct 28, 2009 10:38:43 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
> WARNING: Component reference target not found, it might be a remote service
> running elsewhere in the SCA Domain: Composite = {http://eed}eed-sca-services
> Service = HelloworldService
> Oct 28, 2009 10:38:43 AM org.apache.catalina.core.StandardContext start
>
> All the code is the same as the sample accept the class in the
> HelloworldCompnent
>     <component name="WebClient">
>                    <implementation.web web-*uri*=""/>
>                    <reference name="service" target="HelloworldService"/>
>         </component>
>      <component name="HelloworldComponent">
>                   <implementation.java class="*com.ibm.eed
> .service.test.HelloworldServiceImpl*" />
>           </component>
>
>
> Questions:
> 1.What am I doing wrong?
> 2. Is there a working example I could look at?
> 3. Is there an up-to-date explanation page?
> *
> Willis C White III*
> IQ Technology Projects
> IBM CIO Technology & Innovation
> Home office 845 331-5134
> Cell 845 853-3827
>
>
>
>
>  *ant elder <ant.el...@gmail.com>*
>
> 10/27/2009 11:52 AM
>  Please respond to
> user@tuscany.apache.org
>
>   To
> user@tuscany.apache.org
> cc
>   Subject
> Re: error using http binding
>
>
>
>
> If the application is a JEE web application (.war) then I'd use
> implementation.web not binding.http as thats more inline with the current
> SCA specifications. Doing that the Servlet would then be managed by the JEE
> container not Tuscany which could make something like this easier to get
> going.
>
>    ...ant
>
> On Tue, Oct 27, 2009 at 3:23 PM, Willis C White 
> <*whiw...@us.ibm.com*<whiw...@us.ibm.com>>
> wrote:
>
> First of all let me admit to my own ignorance.
> second let me start for the beginning. I am trying to use
> dojox.form.FileUploader to upload a file (my friend Ab sent out an email
> about this yesterday). This widget has a property called "uploadUrl" - I am
> assuming (maybe wrongly) that the widget does a post to this URL. My team is
> using Tuscany to communicate between the client (web page) and the server. I
> am working on a form that need to upload files. My plan is to get a servlet
> setup through Tuscany and then have the dojo widget post to that servlet.
>
>
>   *ant elder <**ant.el...@gmail.com* <ant.el...@gmail.com>*>*
>
> 10/27/2009 11:08 AM
>
>
>   Please respond to*
> **u...@tuscany.apache.org* <user@tuscany.apache.org>
>
>   To
> *u...@tuscany.apache.org* <user@tuscany.apache.org>
> cc
>   Subject
> Re: error using http binding
>
>
>
>
>
>
> Out of interest may I ask why you're trying to use a servlet with the http
> binding like this and not just using a proper webapp that runs the servlet
> in the more usual way?
>
>    ...ant
>
> On Tue, Oct 27, 2009 at 2:52 PM, Willis C White 
> <*whiw...@us.ibm.com*<whiw...@us.ibm.com>>
> wrote:
>
> I am trying to create a plain servlet
>
> I have this in the web.composite
>     <component name="HTTPBindingComponent">
>      <implementation.java class="*com*.*ibm*.*eed*
> .service.test.BindingHttpImpl"/>
>             <service name="BindingHttpImpl">
>                     <tuscany:binding.*http* *uri*="testBinding"/>
>             </service>
>     </component>
>
>
> this is the implementation file: *
>
> package* com.ibm.eed.service.test; *
> import* java.io.IOException; *
> import* javax.servlet.*; *
> import* org.osoa.sca.annotations.Service;
>
> @Service(Servlet.*class*) *
> public* *class* BindingHttpImpl *implements* Servlet {
>
>         @Override
>         *public* *void* destroy() {
>                 // *TODO* Auto-generated method stub
>
>         }
> ......
>
> }
>
>
> this is the error I get when I start the server
> Oct 27, 2009 10:42:01 AM
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: Service not found for component service: Component =
> HTTPBindingComponent Service = BindingHttpImpl
> Oct 27, 2009 10:42:01 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: Service not found for component service: Component =
> HTTPBindingComponent Service = BindingHttpImpl
>
> ....
>
> WARNING: Skipping component service not defined in the component type:
> HTTPBindingComponent#BindingHttpImpl
>
>
>
> not sure what am I missing or what I can do to fix this.
>
>

<<image/gif>>

Reply via email to