use of com.sun.xml.ws.addressing.model.ActionNotSupportedException in project metro-jax-ws by eclipse-ee4j.
the class WsaClientTube method validateAction.
@Override
protected void validateAction(Packet packet) {
// There may not be a WSDL operation. There may not even be a WSDL.
// For instance this may be a RM CreateSequence message.
WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
if (wbo == null)
return;
String gotA = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
if (gotA == null)
throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION());
String expected = helper.getOutputAction(packet);
if (expected != null && !gotA.equals(expected))
throw new ActionNotSupportedException(gotA);
}
use of com.sun.xml.ws.addressing.model.ActionNotSupportedException in project metro-jax-ws by eclipse-ee4j.
the class WsaServerTube method validateAction.
@Override
protected void validateAction(Packet packet) {
// There may not be a WSDL operation. There may not even be a WSDL.
// For instance this may be a RM CreateSequence message.
WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);
if (wsdlBoundOperation == null) {
return;
}
String gotA = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
if (gotA == null) {
throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
}
String expected = helper.getInputAction(packet);
String soapAction = helper.getSOAPAction(packet);
if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) {
expected = soapAction;
}
if (expected != null && !gotA.equals(expected)) {
throw new ActionNotSupportedException(gotA);
}
}
Aggregations