0
votes

Flow is not going to the implementation class at all. How should get the flow to Implementation class?
I wonder if it doesn't matter that Impl class implements the service class.

But it raises another question what if more than one impl classes are implementing the serviceClass interface. Where the flow will go?

Do I need to declare some annotations on Impl class? Or there is no way to recognize Impl class, I just have to treat it as another bean and add it to my webservice route.

Here is the setup.

applicationContext.xml

<cxf:cxfEndpoint id="tryWebService" address="http://localhost:15080/PORTAL/webservices/tryWebService"
            serviceClass="webservice.TryWebServiceImpl"
            />
        <route>
            <from uri="cxf:bean:tryWebService"/>
            <to uri="stream:out"/>
        </route>

Interface

@WebService
public interface TryWebService {
    public void acceptRequest(String xmlString);
}

Implementation

public class ACORDWebServiceImpl implements ACORDWebService
{
    public void acceptTXLife(String xmlString)
    {
        try
        {
            dosomething
1

1 Answers

1
votes

Service class in cxf is only an interface. You d'ont need implementation. Parameters of the method called ( ie: "acceptRequest") are set in the body of your route. So you can get them in the route with a processor for example between your from and to instructions.