/** * Get the array of response header elements */ public SOAPHeaderElement[] getResponseHeaders() { SOAPHeaderElement[] array = new SOAPHeaderElement[0]; try { if (_call == null) return array; Vector h = _call.getResponseMessage().getSOAPEnvelope().getHeaders(); array = new SOAPHeaderElement[h.size()]; h.copyInto(array); return array; } catch (Exception e) { return array; } }
/** * Get the array of response header elements */ public SOAPHeaderElement[] getResponseHeaders() { SOAPHeaderElement[] array = new SOAPHeaderElement[0]; try { if (_call == null) return array; Vector h = _call.getResponseMessage().getSOAPEnvelope().getHeaders(); array = new SOAPHeaderElement[h.size()]; h.copyInto(array); return array; } catch (Exception e) { return array; } }
/** * Get the array of response header elements */ public SOAPHeaderElement[] getResponseHeaders() { SOAPHeaderElement[] array = new SOAPHeaderElement[0]; try { if (_call == null) return array; Vector h = _call.getResponseMessage().getSOAPEnvelope().getHeaders(); array = new SOAPHeaderElement[h.size()]; h.copyInto(array); return array; } catch (Exception e) { return array; } }
/** * Get a response header element */ public SOAPHeaderElement getResponseHeader(String namespace, String partName) { try { if (_call == null) return null; return _call.getResponseMessage().getSOAPEnvelope().getHeaderByName(namespace, partName); } catch (Exception e) { return null; } }
/** * Get a response header element */ public SOAPHeaderElement getResponseHeader(String namespace, String partName) { try { if (_call == null) return null; return _call.getResponseMessage().getSOAPEnvelope().getHeaderByName(namespace, partName); } catch (Exception e) { return null; } }
/** * Get a response header element */ public SOAPHeaderElement getResponseHeader(String namespace, String partName) { try { if (_call == null) return null; return _call.getResponseMessage().getSOAPEnvelope().getHeaderByName(namespace, partName); } catch (Exception e) { return null; } }
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"); }
/** * Extract ans store soap constants info from the envelope * @param msgContext * @throws AxisFault */ private void initSOAPConstants(MessageContext msgContext) throws AxisFault { Message msg = msgContext.getRequestMessage(); if (msg == null) return; SOAPEnvelope env = msg.getSOAPEnvelope(); if (env == null) return; SOAPConstants constants = env.getSOAPConstants(); if (constants == null) return; // Ensure that if we get SOAP1.2, then reply using SOAP1.2 msgContext.setSOAPConstants(constants); }
/** * Extract ans store soap constants info from the envelope * @param msgContext * @throws AxisFault */ private void initSOAPConstants(MessageContext msgContext) throws AxisFault { Message msg = msgContext.getRequestMessage(); if (msg == null) return; SOAPEnvelope env = msg.getSOAPEnvelope(); if (env == null) return; SOAPConstants constants = env.getSOAPConstants(); if (constants == null) return; // Ensure that if we get SOAP1.2, then reply using SOAP1.2 msgContext.setSOAPConstants(constants); }
/** * Method processClientResponse. * * @param ctx Context information * @throws Exception If an error occurs */ protected void processClientResponse(MessageContext ctx) throws Exception { // if no response - do nothing Message msg = ctx.getResponseMessage(); if (msg == null) { return; } AddressingHeaders headers = new AddressingHeaders( msg.getSOAPEnvelope(), this.actor, true, this.removeHeaders, false, this.allowNonSpecificActions, this.refPropQNames); ctx.setProperty(ENV_ADDRESSING_RESPONSE_HEADERS, headers); }
/** * Extract ans store soap constants info from the envelope * @param msgContext * @throws AxisFault */ private void initSOAPConstants(MessageContext msgContext) throws AxisFault { Message msg = msgContext.getRequestMessage(); if (msg == null) return; SOAPEnvelope env = msg.getSOAPEnvelope(); if (env == null) return; SOAPConstants constants = env.getSOAPConstants(); if (constants == null) return; // Ensure that if we get SOAP1.2, then reply using SOAP1.2 msgContext.setSOAPConstants(constants); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: DebugHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope message = (SOAPEnvelope)msg.getSOAPEnvelope(); SOAPHeaderElement header = message. getHeaderByName(NS_URI_DEBUG, "Debug"); if (header != null) { Integer i = ((Integer)header .getValueAsType(Constants.XSD_INT)); if (i == null) throw new AxisFault(Messages.getMessage("cantConvert03")); int debugVal = i.intValue(); log.debug(Messages.getMessage("debugLevel00", "" + debugVal) ); //Debug.setDebugLevel(debugVal); header.setProcessed(true); } } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: DebugHandler::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: DebugHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope message = (SOAPEnvelope)msg.getSOAPEnvelope(); SOAPHeaderElement header = message. getHeaderByName(NS_URI_DEBUG, "Debug"); if (header != null) { Integer i = ((Integer)header .getValueAsType(Constants.XSD_INT)); if (i == null) throw new AxisFault(Messages.getMessage("cantConvert03")); int debugVal = i.intValue(); log.debug(Messages.getMessage("debugLevel00", "" + debugVal) ); //Debug.setDebugLevel(debugVal); header.setProcessed(true); } } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: DebugHandler::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: DebugHandler::invoke"); try { Message msg = msgContext.getRequestMessage(); SOAPEnvelope message = (SOAPEnvelope)msg.getSOAPEnvelope(); SOAPHeaderElement header = message. getHeaderByName(NS_URI_DEBUG, "Debug"); if (header != null) { Integer i = ((Integer)header .getValueAsType(Constants.XSD_INT)); if (i == null) throw new AxisFault(Messages.getMessage("cantConvert03")); int debugVal = i.intValue(); log.debug(Messages.getMessage("debugLevel00", "" + debugVal) ); //Debug.setDebugLevel(debugVal); header.setProcessed(true); } } catch( Exception e ) { log.error( Messages.getMessage("exception00"), e ); throw AxisFault.makeFault(e); } log.debug("Exit: DebugHandler::invoke"); }
public void createResult(final Object object) { messageContext.setPastPivot(true); try { final Message requestMessage = messageContext.getRequestMessage(); final SOAPEnvelope requestEnvelope = requestMessage.getSOAPEnvelope(); final RPCElement requestBody = getBody(requestEnvelope, messageContext); final Message responseMessage = messageContext.getResponseMessage(); final SOAPEnvelope responseEnvelope = responseMessage.getSOAPEnvelope(); final ServiceDesc serviceDescription = messageContext.getService().getServiceDescription(); final RPCElement responseBody = createResponseBody(requestBody, messageContext, operation, serviceDescription, object, responseEnvelope, getInOutParams()); responseEnvelope.removeBody(); responseEnvelope.addBodyElement(responseBody); } catch (final Exception e) { throw new ServerRuntimeException("Failed while creating response message body", e); } }
public void invoke(MessageContext context) throws AxisFault { Message message = context.getRequestMessage(); SOAPEnvelope envelope = message.getSOAPEnvelope(); SOAPHeaderElement header = envelope.getHeaderByName(SOAPConstants.NAMESPACE_URI, SOAPConstants.CONNECTION_ID_HEADER_NAME); if (header == null) throw new AxisFault("Could not find mandatory header " + SOAPConstants.CONNECTION_ID_HEADER_NAME); try { String id = (String)header.getValueAsType(XMLType.XSD_STRING); if (id != null && id.length() > 0) context.setProperty(SOAPConstants.CONNECTION_ID_HEADER_NAME, id); } catch (Exception x) { throw AxisFault.makeFault(x); } finally { header.setProcessed(true); } } }
/** * @param pFacade */ protected void initFacade(IFacade pFacade) { if (pFacade instanceof ExtendedFacade) { try { // get envelope SOAPEnvelope lEnvelope = mCall.getMessageContext().getResponseMessage().getSOAPEnvelope(); // instantite tc record provider TcRecordProvider lRecordProvider = new TcRecordProvider(); // extract records lRecordProvider.extractTcRecord(lEnvelope); // update facade ((ExtendedFacade) pFacade).setTcRecords(lRecordProvider.getTcRecord()); // instantite fedcatinfo provider FederatedCatalogInfoProvider lInfoProvider = new FederatedCatalogInfoProvider(); // extract fedcatinfo lInfoProvider.extractFedCatInfo(lEnvelope); // update facade ((ExtendedFacade) pFacade).setFedCatInfo(lInfoProvider.getFederatedCatalogIDs()); } catch (AxisFault axisFault) { LOG.error("Error setting up the facade security information."); LOG.error("Reason: {}", axisFault.getFaultReason()); LOG.error("Fault string: {}", axisFault.getFaultString()); } catch (SOAPException e) { LOG.error("Error setting up the facade security information."); LOG.error("Reason: {}", e.getMessage()); } } }
return; SOAPEnvelope env = msg.getSOAPEnvelope(); if (env == null) { return;