Examples of WSIFMessage


Examples of org.apache.wsif.WSIFMessage

                   "http://soapinterop.org/",
                   "ChildDocument"),
               ChildDocument.class );

            // force to use a 'wrapped' type operation
            WSIFMessage context = service.getContext();
            context.setObjectPart(WSIFConstants.CONTEXT_OPERATION_STYLE, WSIFConstants.CONTEXT_OPERATION_STYLE_WRAPPED);
            service.setContext(context);

            Doc_TestPortType stub = (Doc_TestPortType) service.getStub(portName, Doc_TestPortType.class);

            ComplexDocument_Type cdt = makeComplexDocument();
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

            else
                port = fieldService.getPort();

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

            WSIFMessage inputMessage = operation.createInputMessage();
            inputMessage.setName("ShortZipCodeSoapIn");

            WSIFMessage outputMessage = operation.createOutputMessage();
            outputMessage.setName("ShortZipCodeSoapOut");

            inputMessage.setObjectPart("parameters", input);

            operation.executeRequestResponseOperation(inputMessage, outputMessage, null);

            return (ShortZipCodeResponse) outputMessage.getObjectPart("parameters");

        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

      WSIFPort port = service.getPort(portName);

      // Executing synchronous executeRequestResponseOperation(input, output, fault )
      WSIFOperation operation = port.createOperation(operationName);

      WSIFMessage context = operation.getContext();
      context.setObjectPart( WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
                             TestUtilities.getWsifProperty("wsif.nativejms.responseq") );
      operation.setContext( context );

      WSIFMessage input = operation.createInputMessage();
      input.setName("GetQuoteInput");
      input.setObjectPart("symbol", "" );

      WSIFMessage output = operation.createOutputMessage();
      WSIFMessage fault = operation.createFaultMessage();

      doSyncOp( operation, input, output, context );
      float value = ((Float)output.getObjectPart( "quote" )).floatValue();
      System.out.println("sync stockquote found value = " + value);
      assertTrue( "doSyncOp stockquote value incorrect!",
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage input = operation.createInputMessage();
      input.setObjectPart("name", name1);
      input.setObjectPart("address", addr1);

      operation.executeInputOnlyOperation(input);

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

      String inputMsgName = "GetAddressFromNameRequest";
      String outputMsgName = "GetAddressFromNameResponse";
      WSIFOperation operation =
        port.createOperation(operationName, inputMsgName, outputMsgName);

      WSIFMessage context = operation.getContext();
      context.setObjectPart( WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
                             TestUtilities.getWsifProperty("wsif.nativejms.responseq") );
      operation.setContext( context );
   
      WSIFMessage input = operation.createInputMessage();
      input.setObjectPart("name", name1);

      WSIFMessage output = operation.createOutputMessage();
      WSIFMessage fault = operation.createFaultMessage();

      doSyncOp( operation, input, output, context );
     
      Address addressResponse = (Address) output.getObjectPart("address");
      System.out.println("Found address = " + addressResponse);
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

  private void doSyncOp(WSIFOperation op,
                                WSIFMessage input, WSIFMessage output, WSIFMessage context) {
      try {
         op.setContext( context );
         WSIFMessage fault = op.createFaultMessage();
         boolean ok = op.executeRequestResponseOperation(input, output, fault );
         assertTrue( "executeRequestResponseOperation returned false!", ok );
      } catch (Exception ex) {
          ex.printStackTrace();
       assertTrue( "exception executing request: " + ex.getMessage(), false );
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

      assertTrue( "no response to async operation!", i > 0 ); // no responses in time
      return handler.getOutputs()[0];
  }

  private WSIFMessage doAsyncOpNoHandler(WSIFOperation op, WSIFMessage input, WSIFMessage context) {
      WSIFMessage output = null;
      try {
         context.setObjectPart( WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
                                TestUtilities.getWsifProperty("wsif.async.replytoq2") );
         context.setObjectPart( "testJMSnoHandler", "true" );
         op.setContext( context );
         WSIFCorrelationId id = op.executeRequestResponseAsync( input );
         System.out.println( "async operation done, correlation id=" + id.getCorrelationId() );
        
        Object jmsResponse =
            TestUtilities.getJMSAsyncResponse(
                id.getCorrelationId(),
                TestUtilities.getWsifProperty("wsif.async.replytoq2"));

         output = op.createOutputMessage();
         WSIFMessage fault = op.createFaultMessage();
         op.processAsyncResponse( jmsResponse, output, fault );
      } catch (Exception ex) {
       ex.printStackTrace();
       assertTrue( "exception executing async op: " + ex.getMessage(), false );
      }
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

        WSIFService service = factory.getService(wsdl, null, null, null, null);

        WSIFPort port = service.getPort();

        WSIFOperation operation;
        WSIFMessage inputMessage;
        WSIFMessage outputMessage;
        WSIFMessage faultMessage;

        String tempString;

        Object part;
        boolean operationSucceeded;
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

        WSIFPort port = (portName == null) ? dpf.getPort() : dpf.getPort(portName);

        System.out.println("HeadersTest executing getQuote for \"\"" + operationName);
        WSIFOperation operation =
            port.createOperation("getQuote", inputName, outputName);
        WSIFMessage input = operation.createInputMessage();
        WSIFMessage output = operation.createOutputMessage();
        WSIFMessage fault = operation.createFaultMessage();
        input.setObjectPart("symbol", "");

        // set a basic authentication header
        WSIFMessage headers = operation.getContext();
        headers.setObjectPart(WSIFConstants.CONTEXT_HTTP_USER, "petra");
        headers.setObjectPart(WSIFConstants.CONTEXT_HTTP_PSWD, "washere");
        operation.setContext(headers);

        boolean ok = operation.executeRequestResponseOperation(input, output, fault);
        System.out.println("operation returned " + ok);
View Full Code Here

Examples of org.apache.wsif.WSIFMessage

                    "JmsFault");

            WSIFPort port = service.getPort("default");
            WSIFOperation operation = port.createOperation(method);

            WSIFMessage inputMessage = operation.createInputMessage();
            inputMessage.setIntPart("choice",choice);
            WSIFMessage outputMessage = operation.createOutputMessage();
            WSIFMessage faultMessage = operation.createFaultMessage();

            boolean operationSucceeded = false;
            if (blocks == SYNC) {
                operationSucceeded =
                    operation.executeRequestResponseOperation(
                        inputMessage,
                        outputMessage,
                        faultMessage);

            } else if (blocks == ASYNC) {
                WSIFMessage context = operation.getContext();
                context.setObjectPart(
                    WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
                    TestUtilities.getWsifProperty("wsif.async.replytoq2"));
                operation.setContext(context);

                WSIFCorrelationId id =
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.