Examples of WSIFMessage


Examples of org.apache.wsif.WSIFMessage

    /**
     * Gets the context information for this binding.
     */
    public WSIFMessage getContext() throws WSIFException {
        Trc.entry(this);
      WSIFMessage contextCopy;
      try {
          if (this.context == null) {
            contextCopy = (WSIFMessage) getWSIFPort().getContext().clone();
          } else {
          contextCopy = (WSIFMessage) this.context.clone();
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

  public void fireAsyncResponse(Object response) throws WSIFException {
    Trc.entry(this, response);

    Object result = deserialiseResponseObject(response);

    WSIFMessage outMsg = createOutputMessage();
    WSIFMessage faultMsg = createFaultMessage();
    buildResponseMessages(result, outMsg, faultMsg);

    getResponseHandler().executeAsyncResponse(outMsg, faultMsg);

    Trc.exit(outMsg);
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

  private boolean isInputMessageUnWrapped(WSIFMessage msg) {
    boolean unWrapped = true;

        Object style = null;
        try {
            WSIFMessage context = getContext();
          style = context.getObjectPart(WSIFConstants.CONTEXT_OPERATION_STYLE);
        } catch (WSIFException e) {
            Trc.ignoredException(e);
        }
        if (WSIFConstants.CONTEXT_OPERATION_STYLE_WRAPPED.equals(style)) {
             unWrapped = true;
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

    if (inputNamespace == null || inputNamespace.length() < 1) {
        this.inputNamespace = getTargetNamespaceURI();
    }

      TypeMapping tm = call.getTypeMapping();
      WSIFMessage context = getContext();
     
      // register any default type mappings     
      registerDefaultTypeMappings(tm, context);
     
      // register any mappings from WSIFService.mapType calls
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

   */
  private void setDestinationContext(WSIFJMSDestination dest) throws WSIFException {
    if (dest == null) {
      return;
    }
    WSIFMessage context = getContext();
    HashMap jmsProps = new HashMap();
    for (Iterator i = context.getPartNames(); i.hasNext();) {
      String partName = (String) i.next();
      try {
        Object value = context.getObjectPart(partName);
        if (!timeoutProperty(dest, partName, value)) {
          if (partName
            .startsWith(WSIFConstants.CONTEXT_JMS_PREFIX)) {
            String propertyName =
              partName.substring(
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

   * Call object prior to invoke method being issued.
   */
  private void setCallContext(Call call) throws WSIFException {
    Object o;
    String name;
    WSIFMessage context = getContext();

    name = WSIFConstants.CONTEXT_HTTP_USER;
    try {
      o = context.getObjectPart(name);
      if (o instanceof String) {
        addHTTPHeader(call, name, (String) o);
      }
    } catch (WSIFException ex) {
      Trc.ignoredException(ex);
    }

    name = WSIFConstants.CONTEXT_HTTP_PSWD;
    try {
      o = context.getObjectPart(name);
      if (o instanceof String) {
        addHTTPHeader(call, name, (String) o);
      }
    } catch (WSIFException ex) {
      Trc.ignoredException(ex);
    }

    try {
      name = WSIFConstants.CONTEXT_REQUEST_SOAP_HEADERS;
      o = context.getObjectPart(name);
      if (o instanceof List) {
        addSOAPHeader(call, name, (List) o);
      }
    } catch (WSIFException ex) {
      Trc.ignoredException(ex);
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

                } else {
                  Trc.event("unexpected response SOAP header type: ", o);
                }
            }
            if (headers.size() > 0) {
                WSIFMessage context = getContext();
                context.setObjectPart(
                    WSIFConstants.CONTEXT_RESPONSE_SOAP_HEADERS,
                    headers);
                setContext(context);
            }
        }
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

                        JMSFaultIndicator indic = (JMSFaultIndicator) bndFElem;

                        // Only the first fault indicator that matches is used.
                        // If others match, then this error is ignored.
                        if (matchesFaultIndicator(indic, out)) {
                            WSIFMessage msg =
                                unformatFaultMessage(
                                    out,
                                    binding,
                                    bop,
                                    bndFName,
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

                outputMsgName = (qn == null) ? "" : qn.getLocalPart();
            }
        }

        // There must be an inputMessage.
        WSIFMessage wsifInputMessage =
            wsifOperation.createInputMessage(inputMsgName);

        // There may not be an output message.
        WSIFMessage wsifOutputMessage = null;
        WSIFMessage wsifFaultMessage = null;
        if (output != null) {
            wsifOutputMessage = wsifOperation.createOutputMessage(inputMsgName);
            wsifFaultMessage = wsifOperation.createFaultMessage(inputMsgName);
        }

        List inputParts = (inputMessage == null)
           ? new ArrayList()
           : inputMessage.getOrderedParts(null);
        if (args != null) {
          if (inputParts.size() != args.length) {
                unWrapIfWrappedDocLit(inputParts, operation.getName());
            }
            Iterator partIt = inputParts.iterator();
            for (int argIndex = 0; partIt.hasNext(); argIndex++) {
                Part part = (Part) partIt.next();
                String partName;
                if (isWrappedInContext()) {
                    QName qn = part.getElementName();
                    partName = (qn == null) ? "" : qn.getLocalPart();
                } else {
                    partName = part.getName();
                }
                wsifInputMessage.setObjectPart(partName, args[argIndex]);
            }
        }

        if (output == null)
            wsifOperation.executeInputOnlyOperation(wsifInputMessage);
        else {
            boolean success =
                wsifOperation.executeRequestResponseOperation(
                    wsifInputMessage,
                    wsifOutputMessage,
                    wsifFaultMessage);
            if (!success) {
                StringBuffer sb = new StringBuffer();
                Iterator it = wsifFaultMessage.getPartNames();
                while (it.hasNext()) {
                    String name = (String) it.next();
                    sb.append(name).append(":").append(
                        wsifFaultMessage.getObjectPart(name)).append(
                        " ");
                }
                throw new WSIFException(sb.toString());
            }
        }
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

      parts.addAll(unWrappedParts);
    }
  }
 
  private boolean isWrappedInContext() throws WSIFException {
        WSIFMessage context = wsifport.getContext();
        String style = null;
        try {
            style =
                (String) context.getObjectPart(
                    WSIFConstants.CONTEXT_OPERATION_STYLE);
        } catch (WSIFException e) {
          Trc.ignoredException(e);
        }
        boolean wrappedInContext;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.