Package org.apache.wsif

Examples of org.apache.wsif.WSIFMessage


            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "currency"),
               Currency.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);

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();
     
      boolean ok =
        operation.executeRequestResponseOperation(
          inMsg,
          outMsg,
View Full Code Here


          null,
          "http/www.pointwsp.net/ws/finance",
          "pwspNoCentrbankCurRatesSoap");

            // 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);

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

            Object o = stub.GetRatesXML();
View Full Code Here

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();
     
      String inputDocument =
        "<GetRatesXML xmlns=\"http/www.pointwsp.net/ws/finance\"/>";

      DOMParser parser = new DOMParser();
View Full Code Here

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

      // Create the messages
      WSIFMessage inputMessage = operation.createInputMessage();
      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();

      // Set the name to find in the addressbook
      String nameToLookup = "Chris P. Bacon";
      inputMessage.setObjectPart("name", nameToLookup);

      if ("SOAPJMSPort2".equals(portName)
        || "NativeJmsPort2".equals(portName)) {
        inputMessage.setObjectPart("syncTimeout", "" + sps2);
      }
      if ("SOAPJMSPort3".equals(portName)
        || "NativeJmsPort3".equals(portName)
        || "SOAPJMSPort6".equals(portName)
        || "NativeJmsPort6".equals(portName)) {
        WSIFMessage context = operation.getContext();
        context.setObjectPart(
          WSIFConstants.WSIF_PROP_SYNC_TIMEOUT,
          "" + sps3);
        operation.setContext(context);
      }
View Full Code Here

      WSIFOperation op = port.createOperation("getAddressFromName");

      AsyncResponseHandler abHandler = new AsyncResponseHandler(1);
      // 1 async call

      WSIFMessage inMsg = op.createInputMessage();
      inMsg.setObjectPart("name", "fred");

      WSIFMessage outmsg = op.createOutputMessage();
      WSIFMessage faultMsg = op.createFaultMessage();

      WSIFMessage context = op.getContext();
      context.setObjectPart(
        WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
        TestUtilities.getWsifProperty("wsif.async.replytoq"));

      if ("SOAPJMSPort2".equals(portName)
        || "NativeJmsPort2".equals(portName)) {
        inMsg.setObjectPart("asyncTimeout", "" + spa2);
      }
      if ("SOAPJMSPort3".equals(portName)
        || "NativeJmsPort3".equals(portName)
        || "SOAPJMSPort6".equals(portName)
        || "NativeJmsPort6".equals(portName)) {
        context.setObjectPart(
          WSIFConstants.WSIF_PROP_ASYNC_TIMEOUT,
          "" + spa3);
      }

      op.setContext(context);
View Full Code Here

                    "http://mime/",
                    "Mime");

      WSIFPort port = service.getPort(portName);
      WSIFOperation operation = port.createOperation("stringToDataHandler");
      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();

            String content = "The owl and the pussy cat went to sea in a beautiful pea-green boat,";

            String inputDoc =
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

                    "http://mime/",
                    "Mime");

      WSIFPort port = service.getPort(portName);
      WSIFOperation operation = port.createOperation("bounceImage4");
      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();

            String inputDoc =
                  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                  "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
                  " <soapenv:Body>" +
View Full Code Here

      // create the operation
      // note that we have two operations with the same name, so we need to specify the
      // name of the input and output messages as well
      WSIFOperation operation = port.createOperation("addEntry","AddEntryWholeNameRequest",null);
      // create the input message associated with this operation
      WSIFMessage input = operation.createInputMessage();
      // populate the input message
      input.setObjectPart("name","John Smith");
      // create an address object to populate the input
      Address address = new Address();
      address.setStreetNum(25);
      address.setStreetName("Willow Road");
      address.setCity("MyTown");
      address.setState("PA");
      address.setZip(28382);
      Phone phone = new Phone();
      phone.setAreaCode(288);
      phone.setExchange("555");
      phone.setNumber("9891");
      address.setPhoneNumber(phone);
      input.setObjectPart("address",address);
      // do the invocation
      System.out.println("Adding address for John Smith...");
      operation.executeInputOnlyOperation(input);
  } catch (WSIFException we) {
      System.out.println("Got exception from WSIF, details:");
View Full Code Here

      // create the operation
      // note that we have two operations with the same name, so we need to specify the
      // name of the input and output messages as well
      WSIFOperation operation = port.createOperation("addEntry","AddEntryFirstAndLastNamesRequest",null);
      // create the input message associated with this operation
      WSIFMessage input = operation.createInputMessage();
      // populate the input message
      input.setObjectPart("firstName","Jane");
      input.setObjectPart("lastName","White");
      // create an address object to populate the input
      Address address = new Address();
      address.setStreetNum(20);
      address.setStreetName("Peachtree Avenue");
      address.setCity("Atlanta");
      address.setState("GA");
      address.setZip(39892);
      Phone phone = new Phone();
      phone.setAreaCode(701);
      phone.setExchange("555");
      phone.setNumber("8721");
      address.setPhoneNumber(phone);
      input.setObjectPart("address",address);
      // do the invocation
      System.out.println("Adding address for Jane White...");
      operation.executeInputOnlyOperation(input);
  } catch (WSIFException we) {
      System.out.println("Got exception from WSIF, details:");
View Full Code Here

    private static void queryAddresses(WSIFPort port) {
  try {
      // create the operation
      WSIFOperation operation = port.createOperation("getAddressFromName");
      // create the input message associated with this operation
      WSIFMessage input = operation.createInputMessage();
      WSIFMessage output = operation.createOutputMessage();
      WSIFMessage fault = operation.createFaultMessage();
      // populate the input message
      input.setObjectPart("name","John Smith");
      // do the invocation
      System.out.println("Querying address for John Smith...");
      if (operation.executeRequestResponseOperation(input,output,fault)) {
View Full Code Here

TOP

Related Classes of org.apache.wsif.WSIFMessage

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.