thank you Brian, the message disappeared :)

but what's the difference? The WS response it's the same with or without
this code... when i invoke the "number" method with value "10" the WS
responds "0" :\ 

I'm using CXF-BC.

Regards,

Pedro Araújo


Brian Taylor wrote:
> 
> Would look like this:
> 
> @WebService(targetNamespace = "http://teste/CP/";) 
> public class TesteServiceImpl implements TesteService { 
>         
>         private ComponentContext ctx;
> 
>         @WebMethod 
>         public int number(int number) { 
>                 System.out.println( " ********* TesteServiceImpl ->
> number: "+number + "**"); 
>                 return number; 
>         } 
>        
>         public void setContext(ComponentContext ctx) {
>             this.ctx = ctx;   
>         }
> 
> } 
> 
> You may want to place your annotations in the TesteService interface (and
> do not place setContext() in it) so that you don't have to explicitly mark
> setContext() in TesteServiceImpl as a non-operation considering it's
> public.
> 
> 
> Pedro Araújo wrote:
>> 
>> Hi all,
>> 
>> I'm using CXF-SE to expose a Web Service in SM 3.3.
>> When i'm deploying it i get this message:
>> 
>> 
>> DEBUG - CxfSeComponent - Unable to inject ComponentContext:
>> pedro.pt.cxfSE.TesteServiceImpl.setContext(javax.jbi.component.ComponentContext)
>> 
>> it's a normal message or i'm doing something wrong?
>> 
>> my xbean:
>> 
>> <cxfse:endpoint>
>>    <cxfse:pojo>
>>       <bean class="pedro.pt.cxfSE.TesteServiceImpl"/>
>>    </cxfse:pojo>
>> </cxfse:endpoint>
>> 
>> 
>> my TesteServiceImpl Class: 
>> 
>> @WebService(targetNamespace = "http://teste/CP/";)
>> public class TesteServiceImpl implements TesteService {
>>      
>>      @WebMethod
>>      public int number(int number) {
>>              System.out.println( " ********* TesteServiceImpl -> number: 
>> "+number +
>> "**");
>>              return number;
>>      }
>> }
>> 
>> Thank you,
>> 
>> Pedro Araújo
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unable-to-inject-ComponentContext-tp25366499p25380965.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to