本文整理汇总了Java中javax.xml.rpc.handler.HandlerInfo类的典型用法代码示例。如果您正苦于以下问题:Java HandlerInfo类的具体用法?Java HandlerInfo怎么用?Java HandlerInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HandlerInfo类属于javax.xml.rpc.handler包,在下文中一共展示了HandlerInfo类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initHandlerChain
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
@SuppressWarnings("unchecked") // Can't change the API
Iterator<Handler> iter = handlerChain.iterator();
while (iter.hasNext()) {
Handler handler = iter.next();
handler.init(handlerInfo);
}
String[] soaprolesRegistered = handlerChain.getRoles();
String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
int i;
for (i = 0;i < soaprolesRegistered.length; i++)
soaproles[i] = soaprolesRegistered[i];
for (int j = 0; j < soaprolesToAdd.size(); j++)
soaproles[i+j] = soaprolesToAdd.get(j);
handlerChain.setRoles(soaproles);
handlerRegistry.setHandlerChain(portName, handlerChain);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:ServiceRefFactory.java
示例2: invokeService
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
public void invokeService (Map config, int interopNum) throws Exception {
PingServiceLocator service = new PingServiceLocator();
List handlerChain = new ArrayList();
handlerChain.add(new HandlerInfo( WSS4JHandler.class, config, null));
HandlerRegistry registry = service.getHandlerRegistry();
registry.setHandlerChain(new QName("Ping" + interopNum), handlerChain);
service.getHandlerRegistry().getHandlerChain(new QName("http://xmlsoap.org/Ping", "ticketType"));
java.lang.reflect.Method method = service.getClass().getMethod("getPing" + interopNum, new Class[] {URL.class});
PingPort port = (PingPort) method.invoke (service, new Object[] {new URL("http://localhost:8080/axis/services/Ping" + interopNum)});
StringHolder text =
new StringHolder("WSS4J - Scenario" + interopNum + " @ [" + new java.util.Date(System.currentTimeMillis()) + "]");
port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J" + interopNum), text);
System.out.println(text.value);
}
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:20,代码来源:TestJAXRPCHandler.java
示例3: createHandlerInfos
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
private List<HandlerInfo> createHandlerInfos(List<HandlerChainData> handlerChains) throws ClassNotFoundException {
if (handlerChains == null || handlerChains.isEmpty()) return null;
List<HandlerData> handlers = handlerChains.get(0).getHandlers();
List<HandlerInfo> handlerInfos = new ArrayList<HandlerInfo>(handlers.size());
for (HandlerData handler : handlers) {
Class<?> handlerClass = handler.getHandlerClass();
Map initParams = new HashMap(handler.getInitParams());
QName[] headers = handler.getSoapHeaders().toArray(new QName[handler.getSoapHeaders().size()]);
HandlerInfo handlerInfo = new HandlerInfo(handlerClass, initParams, headers);
handlerInfos.add(handlerInfo);
}
return handlerInfos;
}
开发者ID:apache,项目名称:tomee,代码行数:17,代码来源:AxisService.java
示例4: initHandlerChain
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
HandlerInfo handlerref, ArrayList soaprolesToAdd) {
HandlerChain handlerList = (HandlerChain) handlerRegistry.getHandlerChain(portName);
handlerList.add(handlerref);
String[] soaprolesRegistered = handlerList.getRoles();
String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
int i;
for (i = 0;i < soaprolesRegistered.length; i++)
soaproles[i] = soaprolesRegistered[i];
for (int j = 0; j < soaprolesToAdd.size(); j++)
soaproles[i+j] = (String) soaprolesToAdd.get(j);
handlerList.setRoles(soaproles);
handlerRegistry.setHandlerChain(portName, handlerList);
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:ServiceRefFactory.java
示例5: createPojoWsContainer
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
protected HttpListener createPojoWsContainer(ClassLoader loader, URL moduleBaseUrl, PortData port, String serviceId, Class target, Context context, String contextRoot, Map<String, Object> bdgs, ServiceConfiguration serviceInfos) throws Exception {
ClassLoader classLoader = target.getClassLoader();
// todo build JaxRpcServiceInfo in assembler
JaxRpcServiceInfo serviceInfo = getJaxRpcServiceInfo(classLoader);
// Build java service descriptor
JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();
// Create service
RPCProvider provider = new PojoProvider();
SOAPService service = new SOAPService(null, provider, null);
service.setServiceDescription(serviceDesc);
// Set class name
service.setOption("className", target.getName());
// Add Handler Chain
List<HandlerInfo> handlerInfos = createHandlerInfos(port.getHandlerChains());
HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);
// Create container
AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
wsContainers.put(serviceId, container);
return container;
}
开发者ID:apache,项目名称:tomee,代码行数:29,代码来源:AxisService.java
示例6: HandlerChainImpl
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
public HandlerChainImpl(List<HandlerInfo> handlerInfos, String[] roles) {
this.roles = roles;
for (int i = 0; i < handlerInfos.size(); i++) {
HandlerInfo handlerInfo = handlerInfos.get(i);
try {
Handler handler = (Handler) handlerInfo.getHandlerClass().newInstance();
handler.init(handlerInfo);
add(handler);
} catch (Exception e) {
throw new JAXRPCException("Unable to initialize handler class: " + handlerInfo.getHandlerClass().getName(), e);
}
}
}
开发者ID:apache,项目名称:tomee,代码行数:15,代码来源:HandlerChainImpl.java
示例7: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
public void init(HandlerInfo arg) {
info=arg;
}
开发者ID:jplag,项目名称:jplag,代码行数:4,代码来源:LoggingHandler.java
示例8: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
/**
* Save the HandlerInfo object
*/
public void init(HandlerInfo arg) {
info=arg;
}
开发者ID:jplag,项目名称:jplag,代码行数:7,代码来源:JPlagClientAccessHandler.java
示例9: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
public void init(HandlerInfo arg) {
info = arg;
}
开发者ID:jplag,项目名称:jplag,代码行数:4,代码来源:JPlagServerAccessHandler.java
示例10: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
/**
* Save the HandlerInfo object
*/
public void init(HandlerInfo arg) {
info = arg;
}
开发者ID:jplag,项目名称:jplag,代码行数:7,代码来源:JPlagClientAccessHandler.java
示例11: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
public void init(HandlerInfo arg)
{
info = arg;
}
开发者ID:windup,项目名称:windup-rulesets,代码行数:5,代码来源:JaxRpcGenericHandlerTest.java
示例12: init
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
/**
* Initializes the instance of the handler.
*/
public void init(HandlerInfo hi) {
handlerInfo = hi;
}
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:7,代码来源:WSS4JHandler.java
示例13: EjbRpcProvider
import javax.xml.rpc.handler.HandlerInfo; //导入依赖的package包/类
public EjbRpcProvider(BeanContext ejbDeployment) {
this.ejbDeployment = ejbDeployment;
this.handlerInfos = new ArrayList<HandlerInfo>();
}
开发者ID:apache,项目名称:tomee,代码行数:5,代码来源:EjbRpcProvider.java
注:本文中的javax.xml.rpc.handler.HandlerInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论