Package xsul.wsif

Examples of xsul.wsif.WSIFOperation


    public WSIFMessage sendSOAPMessage(WSIFClient wclient, Object[][] args, String opName)
            throws ComponentRegistryException {

        WSIFPort port = wclient.getPort();

        WSIFOperation operation = port.createOperation(opName);
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();
        String messageName = operation.createInputMessage().getName();
        XmlElement inputMsgElem = builder.newFragment(this.requestNS, messageName);

        for (int i = 0; i < args.length; i++) {
            createMessage((String) args[i][0], args[i][1], inputMsgElem);
        }

        WSIFMessageElement inputMessage = new WSIFMessageElement(inputMsgElem);

        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
        if (success) {
            logger.info("" + outputMessage);
            return outputMessage;
        } else {
            throw new ComponentRegistryException("Excpetion at server " + faultMessage);
View Full Code Here


     * @throws XBayaException
     */
    public void shutdownService() throws XBayaException {
        WSIFService service = WSIFServiceFactory.newInstance().getService(this.serviceDefinitions);
        WSIFPort port = service.getPort();
        WSIFOperation operation = port.createOperation(SHUTDOWN_OPERATION);

        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
        if (!success) {
            // An implementation of WSIFMessage, WSIFMessageElement,
            // implements toString(), which serialize the message XML.
            String message = "Failed to shutdown the service: " + faultMessage.toString();
            throw new XBayaException(message);
View Full Code Here

        }
        this.client.useAsyncMessaging(correlator);
    }

     public boolean invoke() throws XBayaException {
         final WSIFOperation  operation = this.getOperation();
         final WSIFMessage inputMessage = this.getInputMessage();
         this.setOutputMessage(null);
        try {
              new Thread() {
                @Override
                public void run() {
                    try {
                        operation.executeInputOnlyOperation(inputMessage);
                    } catch (Exception e) {
                        // Ignore the error.
                        logger.error("Error invoking GFac Service",e);
                    }
                }
View Full Code Here

        wclient.addHandler(handler);
        wclient.useAsyncMessaging(correlator);
        wclient.setAsyncResponseTimeoutInMs(33000L);

        WSIFPort port = wclient.getPort();
        WSIFOperation operation = port.createOperation("Run");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        // inputMessage.setObjectPart("InputParam1", "Hello");
        inputMessage.setObjectPart("InputParam1", "100");

        logger.info("inputMessage: " + XsulUtil.safeXmlToString((XmlElement) inputMessage));
        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);

        XmlElement result;
        if (success) {
            result = (XmlElement) outputMessage;
        } else {
View Full Code Here

TOP

Related Classes of xsul.wsif.WSIFOperation

Copyright © 2018 www.massapicom. 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.