Examples of WSIFOperation


Examples of org.apache.wsif.WSIFOperation

    // Implementation methods
    //-------------------------------------------------------------------------
    protected void process(MessageExchange exchange, NormalizedMessage normalizedMessage) throws MessagingException {
        try {
            WSIFOperationInfo operationInfo = operationMap.getOperationForExchange(exchange);
            WSIFOperation operation = operationInfo.getWsifOperation();
            WSIFMessage message = operation.createInputMessage();
            marshaler.fromNMS(operationInfo, message, normalizedMessage, getBody(normalizedMessage));
            operation.executeInputOnlyOperation(message);
            done(exchange);
        }
        catch (WSIFException e) {
            exchange.setError(e);
            exchange.setStatus(ExchangeStatus.ERROR);
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

    //-------------------------------------------------------------------------
    protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws MessagingException {
        try {
            WSIFOperationInfo operationInfo = operationMap.getOperationForExchange(exchange);

            WSIFOperation operation = operationInfo.getWsifOperation();
            WSIFMessage inMessage = operation.createInputMessage();
            Object body = getBody(in);
            marshaler.fromNMS(operationInfo, inMessage, in, body);

            WSIFMessage outMessage = operation.createInputMessage();
            WSIFMessage faultMessage = operation.createInputMessage();
            boolean answer = operation.executeRequestResponseOperation(inMessage, outMessage, faultMessage);
            if (answer) {
                marshaler.toNMS(exchange, out, operationInfo, outMessage);
            }
            else {
                Fault fault = exchange.createFault();
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

    }

    public WSIFOperation createOperation(String operationName)
        throws WSIFException {
        Trc.entry(this, operationName);
        WSIFOperation wo = createOperation(operationName, null, null);
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

                    + ":"
                    + inputName
                    + ":"
                    + outputName);
        }
        WSIFOperation wo = op.copy();
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

    }

    public WSIFOperation createOperation(String operationName)
        throws WSIFException {
        Trc.entry(this);
        WSIFOperation wo = createOperation(operationName, null, null);
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

                    + ":"
                    + inputName
                    + ":"
                    + outputName);
        }
        WSIFOperation wo = op.copy();
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

     * @see WSIFPort#createOperation(String)
     */
    public WSIFOperation createOperation(String operationName)
        throws WSIFException {
        Trc.entry(this, operationName);
        WSIFOperation wo = createOperation(operationName, null, null);
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

                    + ":"
                    + inputName
                    + ":"
                    + outputName);
        }
        WSIFOperation wo = op.copy();
        Trc.exit(wo);
        return wo;
    }
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

        String inputName = (input == null) ? null : input.getName();
        String outputName = (output == null) ? null : output.getName();
        Message inputMessage = (input == null) ? null : input.getMessage();
        Message outputMessage = (output == null) ? null : output.getMessage();

        WSIFOperation wsifOperation =
            wsifport.createOperation(method.getName(), inputName, outputName);

        // make the msg names for compiled msgs xxxAnt ask Mark why diff from inputName
        String inputMsgName = "";
        if (input != null) {
            Message m = input.getMessage();
            if (m != null) {
                QName qn = m.getQName();
                inputMsgName = (qn == null) ? "" : qn.getLocalPart();
            }
        }

        String outputMsgName = "";
        if (output != null) {
            Message m = output.getMessage();
            if (m != null) {
                QName qn = m.getQName();
                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();
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

    try {
      WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);

      WSIFPort port = portFactory.getPort();

      WSIFOperation operation = port.createOperation(GET_PORTTYPES_OPERATION);
      WSIFMessage inputMessage = operation.createInputMessage();
      WSIFMessage outputMessage = operation.createOutputMessage();
      inputMessage.setObjectPart(QUERY_STRING_PART, queryString);

      operation.executeRequestResponseOperation(inputMessage, outputMessage, null);

      PortTypeArray portTypeArray = (PortTypeArray) outputMessage.getObjectPart(RESULT_PART);

      port.close();
      return portTypeArray;
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.