当前位置: 首页>>代码示例>>Java>>正文


Java SOAPFactory.newInstance方法代码示例

本文整理汇总了Java中javax.xml.soap.SOAPFactory.newInstance方法的典型用法代码示例。如果您正苦于以下问题:Java SOAPFactory.newInstance方法的具体用法?Java SOAPFactory.newInstance怎么用?Java SOAPFactory.newInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.soap.SOAPFactory的用法示例。


在下文中一共展示了SOAPFactory.newInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invoke

import javax.xml.soap.SOAPFactory; //导入方法依赖的package包/类
@Override
public DOMSource invoke(DOMSource request) {
    try {
        return invokeAllowingFaults(request);
    } catch (FaultMessage faultMessage) {
        try {
            SOAPFactory factory = SOAPFactory.newInstance();
            SOAPFault soapFault = factory.createFault();
            soapFault.setFaultCode(SOAP11_FAULTCODE_SERVER);           // todo here is a constant until we have a mechanism to determine the correct value (client / server)
            soapFault.setFaultString(faultMessage.getMessage());
            Detail detail = soapFault.addDetail();
            serializeFaultMessage(detail, faultMessage);
            // fault actor?
            // stack trace of the outer exception (FaultMessage) is unimportant, because it is always created at one place
            // todo consider providing stack trace of the inner exception
            //Detail detail = soapFault.addDetail();
            //detail.setTextContent(getStackTraceAsString(faultMessage));
            throw new SOAPFaultException(soapFault);
        } catch (SOAPException e) {
            throw new RuntimeException("SOAP Exception: " + e.getMessage(), e);
        }
    }
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:ModelWebServiceRaw.java

示例2: initialValue

import javax.xml.soap.SOAPFactory; //导入方法依赖的package包/类
@Override
protected SOAPFactory initialValue() {
	try {
		return SOAPFactory.newInstance();
	} catch (SOAPException e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:10,代码来源:SOAPUtils.java

示例3: listenerCreated

import javax.xml.soap.SOAPFactory; //导入方法依赖的package包/类
/**
 * Creates a new instance of MessageFactory.
 *
 * @throws RequestListenerException if unable to create MessageFactory.
 * @see hk.hku.cecid.piazza.commons.servlet.RequestListener#listenerCreated()
 */
public void listenerCreated() throws RequestListenerException {
    try {
        msgFactory = MessageFactory.newInstance();
        soapFactory = SOAPFactory.newInstance();
    }
    catch (Exception e) {
        throw new RequestListenerException(
                "Unable to create SOAP factories", e);
    }
}
 
开发者ID:cecid,项目名称:hermes,代码行数:17,代码来源:SOAPHttpAdaptor.java

示例4: getSoapFactory

import javax.xml.soap.SOAPFactory; //导入方法依赖的package包/类
protected SOAPFactory getSoapFactory() throws SOAPException {
    if (soapFactory == null) {
        soapFactory = SOAPFactory.newInstance();
    }
    return soapFactory;
}
 
开发者ID:CenturyLinkCloud,项目名称:mdw,代码行数:7,代码来源:SoapWebServiceAdapter.java

示例5: createSOAPFactory

import javax.xml.soap.SOAPFactory; //导入方法依赖的package包/类
/**
* Creates a new <code>SOAPFactory</code> object that is an instance of
* the specified implementation, this method uses the SAAJMetaFactory to
* locate the implementation class and create the SOAPFactory instance.
*
* @return a new instance of a <code>SOAPFactory</code>
*
* @param protocol  a string constant representing the protocol of the
*                   specified SOAP factory implementation. May be
*                   either <code>DYNAMIC_SOAP_PROTOCOL</code>,
*                   <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
*                   as) <code>SOAP_1_1_PROTOCOL</code>, or
*                   <code>SOAP_1_2_PROTOCOL</code>.
*
* @exception SOAPException if there was an error creating the
*            specified <code>SOAPFactory</code>
* @see SAAJMetaFactory
*/
   public SOAPFactory createSOAPFactory(String protocol) throws SOAPException {
           return SOAPFactory.newInstance(protocol);
   }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:SAAJFactory.java


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