Methods Summary |
---|
public InvocationProcessingState | getState(com.sun.xml.ws.policy.jaxws.xmlstreamwriter.Invocation invocation, javax.xml.stream.XMLStreamWriter writer)
LOGGER.entering(invocation);
InvocationProcessingState resultingState = NO_STATE_CHANGE;
try {
switch (invocation.getMethodType()) {
case WRITE_START_ELEMENT:
if (currentMode == StateMachineMode.INACTIVE) {
if (startBuffering(invocation, writer)) {
resultingState = START_BUFFERING;
currentMode = StateMachineMode.BUFFERING;
}
} else {
depth++;
}
break;
case WRITE_END_ELEMENT:
if (currentMode != StateMachineMode.INACTIVE) {
if (depth == 0) {
resultingState = (currentMode == StateMachineMode.BUFFERING) ? STOP_BUFFERING : STOP_FILTERING;
currentMode = StateMachineMode.INACTIVE;
} else {
depth--;
}
}
break;
case WRITE_ATTRIBUTE:
if (currentMode == StateMachineMode.BUFFERING && startFiltering(invocation, writer)) {
resultingState = START_FILTERING;
currentMode = StateMachineMode.FILTERING;
}
break;
case CLOSE:
switch (currentMode) {
case BUFFERING:
resultingState = STOP_BUFFERING; break;
case FILTERING:
resultingState = STOP_FILTERING; break;
}
currentMode = StateMachineMode.INACTIVE;
break;
default:
break;
}
return resultingState;
} finally {
LOGGER.exiting(resultingState);
}
|
private boolean | startBuffering(com.sun.xml.ws.policy.jaxws.xmlstreamwriter.Invocation invocation, javax.xml.stream.XMLStreamWriter writer)
final QName elementName = XmlFilteringUtils.getElementNameToWrite(invocation, XmlFilteringUtils.getDefaultNamespaceURI(writer));
return WSDL_IMPORT_ELEMENT.equals(elementName);
|
private boolean | startFiltering(com.sun.xml.ws.policy.jaxws.xmlstreamwriter.Invocation invocation, javax.xml.stream.XMLStreamWriter writer)
final XmlFilteringUtils.AttributeInfo attributeInfo = XmlFilteringUtils.getAttributeNameToWrite(invocation, XmlFilteringUtils.getDefaultNamespaceURI(writer));
return IMPORT_NAMESPACE_ATTIBUTE.equals(attributeInfo.getName()) && MEX_NAMESPACE.equals(attributeInfo.getValue());
|