本文整理汇总了Java中org.apache.cxf.service.ServiceImpl类的典型用法代码示例。如果您正苦于以下问题:Java ServiceImpl类的具体用法?Java ServiceImpl怎么用?Java ServiceImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServiceImpl类属于org.apache.cxf.service包,在下文中一共展示了ServiceImpl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTestExchange
import org.apache.cxf.service.ServiceImpl; //导入依赖的package包/类
private Exchange getTestExchange() {
Exchange exchange = new ExchangeImpl();
Message message = new MessageImpl();
message.setExchange(exchange);
exchange.setInMessage(message);
exchange.put(BindingOperationInfo.class, new BindingOperationInfo());
Service service = new ServiceImpl();
MethodDispatcher md = new MethodDispatcher() {
@Override
public Method getMethod(BindingOperationInfo op) {
return this.getClass().getMethods()[0];
}
@Override
public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
return null;
}
@Override
public void bind(OperationInfo o, Method... methods) {
}
};
service.put(MethodDispatcher.class.getName(), md);
exchange.put(Service.class, service);
return exchange;
}
示例2: createServiceModel
import org.apache.cxf.service.ServiceImpl; //导入依赖的package包/类
public static Service createServiceModel() {
ServiceInfo serviceInfo = new ServiceInfo();
// does not make sense for protobuf services
serviceInfo.setName(new QName("", "protobuf_service_"
+ System.identityHashCode(serviceInfo)));
InterfaceInfo interfaceInfo = new InterfaceInfo(serviceInfo,
serviceInfo.getName());
serviceInfo.setInterface(interfaceInfo);
Service service = new ServiceImpl(serviceInfo);
return service;
}