• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JAXRPCException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.xml.rpc.JAXRPCException的典型用法代码示例。如果您正苦于以下问题:Java JAXRPCException类的具体用法?Java JAXRPCException怎么用?Java JAXRPCException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JAXRPCException类属于javax.xml.rpc包,在下文中一共展示了JAXRPCException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: logMessage

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
private void logMessage(String method, MessageContext context) {
     FileOutputStream fout = createFile();
     if(fout==null) return;
     LogOutputStream out = new LogOutputStream(fout, true);
     try {
         out.println("<" + method + ">");
         //Uncomment this statement to log the SOAP messages.
         out.println(logSOAPMessage(context));
         out.println("</" + method + ">");
     } catch (Exception ex) {
         ex.printStackTrace(System.out);
throw new JAXRPCException("LoggingHandler: Unable to log the message in " + method + " - {" + ex.getClass().getName() + "}"
		+ ex.getMessage());
     } finally {
         out.flush();
out.close();
     }
 }
 
开发者ID:jplag,项目名称:jplag,代码行数:19,代码来源:LoggingHandler.java


示例2: getSerializerAs

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
public Serializer getSerializerAs(String mechanismType) throws JAXRPCException {
	if (javaType == String.class) {
		return new StringSerializer(javaType, xmlType);
	}

	return super.getSerializerAs(mechanismType);
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:8,代码来源:StringSerializerFactory.java


示例3: createFile

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
public FileOutputStream createFile() {
	FileOutputStream fout = null;
	try {
		String logfile = System.getProperty("jplag.client.logfile");
		if(logfile==null || logfile.length()==0) return null;
			fout = new FileOutputStream(logfile, true); //append
	} catch (IOException ex) {
		ex.printStackTrace(System.out);
		throw new JAXRPCException("Unable to initialize the log file: " +
			ex.getClass().getName() + " - " + ex.getMessage());
	}
	return fout;
}
 
开发者ID:jplag,项目名称:jplag,代码行数:14,代码来源:LoggingHandler.java


示例4: getSerializerAs

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
@Override
public Serializer getSerializerAs(String mechanismType) throws JAXRPCException {
       if (javaType == String.class) {
           return new StringSerializer(javaType, xmlType);
       }

       return super.getSerializerAs(mechanismType);
   }
 
开发者ID:lucee,项目名称:Lucee,代码行数:9,代码来源:StringSerializerFactory.java


示例5: handleRequest

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
public boolean handleRequest(MessageContext mc) {
    mc.setProperty(ALLOW_FORM_OPTIMIZATION,
        Boolean.TRUE);
    try {
        return processMessage(mc, true);
    } catch (WSSecurityException e) {
        if (doDebug) {
            log.debug(e.getMessage(), e);
        }
        throw new JAXRPCException(e);
    }
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:13,代码来源:WSS4JHandler.java


示例6: handleResponse

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
public boolean handleResponse(MessageContext mc) {
    mc.setProperty(ALLOW_FORM_OPTIMIZATION,
        Boolean.TRUE);
    try {
        return processMessage(mc, false);
    } catch (WSSecurityException e) {
        if (doDebug) {
            log.debug(e.getMessage(), e);
        }
        throw new JAXRPCException(e);
    }
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:13,代码来源:WSS4JHandler.java


示例7: processMessage

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
/**
 * Switch for transferring control to doReceiver and doSender
 */
public boolean processMessage(MessageContext mc, boolean isRequestMessage) throws WSSecurityException {

    RequestData reqData = new RequestData();
    reqData.setMsgContext(mc);

    doDebug = log.isDebugEnabled();
    String deployment = null;
    String handleFlow = null;

    if ((deployment = (String) getOption(DEPLOYMENT)) == null) {
        deployment = (String) mc.getProperty(DEPLOYMENT);
    }
    if (deployment == null) {
        throw new JAXRPCException("WSS4JHandler.processMessage: No deployment defined");
    }
    if ((handleFlow = (String) getOption(FLOW)) == null) {
        handleFlow = (String) mc.getProperty(FLOW);
    }
    if (handleFlow == null) {
        handleFlow = "";
    }

    // call doSender if we are -
    // (handling request and client-side deployment) or (handling response and server-side deployment).
    // call doReceiver if we are -
    // (handling request and server-side deployment) or (handling response and client-side deployment).

    boolean needsHandling = ( isRequestMessage && !handleFlow.equals(RESPONSE_ONLY)) ||
                            (!isRequestMessage && !handleFlow.equals(REQUEST_ONLY));
    try {
        if (deployment.equals(CLIENT_DEPLOYMENT) ^ isRequestMessage) {
            if (needsHandling) {
                return doReceiver(mc, reqData, isRequestMessage);
            }
        } else {
            if (needsHandling) {
                return doSender(mc, reqData, isRequestMessage);
            }
        }
    } finally {
        reqData.clear();
        reqData = null;
    }
    return true;
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:49,代码来源:WSS4JHandler.java


示例8: messageToDocument

import javax.xml.rpc.JAXRPCException; //导入依赖的package包/类
/**
 * Utility method to convert SOAPMessage to org.w3c.dom.Document
 */
public static Document messageToDocument(SOAPMessage message) {
    try {
        Source content = message.getSOAPPart().getContent();
        DocumentBuilderFactory dbf = org.apache.ws.security.util.XMLUtils.getSecuredDocumentBuilder();
        DocumentBuilder builder = dbf.newDocumentBuilder();
        return builder.parse(org.apache.ws.security.util.XMLUtils.sourceToInputSource(content));
    } catch (Exception ex) {
        if (doDebug) {
            log.debug(ex.getMessage(), ex);
        }
        throw new JAXRPCException("messageToDocument: cannot convert SOAPMessage into Document", ex);
    }
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:17,代码来源:WSS4JHandler.java


示例9: HandlerChainImpl

import javax.xml.rpc.JAXRPCException; //导入依赖的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



注:本文中的javax.xml.rpc.JAXRPCException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DataOutputStreamPlus类代码示例发布时间:2022-05-23
下一篇:
Java RainbowUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap