我们有一个 SOAP Web 服务,我们正在从 JBoss EAP 5.1 迁移到 6.4.7,其中一个 Web 服务只返回 200(在 JBoss 5 中)。当我们迁移到 6 时,它仍然可以工作并且什么都不返回,而是返回 202,这会破坏客户端。我们无法控制客户。我在 close 方法中尝试了一个 SOAPHandler,但它什么也没做,因为它甚至没有被调用,因为我的猜测是,由于没有 SOAP 消息返回,所以没有任何东西触发处理程序。
我还尝试直接在 web 方法和 modif 中访问上下文,但它什么也没做。
MessageContext ctx = wsContext.getMessageContext(); HttpServletResponse 响应 = (HttpServletResponse) ctx.get(MessageContext.SERVLET_RESPONSE); response.setStatus(HttpServletResponse.SC_OK);
我在手册中找不到任何东西。
任何方向都非常感谢。
以下是端口及其实现的样子:
下面是端口及其实现头的样子:
@WebService(name = "ForecastServicePortType", targetNamespace = "http://www.company.com/forecastservice/wsdl")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@XmlSeeAlso({
ObjectFactory.class
})
public interface ForecastServicePortType {
/**
*
* @param parameters
* @throws RemoteException
*/
@WebMethod(action = "http://www.company.com/forecast/sendForecast")
public void sendForecast(
@WebParam(name = "SendForecast", targetNamespace = "http://www.company.com/forecastservice", partName = "parameters")
SendForecastType parameters) throws RemoteException;
}
@WebService(name = "ForecastServicePortTypeImpl", serviceName = "ForecastServicePortType", endpointInterface = "com.company.forecastservice.wsdl.ForecastServicePortType", wsdlLocation = "/WEB-INF/wsdl/ForecastServicePortType.wsdl")
@HandlerChain(file = "/META-INF/handlers.xml")
public class ForecastServicePortTypeImpl implements ForecastServicePortType {
...
}