You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2009/10/27 15:59:27 UTC

Re: error using http binding

On Tue, Oct 27, 2009 at 7:52 AM, Willis C White <wh...@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.


Your service name on the composite should match your interface name, in this
case you should have :
<service name="Servlet">

I have a similar example:
https://svn.apache.org/repos/asf/tuscany/sandbox/sca-cloud-tutorial/expertise-rest-appengine-webapp/


-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: error using http binding

Posted by Willis C White <wh...@us.ibm.com>.
The server starts without an error now I get a 
java.lang.IllegalArgumentException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: javax.servlet.ServletRequest is not known 
to this context]

as you can tell I have no idea what i am doing


I was trying to follow the code from here : 
http://tuscany.apache.org/sca-java-bindinghttp.html

I guess the two sections with code snippets don't got together.




Willis C White III 
IQ Technology Projects
IBM CIO Technology & Innovation
Home office 845 331-5134
Cell 845 853-3827
 

 



Luciano Resende <lu...@gmail.com> 
10/27/2009 10:59 AM
Please respond to
user@tuscany.apache.org


To
user@tuscany.apache.org
cc

Subject
Re: error using http binding








On Tue, Oct 27, 2009 at 7:52 AM, Willis C White <wh...@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.

Your service name on the composite should match your interface name, in 
this case you should have :
<service name="Servlet">

I have a similar example:
https://svn.apache.org/repos/asf/tuscany/sandbox/sca-cloud-tutorial/expertise-rest-appengine-webapp/



-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/