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


Java WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT属性代码示例

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


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

示例1: checkMessageIDHeader

/**
 * Validate that a message id is present when required. The check applied here only applies to
 * WS-Addressing headers that comply with the 2005/08 (final) spec.
 *
 * @param msgContext
 * @throws AxisFault
 * @see AddressingInHandler#checkForMandatoryHeaders
 */
private void checkMessageIDHeader(MessageContext msgContext) throws AxisFault {
    String namespace = (String)msgContext.getLocalProperty(WS_ADDRESSING_VERSION);
    if (!Final.WSA_NAMESPACE.equals(namespace)) {
        return;
    }

    AxisOperation axisOperation = msgContext.getAxisOperation();
    
    if (axisOperation != null) {
        String mep = axisOperation.getMessageExchangePattern();
        int mepConstant = Utils.getAxisSpecifMEPConstant(mep);
        
        if (mepConstant == WSDLConstants.MEP_CONSTANT_IN_OUT ||
                mepConstant == WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT ||
                mepConstant == WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY) {
            String messageId = msgContext.getOptions().getMessageId();
            if (messageId == null || "".equals(messageId)) {
                AddressingFaultsHelper
                .triggerMessageAddressingRequiredFault(msgContext, WSA_MESSAGE_ID);
            }
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:31,代码来源:AddressingValidationHandler.java

示例2: migrateContextToThread

public void migrateContextToThread(MessageContext messageContext)
        throws AxisFault {
    //Only make the context map available if we have an inbound request
    //message, in the server.
    AxisOperation axisOperation = messageContext.getAxisOperation();
    String mep = axisOperation.getMessageExchangePattern();
    int mepConstant = Utils.getAxisSpecifMEPConstant(mep);
    
    if (mepConstant == WSDLConstants.MEP_CONSTANT_IN_ONLY ||
        mepConstant == WSDLConstants.MEP_CONSTANT_IN_OUT ||
        mepConstant == WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT ||
        mepConstant == WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY)
    {
        EndpointContextMap map = (EndpointContextMap) 
            messageContext.getConfigurationContext().getProperty(Constants.ENDPOINT_CONTEXT_MAP);
        EndpointContextMapManager.setEndpointContextMap(map);
    }        
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:EndpointContextMapMigrator.java

示例3: createOperationContext

public static OperationContext createOperationContext(int mepURI, AxisOperation axisOp,
                                                      ServiceContext serviceContext)
        throws AxisFault {
    if ((WSDLConstants.MEP_CONSTANT_IN_OUT == mepURI) ||
            (WSDLConstants.MEP_CONSTANT_IN_ONLY == mepURI)
            || (WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT == mepURI)
            || (WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY == mepURI) ||
            (WSDLConstants.MEP_CONSTANT_OUT_ONLY == mepURI)
            || (WSDLConstants.MEP_CONSTANT_OUT_IN == mepURI) ||
            (WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI)
            || (WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI)) {
        return serviceContext.createOperationContext(axisOp);
    } else {
        throw new AxisFault(Messages.getMessage("unSupportedMEP", "ID is " + mepURI));
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:OperationContextFactory.java

示例4: cleanupThread

public void cleanupThread(MessageContext messageContext) {
    //Only clean up if we are inbound to the server.
    AxisOperation axisOperation = messageContext.getAxisOperation();
    String mep = axisOperation.getMessageExchangePattern();
    int mepConstant = Utils.getAxisSpecifMEPConstant(mep);
    
    if (mepConstant == WSDLConstants.MEP_CONSTANT_IN_ONLY ||
        mepConstant == WSDLConstants.MEP_CONSTANT_IN_OUT ||
        mepConstant == WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT ||
        mepConstant == WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY)
    {
        EndpointContextMapManager.setEndpointContextMap(null);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:EndpointContextMapMigrator.java

示例5: getAxisSpecificMEPConstant

/**
 * Maps the String URI of the Message exchange pattern to an integer. Further, in the first
 * lookup, it will cache the looked up value so that the subsequent method calls are extremely
 * efficient.
 *
 * @return an MEP constant from WSDLConstants
 */
public int getAxisSpecificMEPConstant() {
    if (this.mep != WSDLConstants.MEP_CONSTANT_INVALID) {
        return this.mep;
    }

    int temp = WSDLConstants.MEP_CONSTANT_INVALID;

    if (WSDL2Constants.MEP_URI_IN_OUT.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_IN_OUT;
    } else if (WSDL2Constants.MEP_URI_IN_ONLY.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_IN_ONLY;
    } else if (WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT;
    } else if (WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_OUT_IN;
    } else if (WSDL2Constants.MEP_URI_OUT_ONLY.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_OUT_ONLY;
    } else if (WSDL2Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN;
    } else if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY;
    } else if (WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
        temp = WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY;
    }

    if (temp == WSDLConstants.MEP_CONSTANT_INVALID) {
        throw new AxisError(Messages.getMessage("mepmappingerror"));
    }

    this.mep = temp;

    return this.mep;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:40,代码来源:AxisOperation.java

示例6: getAxisOperation

public static AxisOperation getAxisOperation(int mepURI) throws AxisFault {
    AxisOperation abOpdesc;

    switch (mepURI) {
        case WSDLConstants.MEP_CONSTANT_IN_ONLY : {
            abOpdesc = new InOnlyAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_OUT_ONLY : {
            abOpdesc = new OutOnlyAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_ONLY);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_IN_OUT : {
            abOpdesc = new InOutAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT : {
            abOpdesc = new InOutAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY : {
            abOpdesc = new InOutAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_OUT_IN : {
            abOpdesc = new OutInAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_IN);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN : {
            abOpdesc = new OutInAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_OPTIONAL_IN);
            break;
        }
        case WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY : {
            abOpdesc = new RobustOutOnlyAxisOperation();
            abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY);
            break;
        }
        default : {
            throw new AxisFault(Messages.getMessage("unSupportedMEP", "ID is " + mepURI));
        }
    }
    return abOpdesc;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:50,代码来源:AxisOperationFactory.java

示例7: getAxisSpecifMEPConstant

/**
 * Maps the String URI of the Message exchange pattern to a integer.
 * Further, in the first lookup, it will cache the looked
 * up value so that the subsequent method calls are extremely efficient.
 */
@SuppressWarnings("deprecation")
public static int getAxisSpecifMEPConstant(String messageExchangePattern) {


    int mepConstant = WSDLConstants.MEP_CONSTANT_INVALID;

    if (WSDL2Constants.MEP_URI_IN_OUT.equals(messageExchangePattern) ||
        WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT.equals(messageExchangePattern) ||
        WSDLConstants.WSDL20_2004_Constants.MEP_URI_IN_OUT.equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_IN_OUT;
    } else if (
            WSDL2Constants.MEP_URI_IN_ONLY.equals(messageExchangePattern) ||
            WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(messageExchangePattern) ||
            WSDLConstants.WSDL20_2004_Constants.MEP_URI_IN_ONLY
                    .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_IN_ONLY;
    } else if (WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT
            .equals(messageExchangePattern) ||
                                            WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT
                                                    .equals(messageExchangePattern) ||
                                                                                    WSDLConstants.WSDL20_2004_Constants.MEP_URI_IN_OPTIONAL_OUT
                                                                                            .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT;
    } else if (WSDL2Constants.MEP_URI_OUT_IN.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_IN.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2004_Constants.MEP_URI_OUT_IN
                       .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_OUT_IN;
    } else if (WSDL2Constants.MEP_URI_OUT_ONLY.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_ONLY
                       .equals(messageExchangePattern) ||
                                                       WSDLConstants.WSDL20_2004_Constants
                                                               .MEP_URI_OUT_ONLY.equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_OUT_ONLY;
    } else if (WSDL2Constants.MEP_URI_OUT_OPTIONAL_IN.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN
                       .equals(messageExchangePattern) ||
                                                       WSDLConstants.WSDL20_2004_Constants.MEP_URI_OUT_OPTIONAL_IN
                                                               .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN;
    } else if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY
                       .equals(messageExchangePattern) ||
                                                       WSDLConstants.WSDL20_2004_Constants.MEP_URI_ROBUST_IN_ONLY
                                                               .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY;
    } else if (WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY.equals(messageExchangePattern) ||
               WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY
                       .equals(messageExchangePattern) ||
                                                       WSDLConstants.WSDL20_2004_Constants.MEP_URI_ROBUST_OUT_ONLY
                                                               .equals(messageExchangePattern)) {
        mepConstant = WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY;
    }

    if (mepConstant == WSDLConstants.MEP_CONSTANT_INVALID) {
        throw new AxisError(Messages.getMessage("mepmappingerror"));
    }


    return mepConstant;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:66,代码来源:Utils.java


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