0
我是Apache CXF的新手,請大家幫忙。 我不知道爲什麼客戶端沒有被調用。 client =(BayerService)factory.create();未啓用Apache CXF客戶端
我做了這樣
public class RunBayer implements CallbackHandler
{
RunBayer()
{
init();
}
private static void init()
{
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
WSS4JOutInterceptor out = new WSS4JOutInterceptor();
out.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE);
out.setProperty(WSHandlerConstants.USER, "svi_ws");
out.setProperty(WSHandlerConstants.PASSWORD_TYPE, "PasswordDigest");
factory.getOutInterceptors().add(out);
factory.setServiceClass(BayerService.class);
factory.setAddress(host);
client = (BayerService) factory.create();
}
}
而且我有一個BayerService接口,在這種格式
public interface BayerService
{
public OurServiceResponse OurView(@WebParam(name = "request") ServiceRequest request);
}
我有一個名爲Bayer.java另一類實際實現這個Interafce
public class Bayer implements BayerService
{
public OurServiceResponse OurView(ServiceRequest request)
{
// code
}
}
有人請告訴我爲什麼控制不進來,當我這樣叫???
非常感謝。