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


Java OMAbstractFactory.getSOAP12Factory方法代码示例

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


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

示例1: createDefaultSOAPEnvelope

import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope createDefaultSOAPEnvelope(MessageContext inMsgCtx) {

        String soapNamespace = inMsgCtx.getEnvelope().getNamespace()
                .getNamespaceURI();
        SOAPFactory soapFactory = null;
        if (soapNamespace.equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
            soapFactory = OMAbstractFactory.getSOAP11Factory();
        } else if (soapNamespace
                .equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
            soapFactory = OMAbstractFactory.getSOAP12Factory();
        } else {
            log.error("Unknown SOAP Envelope");
        }
        if (soapFactory != null) {
            return soapFactory.getDefaultEnvelope();
        }

        return null;
    }
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:20,代码来源:WSXACMLMessageReceiver.java

示例2: buildSoapEnvelope

import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope buildSoapEnvelope(String clientID, String value) {
    SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();

    SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();

    SOAPHeader header = soapFactory.createSOAPHeader();
    envelope.addChild(header);

    OMNamespace synNamespace = soapFactory.createOMNamespace(
        "http://ws.apache.org/ns/synapse", "syn");
    OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
    clientIDElement.setText(clientID);
    header.addChild(clientIDElement);

    SOAPBody body = soapFactory.createSOAPBody();
    envelope.addChild(body);

    OMElement valueElement = soapFactory.createOMElement("Value", null);
    valueElement.setText(value);
    body.addChild(valueElement);

    return envelope;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:24,代码来源:LoadBalanceSessionFullClient.java

示例3: buildSoapEnvelope

import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope buildSoapEnvelope(String clientID, String value) {
    SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();

    SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();

    SOAPHeader header = soapFactory.createSOAPHeader();
    envelope.addChild(header);

    OMNamespace synNamespace = soapFactory.
            createOMNamespace("http://ws.apache.org/ns/synapse", "syn");
    OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
    clientIDElement.setText(clientID);
    header.addChild(clientIDElement);

    SOAPBody body = soapFactory.createSOAPBody();
    envelope.addChild(body);

    OMElement valueElement = soapFactory.createOMElement("Value", null);
    valueElement.setText(value);
    body.addChild(valueElement);

    return envelope;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:24,代码来源:LoadbalanceFailoverClient.java

示例4: setClientSessionID

import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
public void setClientSessionID(String id) {

        SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();

        OMNamespace synNamespace = soapFactory.
                createOMNamespace("http://ws.apache.org/namespaces/synapse", "syn");
        SOAPHeaderBlock header = soapFactory.createSOAPHeaderBlock("ClientID", synNamespace);
        header.setText(id);

        client.addHeader(header);
    }
 
开发者ID:wso2,项目名称:product-ei,代码行数:12,代码来源:ServiceInvoker.java


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