本文整理汇总了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);
}
}
}
}
示例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);
}
}
示例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));
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}