private void importAppProperties(boolean request) {
    if (_bindingProvider == null) return;

    if (request) {
      _logicalContext.putAll(_bindingProvider.getRequestContext(), Scope.APPLICATION);
      _soapContext.putAll(_bindingProvider.getRequestContext(), Scope.APPLICATION);
    } else {
      _logicalContext.putAll(_bindingProvider.getResponseContext(), Scope.APPLICATION);
      _soapContext.putAll(_bindingProvider.getResponseContext(), Scope.APPLICATION);
    }
  }
  public void prepare(Map<String, Object> httpProperties, boolean request) {
    _logicalContext = new LogicalMessageContextImpl();
    _soapContext = new SOAPMessageContextImpl();
    _runtimeException = null;
    _protocolException = null;
    _request = request;

    _logicalContext.putAll(httpProperties);
    _soapContext.putAll(httpProperties);

    importAppProperties(request);
  }