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


Java SOAPEnvelope.getOMFactory方法代码示例

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


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

示例1: invoke

import org.apache.axiom.soap.SOAPEnvelope; //导入方法依赖的package包/类
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
    try {
        if (ENABLE.equals(System.getProperty(UDDI_SYSTEM_PROPERTY))) {
            SOAPEnvelope envelope = msgContext.getEnvelope();
            OMNamespace namespace = envelope.getNamespace();
            String nameSpace = namespace.getNamespaceURI();
            if (nameSpace != null) {
                log.info("first " + envelope.getBody().getFirstElementNS().getNamespaceURI());
                log.info(envelope.toString());

                if (envelope.getBody().getFirstElementNS().getNamespaceURI().equals(UDDI_V2)) {
                    OMFactory omFactory = envelope.getOMFactory();
                    OMElement firstElement = envelope.getBody().getFirstElement();
                    setNamespace(firstElement, omFactory.createOMNamespace(UDDI_V3,
                            firstElement.getNamespace().getPrefix()));

                }
                log.info("second " + envelope.getBody().getFirstElementNS().getNamespaceURI());
                log.info(envelope.toString());
            }
        }
    } catch (Exception e) {
        log.error("An error occurred while processing SOAP message.", e);
    }
    return InvocationResponse.CONTINUE;
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:27,代码来源:UddiVersionHandler.java

示例2: createElement

import org.apache.axiom.soap.SOAPEnvelope; //导入方法依赖的package包/类
/**
 * Creates a new <code>ebint:RoutingInput</code> element in the context of the given SOAP envelope using the data
 * form the given User Message.
 * <p>NOTE: The element is not added to the SOAP envelope by this method! This done later by the WS-A module as the
 * created element will be added as a EPR parameter.
 *
 * @param soapEnv       The SOAP envelope the <code>RoutingInput</code> element must be added to
 * @param routinginfo   The User Message data that is the routing info
 * @return              A new <code>ebint:RoutingInput</code> element
 */
public static OMElement createElement(final SOAPEnvelope soapEnv, final IUserMessage routinginfo) {
    final OMFactory f = soapEnv.getOMFactory();

    // Create the RoutingInput element
    final OMElement routingInput = f.createOMElement(Q_ELEMENT_NAME);
    routingInput.declareNamespace(EbMSConstants.EBMS3_NS_URI, EbMSConstants.EBMS3_NS_PREFIX);

    // And add a regular UserMessage child to it
    final OMElement usrMsgElem = UserMessageElement.createElement(routingInput, routinginfo);
    // This UserMessage element however has incorrect namespace, so change it to the multi-hop namespace
    usrMsgElem.setNamespace(routingInput.getNamespace());

    return routingInput;
}
 
开发者ID:holodeck-b2b,项目名称:Holodeck-B2B,代码行数:25,代码来源:RoutingInput.java


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