com.sun.xml.ws.handler.XMLHandlerProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxws-rt Show documentation
Show all versions of jaxws-rt Show documentation
JAX-WS Runtime with module descriptor
/*
* Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* LogicalHandlerProcessor.java
*
* Created on February 8, 2006, 5:40 PM
*
*/
package com.sun.xml.ws.handler;
import com.sun.xml.ws.api.WSBinding;
import com.sun.xml.ws.api.message.Messages;
import java.util.List;
import javax.xml.ws.ProtocolException;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPException;
/**
* This is used only for XML/HTTP binding
* @author WS Development Team
*/
final class XMLHandlerProcessor extends HandlerProcessor {
/**
* Creates a new instance of LogicalHandlerProcessor
*/
public XMLHandlerProcessor(HandlerTube owner, WSBinding binding, List extends Handler> chain) {
super(owner, binding, chain);
}
/*
* TODO: This is valid only for XML/HTTP binding
* Empty the XML message
*/
final void insertFaultMessage(C context,
ProtocolException exception) {
if(exception instanceof HTTPException) {
context.put(MessageContext.HTTP_RESPONSE_CODE,((HTTPException)exception).getStatusCode());
}
if (context != null) {
// non-soap case
context.setPacketMessage(Messages.createEmpty(binding.getSOAPVersion()));
}
}
}