Hi,
The service name should be "Service" which is the short name of your service
interface.
By the way, @Service should not be used against an interface.
Thanks,
Raymond
----- Original Message -----
From: "Radim Kolarik" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, September 12, 2007 9:48 AM
Subject: Re: accessing a deployed service
Hi Raymond,
here is how I define the service:
.composite file:
<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://company/examples/example-sc"
xmlns:ex="http://company/examples/example-sc"
name="example-sc">
<component name="NodeServiceComponent">
<service name="MyService">
<interface.java interface="com.company.example.Service"/>
<binding.ws/>
</service>
<implementation.java class="com.company.example.ServiceImpl" />
</component>
</composite>
The Service.java file has:
@Remotable
@Service
The ServiceImpl.java file has:
@Service(Service.class)
But I am getting the exception as I described. Could you please
advice, what is wrong?
Thanks a lot,
Radim
On 9/12/07, Raymond Feng <[EMAIL PROTECTED]> wrote:
Yes :-).
It seems that you declare a <service> under the <component> element but
the
service is not defined in the componentType (which can be introspected
from
a java class). It's similar as you try to use a field/method not defined
in
the java class.
<component name="NodeServiceComponent">
<service name="MyService" ...>
</service>
</component>
If the NodeServiceComponent is implemented in java, you should have
something like the following in your impl class.
@Service(MyService.class)
public class NodeServiceComponentImpl implements MyService {
}
Please note without the @Service and if MyService interface is not
annotated
with @Remotable, it won't be taken as a service. In such case, the impl
class will be the service interface and the name of the service will be
NodeServiceComponentImpl.
Thanks,
Raymond
----- Original Message -----
From: "Radim Kolarik" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, September 12, 2007 3:56 AM
Subject: accessing a deployed service
> Hi,
>
> I am having problems running my web service on Websphere, although the
> application seems to be fine in Tomcat. When application inicializes,
> I get the following in the log:
>
> [12/09/07 11:47:50:182 BST] 0000003d CompositeBuil W [WARNING]
> Service not found for component service:
> NodeServiceComponent/MyService null
> [12/09/07 11:47:51:432 BST] 0000003d WebAppServlet I
> addServletMapping: /NodeServiceComponent/MyService
>
> Is there anything I am doing wrong?
>
> Thanks,
> Radim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]