Package org.apache.wsif

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


    private void addName(WSIFPort port, String name, Address addr)
       throws WSIFException {
        
       WSIFOperation operation =
          port.createOperation("addEntry", "AddEntryWholeNameRequest", null);
       WSIFMessage inputMessage = operation.createInputMessage();
       WSIFMessage outputMessage = operation.createOutputMessage();
       WSIFMessage faultMessage = operation.createFaultMessage();

       if ( name != null ) {
          inputMessage.setObjectPart( "name", name );
View Full Code Here


   
    private Address getAddress(WSIFPort port, String name)
       throws WSIFException {

       WSIFOperation operation = port.createOperation("getAddressFromName");
       WSIFMessage inputMessage = operation.createInputMessage();
       WSIFMessage outputMessage = operation.createOutputMessage();
       WSIFMessage faultMessage = operation.createFaultMessage();

       if ( name != null ) {
          inputMessage.setObjectPart( "name", name );
View Full Code Here

            WSIFService dpf = factory.getService(def, service, portType);
            WSIFPort port = (portName == null) ? dpf.getPort() : dpf.getPort(portName);

            // 1st a call that should work
            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);
View Full Code Here

            float q1 = ((Float) output1.getObjectPart("quote")).floatValue();
            assertEquals("getQuote value", -1.0F, q1, 0F);

            // now a call that is defined in WSDL but not on server
            op1 = port.createOperation("XXXgetQuote", inputName, outputName);
            input1 = op1.createInputMessage();
            output1 = op1.createOutputMessage();
            fault1 = op1.createFaultMessage();
            input1.setObjectPart("symbol", "");
            ok = op1.executeRequestResponseOperation(input1, output1, fault1);
View Full Code Here

            }

            WSIFOperation operation =
                port.createOperation("addEntry", "AddEntryWholeNameRequest", null);

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

            // Create a name and address to add to the addressbook
            String nameToAdd = "Chris P. Bacon";
View Full Code Here

            testName = testNamePrefix + ".executeOperation";
            iterations = (TEST_EXECOP)? getIterations( testName ) : 1;
            System.out.println( "running " + iterations + " " + testName + " iterations..." );
            for (int i = 0; i < iterations; i++ ) {
         operation = port.createOperation("getAddressFromName");
         inputMessage = operation.createInputMessage();
         outputMessage = operation.createOutputMessage();
         faultMessage = operation.createFaultMessage();

         inputMessage.setObjectPart("name", nameToAdd);
View Full Code Here

        throws Exception {
        DataHandler dh1 = new DataHandler(new FileDataSource(imageLocation));

        WSIFPort port = service.getPort(portName);
        WSIFOperation op = port.createOperation("bounceImage2");
        WSIFMessage in = op.createInputMessage();
        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setObjectPart("file",dh1);

        boolean success = op.executeRequestResponseOperation(in,out,fault);
View Full Code Here

    private void soap_body_parts1(WSIFService service, Mime stub)
        throws Exception {
        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
        WSIFPort port = service.getPort(portName);
        WSIFOperation op = port.createOperation("soapBodyParts1");
        WSIFMessage in = op.createInputMessage();
        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setBooleanPart("shouldBounce",true);
        in.setObjectPart("file",dh);
View Full Code Here

        // create the operation
        WSIFOperation operation = port.createOperation("GetLatLong");

        // create the input, output and fault messages associated with this operation
        WSIFMessage input = operation.createInputMessage();
        WSIFMessage output = operation.createOutputMessage();
        WSIFMessage fault = operation.createFaultMessage();

        // populate the input message
        input.setObjectPart("zipcode", args[1]);
View Full Code Here

    private void soap_body_parts2(WSIFService service, Mime stub)
        throws Exception {
        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
        WSIFPort port = service.getPort(portName);
        WSIFOperation op = port.createOperation("soapBodyParts2");
        WSIFMessage in = op.createInputMessage();
        WSIFMessage out = op.createOutputMessage();
        WSIFMessage fault = op.createFaultMessage();
        in.setObjectPart("file",dh);

        boolean success = op.executeRequestResponseOperation(in,out,fault);
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.