Examples of WSIFOperation


Examples of org.apache.wsif.WSIFOperation

  public ImportDefinition getDefinition(PortTypeSelection portTypeSelection) throws WSIFException {
    try {
      WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);
      WSIFPort port = portFactory.getPort();

      WSIFOperation operation = port.createOperation(GET_DEFINITION_OPERATION);
      WSIFMessage inputMessage = operation.createInputMessage();
      WSIFMessage outputMessage = operation.createOutputMessage();

      inputMessage.setObjectPart(PORT_TYPE_SELECTION_PART, portTypeSelection);

      operation.executeRequestResponseOperation(inputMessage, outputMessage, null);

      ImportDefinition importDefinition = (ImportDefinition) outputMessage.getObjectPart(RESULT_PART);
      port.close();

      return importDefinition;
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

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

      WSIFPort port = portFactory.getPort();

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

      operation.executeRequestResponseOperation(inputMessage, outputMessage, null);

      byte[] byteArray = (byte[]) outputMessage.getObjectPart(RESULT_PART);

      port.close();
      return byteArray;
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

   * @throws WSIFException  if there is an exception creating the 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

    }

    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

                   "SingleTag"),
               SingleTag_Type.class );

      WSIFPort port = service.getPort(portName);

      WSIFOperation operation = port.createOperation("SingleTag");

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();

            SingleTag_Type stt = new SingleTag_Type();
      inMsg.setObjectPart("SingleTag", stt);

      boolean ok =
        operation.executeRequestResponseOperation(
          inMsg,
          outMsg,
          faultMsg);

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

Examples of org.apache.wsif.WSIFOperation

                   "SimpleDocument"),
               SimpleDocument_Type.class );

      WSIFPort port = service.getPort(portName);

      WSIFOperation operation = port.createOperation("SimpleDocument");

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();

            SimpleDocument_Type sdt = new SimpleDocument_Type();
            sdt.setValue("petra");
      inMsg.setObjectPart("SimpleDocument", sdt);

      boolean ok =
        operation.executeRequestResponseOperation(
          inMsg,
          outMsg,
          faultMsg);

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

Examples of org.apache.wsif.WSIFOperation

                   "ChildDocument"),
               ChildDocument.class );

      WSIFPort port = service.getPort(portName);

      WSIFOperation operation = port.createOperation("ComplexDocument");

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();

            ComplexDocument_Type cdt = makeComplexDocument();
            checkComplexDocument(cdt);

      inMsg.setObjectPart("ComplexDocument", cdt);

      boolean ok =
        operation.executeRequestResponseOperation(
          inMsg,
          outMsg,
          faultMsg);

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

Examples of org.apache.wsif.WSIFOperation

            if (portName != null)
                port = fieldService.getPort(portName);
            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();
View Full Code Here

Examples of org.apache.wsif.WSIFOperation

        portType); // portTypeName

      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!",
                  value == -1.0F );

      // Executing executeRequestResponseAsync(input, handler)
      operation = port.createOperation(operationName);

      operation.setContext( context );

      input = operation.createInputMessage();
      input.setName("GetQuoteInput");
      input.setObjectPart("symbol", "" );
     
      output = doAsyncOp( operation, input, context );
      value = ((Float)output.getObjectPart( "quote" )).floatValue();
      System.out.println("async stockquote found value = " + value);
      assertTrue( "doAsyncOp stockquote value incorrect!",
                  value == -1.0F );

      // Executing executeRequestResponseAsync(input)
      operation = port.createOperation(operationName);

      operation.setContext( context );

      input = operation.createInputMessage();
      input.setName("GetQuoteInput");
      input.setObjectPart("symbol", "" );
     
      output = doAsyncOpNoHandler( operation, input, context );
      value = ((Float)output.getObjectPart( "quote" )).floatValue();
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.