private void logMessages(MessageContext msgContext) throws AxisFault { ... msgContext.setResponseMessage(new Message( <strong> stripNonValidXMLCharacters </strong> (((Message) msgContext .getResponseMessage()).getSOAPPartAsString()))); ... }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: EchoHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope env = (SOAPEnvelope) msg.getSOAPEnvelope(); msgContext.setResponseMessage( new Message( env ) ); } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: EchoHandler::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: EchoHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope env = (SOAPEnvelope) msg.getSOAPEnvelope(); msgContext.setResponseMessage( new Message( env ) ); } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: EchoHandler::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: EchoHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope env = (SOAPEnvelope) msg.getSOAPEnvelope(); msgContext.setResponseMessage( new Message( env ) ); } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: EchoHandler::invoke"); }
private void doVisiting(MessageContext msgContext, HandlerIterationStrategy visitor) throws AxisFault { int i = 0 ; try { Enumeration enumeration = handlers.elements(); while (enumeration.hasMoreElements()) { Handler h = (Handler)enumeration.nextElement(); visitor.visit(h, msgContext); i++; } } catch( AxisFault f ) { // Something went wrong. If we haven't already put this fault // into the MessageContext's response message, do so and make sure // we only do it once. This allows onFault() methods to safely // set headers and such in the response message without them // getting stomped. if (!msgContext.isPropertyTrue(CAUGHTFAULT_PROPERTY)) { // Attach the fault to the response message; enabling access to the // fault details while inside the handler onFault methods. Message respMsg = new Message(f); msgContext.setResponseMessage(respMsg); msgContext.setProperty(CAUGHTFAULT_PROPERTY, Boolean.TRUE); } while( --i >= 0 ) ((Handler) handlers.elementAt( i )).onFault( msgContext ); throw f; } }
private void doVisiting(MessageContext msgContext, HandlerIterationStrategy visitor) throws AxisFault { int i = 0 ; try { Enumeration enumeration = handlers.elements(); while (enumeration.hasMoreElements()) { Handler h = (Handler)enumeration.nextElement(); visitor.visit(h, msgContext); i++; } } catch( AxisFault f ) { // Something went wrong. If we haven't already put this fault // into the MessageContext's response message, do so and make sure // we only do it once. This allows onFault() methods to safely // set headers and such in the response message without them // getting stomped. if (!msgContext.isPropertyTrue(CAUGHTFAULT_PROPERTY)) { // Attach the fault to the response message; enabling access to the // fault details while inside the handler onFault methods. Message respMsg = new Message(f); msgContext.setResponseMessage(respMsg); msgContext.setProperty(CAUGHTFAULT_PROPERTY, Boolean.TRUE); } while( --i >= 0 ) ((Handler) handlers.elementAt( i )).onFault( msgContext ); throw f; } }
private void doVisiting(MessageContext msgContext, HandlerIterationStrategy visitor) throws AxisFault { int i = 0 ; try { Enumeration enumeration = handlers.elements(); while (enumeration.hasMoreElements()) { Handler h = (Handler)enumeration.nextElement(); visitor.visit(h, msgContext); i++; } } catch( AxisFault f ) { // Something went wrong. If we haven't already put this fault // into the MessageContext's response message, do so and make sure // we only do it once. This allows onFault() methods to safely // set headers and such in the response message without them // getting stomped. if (!msgContext.isPropertyTrue(CAUGHTFAULT_PROPERTY)) { // Attach the fault to the response message; enabling access to the // fault details while inside the handler onFault methods. Message respMsg = new Message(f); msgContext.setResponseMessage(respMsg); msgContext.setProperty(CAUGHTFAULT_PROPERTY, Boolean.TRUE); } while( --i >= 0 ) ((Handler) handlers.elementAt( i )).onFault( msgContext ); throw f; } }
@Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } // Catch any exception thrown and wrap it in an AxisFault, per the contract of Handler.invoke. try { HttpResponse response = null; // Create the request. HttpRequest postRequest = createHttpRequest(msgContext); // Execute the request. response = postRequest.execute(); // Translate the HTTP response to an Axis message on the message context. msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } }
@Override public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext == null) { throw AxisFault.makeFault(new NullPointerException("Null message context")); } // Catch any exception thrown and wrap it in an AxisFault, per the contract of Handler.invoke. try { HttpResponse response = null; // Create the request. HttpRequest postRequest = createHttpRequest(msgContext); // Execute the request. response = postRequest.execute(); // Translate the HTTP response to an Axis message on the message context. msgContext.setResponseMessage(createResponseMessage(response)); } catch (RuntimeException | SOAPException | IOException e) { throw AxisFault.makeFault(e); } }
msg = new Message( env ); msgContext.setResponseMessage( msg );
msg = new Message( env ); msgContext.setResponseMessage( msg );
msg = new Message( env ); msgContext.setResponseMessage( msg );
msgContext.setResponseMessage(outMsg); if (log.isDebugEnabled()) { log.debug("\n" + Messages.getMessage("xmlRecd00"));
byte[] response = endpoint.call(out.toByteArray(), timeout, props); Message msg = new Message(response); msgContext.setResponseMessage(msg);
byte[] response = endpoint.call(out.toByteArray(), timeout, props); Message msg = new Message(response); msgContext.setResponseMessage(msg);
public void createExceptionResult(final Throwable exception) { messageContext.setPastPivot(true); AxisFault axisFault = null; if (exception instanceof Exception) { axisFault = AxisFault.makeFault((Exception) exception); axisFault.setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); } else { axisFault = new AxisFault("Server", "Server Error", null, null); } final SOAPFault fault = new SOAPFault(axisFault); final SOAPEnvelope envelope = new SOAPEnvelope(); envelope.addBodyElement(fault); final Message message = new Message(envelope); message.setMessageType(Message.RESPONSE); messageContext.setResponseMessage(message); }
byte[] response = endpoint.call(out.toByteArray(), timeout, props); Message msg = new Message(response); msgContext.setResponseMessage(msg);
Message message = new Message(env); message.setMessageType(Message.RESPONSE); msgContext.setResponseMessage(message); throw AxisFault.makeFault(e);
Message message = new Message(env); message.setMessageType(Message.RESPONSE); msgContext.setResponseMessage(message); throw AxisFault.makeFault(e);
Message message = new Message(env); message.setMessageType(Message.RESPONSE); msgContext.setResponseMessage(message); throw AxisFault.makeFault(e);