本文整理汇总了Java中com.sun.xml.internal.ws.api.pipe.NextAction类的典型用法代码示例。如果您正苦于以下问题:Java NextAction类的具体用法?Java NextAction怎么用?Java NextAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NextAction类属于com.sun.xml.internal.ws.api.pipe包,在下文中一共展示了NextAction类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processRequest(Packet request) {
if (isNoValidation() || !feature.isInbound() || !request.getMessage().hasPayload() || request.getMessage().isFault()) {
return super.processRequest(request);
}
try {
doProcess(request);
} catch(SAXException se) {
LOGGER.log(Level.WARNING, "Client Request doesn't pass Service's Schema Validation", se);
// Client request is invalid. So sending specific fault code
// Also converting this to fault message so that handlers may get
// to see the message.
SOAPVersion soapVersion = binding.getSOAPVersion();
Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
soapVersion, null, se, soapVersion.faultCodeClient);
return doReturnWith(request.createServerResponse(faultMsg,
wsdlPort, seiModel, binding));
}
return super.processRequest(request);
}
示例2: processResponse
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
/**
* Do MU Header Processing on incoming message (response)
*
* @return
* if all the headers in the packet are understood, returns an action to
* call the previous pipes with response packet
* @throws SOAPFaultException
* if all the headers in the packet are not understood, throws SOAPFaultException
*/
@Override @NotNull
public NextAction processResponse(Packet response) {
if (response.getMessage() == null) {
return super.processResponse(response);
}
HandlerConfiguration handlerConfig = response.handlerConfig;
if (handlerConfig == null) {
//Use from binding instead of defaults in case response packet does not have it,
//may have been changed from the time of invocation, it ok as its only fallback case.
handlerConfig = binding.getHandlerConfig();
}
Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(response.getMessage().getHeaders(), handlerConfig.getRoles(),binding.getKnownHeaders());
if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) {
return super.processResponse(response);
}
throw createMUSOAPFaultException(misUnderstoodHeaders);
}
示例3: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
/**
* This binds the parameters for SEI endpoints and invokes the endpoint method. The
* return value, and response Holder arguments are used to create a new {@link Message}
* that traverses through the Pipeline to transport.
*/
public @NotNull NextAction processRequest(@NotNull Packet req) {
JavaCallInfo call = model.getDatabinding().deserializeRequest(req);
if (call.getException() == null) {
try {
if (req.getMessage().isOneWay(model.getPort()) && req.transportBackChannel != null) {
req.transportBackChannel.close();
}
Object ret = getInvoker(req).invoke(req, call.getMethod(), call.getParameters());
call.setReturnValue(ret);
} catch (InvocationTargetException e) {
call.setException(e);
} catch (Exception e) {
call.setException(e);
}
} else if (call.getException() instanceof DispatchException) {
DispatchException e = (DispatchException)call.getException();
return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding));
}
Packet res = (Packet) model.getDatabinding().serializeResponse(call);
res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding());
assert res != null;
return doReturnWith(res);
}
示例4: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
public @NotNull NextAction processRequest(@NotNull Packet request) {
T param = argsBuilder.getParameter(request);
AsyncProviderCallback callback = new AsyncProviderInvokerTube.AsyncProviderCallbackImpl(request);
AsyncWebServiceContext ctxt = new AsyncWebServiceContext(getEndpoint(),request);
AsyncProviderInvokerTube.LOGGER.fine("Invoking AsyncProvider Endpoint");
try {
getInvoker(request).invokeAsyncProvider(request, param, callback, ctxt);
} catch(Exception e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
return doThrow(e);
}
// Suspend the Fiber. AsyncProviderCallback will resume the Fiber after
// it receives response.
return doSuspend();
}
示例5: processResponse
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public @NotNull NextAction processResponse(Packet response) {
// if one-way then, no validation
if (response.getMessage() != null) {
response = validateInboundHeaders(response);
response.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,response));
String msgId = AddressingUtils.
getMessageID(response.getMessage().getHeaders(),
addressingVersion, soapVersion);
response.put(WsaPropertyBag.WSA_MSGID_FROM_REQUEST, msgId);
}
return doReturnWith(response);
}
示例6: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processRequest(Packet request) {
if (messageDumper.isLoggable()) {
Packet dumpPacket = (request != null) ? request.copy(true) : null;
messageDumper.dump(MessageDumper.MessageType.Request, position.requestState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id);
}
return super.processRequest(request);
}
示例7: processResponse
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processResponse(Packet response) {
if (messageDumper.isLoggable()) {
Packet dumpPacket = (response != null) ? response.copy(true) : null;
messageDumper.dump(MessageDumper.MessageType.Response, position.responseState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id);
}
return super.processResponse(response);
}
示例8: processException
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processException(Throwable t) {
if (messageDumper.isLoggable()) {
messageDumper.dump(MessageDumper.MessageType.Exception, position.responseState, Converter.toString(t), tubeId, Fiber.current().owner.id);
}
return super.processException(t);
}
示例9: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processRequest(Packet request) {
if (isNoValidation() || !feature.isOutbound() || !request.getMessage().hasPayload() || request.getMessage().isFault()) {
return super.processRequest(request);
}
try {
doProcess(request);
} catch(SAXException se) {
throw new WebServiceException(se);
}
return super.processRequest(request);
}
示例10: processResponse
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processResponse(Packet response) {
if (isNoValidation() || !feature.isInbound() || response.getMessage() == null || !response.getMessage().hasPayload() || response.getMessage().isFault()) {
return super.processResponse(response);
}
try {
doProcess(response);
} catch(SAXException se) {
throw new WebServiceException(se);
}
return super.processResponse(response);
}
示例11: processRequest
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
public @NotNull NextAction processRequest(@NotNull Packet request) {
T param = argsBuilder.getParameter(request);
NoSuspendResumer resumer = new NoSuspendResumer();
@SuppressWarnings({ "rawtypes", "unchecked" })
AsyncProviderCallbackImpl callback = new AsyncProviderInvokerTube.AsyncProviderCallbackImpl(request, resumer);
AsyncWebServiceContext ctxt = new AsyncWebServiceContext(getEndpoint(),request);
AsyncProviderInvokerTube.LOGGER.fine("Invoking AsyncProvider Endpoint");
try {
getInvoker(request).invokeAsyncProvider(request, param, callback, ctxt);
} catch(Throwable e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
return doThrow(e);
}
synchronized(callback) {
if (resumer.response != null) {
// Only used by AsyncProvider<Packet>
// Implementation may pass Packet containing throwable; use both
ThrowableContainerPropertySet tc = resumer.response.getSatellite(ThrowableContainerPropertySet.class);
Throwable t = (tc != null) ? tc.getThrowable() : null;
return t != null ? doThrow(resumer.response, t) : doReturnWith(resumer.response);
}
// Suspend the Fiber. AsyncProviderCallback will resume the Fiber after
// it receives response.
callback.resumer = new FiberResumer();
return doSuspend();
}
}
示例12: processResponse
import com.sun.xml.internal.ws.api.pipe.NextAction; //导入依赖的package包/类
@Override
public NextAction processResponse(Packet response) {
if (isNoValidation() || !feature.isOutbound() || response.getMessage() == null || !response.getMessage().hasPayload() || response.getMessage().isFault()) {
return super.processResponse(response);
}
try {
doProcess(response);
} catch(SAXException se) {
// TODO: Should we convert this to fault Message ??
throw new WebServiceException(se);
}
return super.processResponse(response);
}