Package org.apache.wsif

Examples of org.apache.wsif.WSIFOperation.executeRequestResponseOperation()


       if ( name != null ) {
          inputMessage.setObjectPart( "name", name );
       }
       inputMessage.setObjectPart( "extra", "junk" );

       boolean ok = operation.executeRequestResponseOperation(
          inputMessage,
          outputMessage,
          faultMessage);

       assertTrue( "getAddressFromName operation returned false!!", ok );
View Full Code Here


            WSIFOperation op1 = port.createOperation("getQuote", inputName, outputName);
            WSIFMessage input1 = op1.createInputMessage();
            WSIFMessage output1 = op1.createOutputMessage();
            WSIFMessage fault1 = op1.createFaultMessage();
            input1.setObjectPart("symbol", "");
            boolean ok = op1.executeRequestResponseOperation(input1, output1, fault1);

            assertEquals("ok getQuote response", true, ok);
            float q1 = ((Float) output1.getObjectPart("quote")).floatValue();
            assertEquals("getQuote value", -1.0F, q1, 0F);
View Full Code Here

            op1 = port.createOperation("XXXgetQuote", inputName, outputName);
            input1 = op1.createInputMessage();
            output1 = op1.createOutputMessage();
            fault1 = op1.createFaultMessage();
            input1.setObjectPart("symbol", "");
            ok = op1.executeRequestResponseOperation(input1, output1, fault1);

            assertEquals("ok getQuote response", false, ok);
            String name = fault1.getName();
            Object fobject = fault1.getObjectPart(WSIFConstants.SOAP_FAULT_OBJECT);
View Full Code Here

            inputMessage.setObjectPart("name", nameToAdd);
            inputMessage.setObjectPart("address", addressToAdd);

            // Execute the operation, obtaining a flag to indicate its success
            boolean ok=
                operation.executeRequestResponseOperation(
                    inputMessage,
                    outputMessage,
                    faultMessage);

            assertTrue( "failed to add name and address!!", ok );
View Full Code Here

         inputMessage.setObjectPart("name", nameToAdd);

               Monitor.start( testName );
         boolean operationSucceeded =
          operation.executeRequestResponseOperation(
           inputMessage,
           outputMessage,
           faultMessage);
               Monitor.stop( testName );
         if (!operationSucceeded) {
View Full Code Here

        WSIFMessage in = op.createInputMessage();
        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setObjectPart("file",dh1);

        boolean success = op.executeRequestResponseOperation(in,out,fault);
        assertTrue(success);

        DataHandler dh2 = (DataHandler)(out.getObjectPart("file2"));

//        This commented out code displays the image, so proving that the
View Full Code Here

        // populate the input message
        input.setObjectPart("zipcode", args[1]);
        input.setObjectPart("LicenseKey", "");

        // do the invocation
        if (operation.executeRequestResponseOperation(input, output, fault)) {
            // invocation succeeded, extract information from output
            // message
            LatLongReturn zipInfo =
                (LatLongReturn) output.getObjectPart("GetLatLongResult");
            System.out.println(
View Full Code Here

        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setBooleanPart("shouldBounce",true);
        in.setObjectPart("file",dh);

        boolean success = op.executeRequestResponseOperation(in,out,fault);
        assertTrue(success);

        String s = (String)(out.getObjectPart("buff"));
        assertTrue("1".equals(s));
    }
View Full Code Here

        WSIFMessage in = op.createInputMessage();
        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setObjectPart("file",dh);

        boolean success = op.executeRequestResponseOperation(in,out,fault);
        assertTrue(success);

        String s = (String)(out.getObjectPart("buff"));
        assertTrue("2".equals(s));
    }
View Full Code Here

        WSIFMessage outputMessage = operation.createOutputMessage();

        inputMessage.setObjectPart("inputString", argInputString);

        operation.executeRequestResponseOperation(inputMessage, outputMessage, null);

        port.close();

        return (java.lang.String) outputMessage.getObjectPart("return");
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.