Hi
On 20/02/13 12:54, Gabo Manuel wrote:
Hi All,
Am encountering the error above on one server _but not the other._ The
method to be displayed is just an implementation of an interface, so as
a result it is a public method. The most that I could find from the
threads related to this error is that the methods are not visible.
The only notable difference is as follows
Working server:
Tomcat: 7.0.11
Java: jre1.6.0_24
Failing server:
Tomcat: 7.0.16
Java: 1.7.0_01
If it is the only difference than I'm not sure why.
Can you start from a working server and start changing things one by
one, example, move to Tomcat 7.0.16 first, if works - to newer Java and
double check it is indeed either Tomcat or newer Java affecting the
migration ?
Cheers, Sergey
The interface is defined as follows:
@WebService(name="SmsTopUpService",
targetNamespace="http://my.domain.com")
@SOAPBinding(use=Use.LITERAL, style=Style.RPC)
@Path("/topup/sms")
public interface SmsTopUpService {
@GET
@Path("/")
@WebMethod
public void doSmsTopUp(
@WebParam(name="number")
@QueryParam("number")
String number
,
@WebParam(name="message")
@QueryParam("message")
String msg
) throws ServiceException;
@POST
@Path("/")
public void doSmsTopUpPost(
@WebParam(name="number")
@QueryParam("number")
String number
,
@WebParam(name="message")
@QueryParam("message")
String msg
) throws ServiceException;
The implementation signature as follows:
@WebService(
endpointInterface="com.domain.my.SmsTopUpService"
, serviceName="SmsTopUpService"
, portName="SmsTopUpServicePort"
, targetNamespace="http://my.domain.com")
public class SmsTopUpServiceImpl implements SmsTopUpService{
@WebMethod
public void doSmsTopUp(String number, String msg) throws ServiceException{
callInternalMethod()
}
@WebMethod
public void doSmsTopUpPost(String number, String msg)
throws ServiceException {
doSmsTopUp(number, msg);
}
}
Beans are defined as:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
">
<http-conf:conduit name="*.http-conduit">
<http-conf:client AllowChunking="false" />
</http-conf:conduit>
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- Services -->
<bean id="smstopup" class="com.domain.my.SmsTopUpServiceImpl" />
<!-- JAX-RS -->
<jaxrs:server id="restServices" address="/rest">
<jaxrs:serviceBeans>
<ref bean="smstopup" />
</jaxrs:serviceBeans>
</jaxrs:server>
<!-- JAX-WS -->
<jaxws:endpoint implementor="#smstopup" address="/soap/topup/sms">
</jaxws:endpoint>
</beans>
And the most error I get is as follows:
Feb 20, 2013 11:59:11 AM org.apache.cxf.jaxrs.utils.ResourceUtils
checkMethodDispatcher
WARNING: No resource methods have been found for resource class
com.domain.my.SmsTopUpServiceImpl
As mentioned above, it works on one server but not the other. I am just
weirded out by the error message. Does the java version difference
caused this, I find it highly unlikely.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com