Examples of WSIFService


Examples of org.apache.wsif.WSIFService

            // create a service factory
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();

            // parse WSDL
            WSIFService service =
                factory.getService(
                    args[0],
                    null,
                    null,
                    "http://xml.apache.org/axis/wsif/samples/jms/ServiceAvailability",
                    "CheckAvailabilityPortType");
            // create the stub
            CheckAvailabilityPortType stub =
                    (CheckAvailabilityPortType) service.getStub(
                        CheckAvailabilityPortType.class);

            // do the invocation
            // args[1] is the zip code
            String serviceAvailable = stub.checkAvailability(args[1]);
View Full Code Here

Examples of org.apache.wsif.WSIFService

      TestUtilities.getWsdlPath("java\\test\\stockquote\\wsifservice") + "StockQuote.wsdl";

    System.out.println("\n=== StockQuote");
    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(wsdlLocation,
          null, // serviceNS
        null, // serviceName
            "http://wsifservice.stockquote/", // portTypeNS
        portType); // portTypeName

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage context = operation.getContext();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    System.out.println("\n=== AddressBook_addEntry");

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(wsdlLocation,
          null, // serviceNS
        null, // serviceName
            "http://wsifservice.addressbook/", // portTypeNS
        portType); // portTypeName

      service.mapType(
         new javax.xml.namespace.QName("http://wsiftypes.addressbook/", "address"),
         Class.forName("addressbook.wsiftypes.Address"));

      service.mapType(
         new javax.xml.namespace.QName("http://wsiftypes.addressbook/", "phone"),
         Class.forName("addressbook.wsiftypes.Phone"));

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage input = operation.createInputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    System.out.println("\n=== AddressBook_getAddressFromName");

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(wsdlLocation,
          null, // serviceNS
        null, // serviceName
            "http://wsifservice.addressbook/", // portTypeNS
        portType); // portTypeName

      service.mapType(
         new javax.xml.namespace.QName("http://wsiftypes.addressbook/", "address"),
         Class.forName("addressbook.wsiftypes.Address"));

      service.mapType(
         new javax.xml.namespace.QName("http://wsiftypes.addressbook/", "phone"),
         Class.forName("addressbook.wsiftypes.Phone"));

      WSIFPort port = service.getPort(portName);

      // Executing synchronous executeRequestResponseOperation(input, output, fault )
      String inputMsgName = "GetAddressFromNameRequest";
      String outputMsgName = "GetAddressFromNameResponse";
      WSIFOperation operation =
View Full Code Here

Examples of org.apache.wsif.WSIFService

    }

    private void doIt(String wsdlLoc) {
        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory
                    .getService(wsdlLoc, this.getClass().getClassLoader(), null,
                                // serviceNS
                                null, // serviceName
                                "http://wsifservice.addressbook/", // portTypeNS
View Full Code Here

Examples of org.apache.wsif.WSIFService

    }

    private void doItError(String wsdlLoc) {
        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory
                    .getService(wsdlLoc, this.getClass().getClassLoader(), null,
                                // serviceNS
                                null, // serviceName
                               "http://wsifservice.addressbook/", // portTypeNS
View Full Code Here

Examples of org.apache.wsif.WSIFService

    static void doit(Locale name) {
        try {
            Locale.setDefault(name);
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory.getService(
                    wsdlLocation,
                    null,
                    null,
                    "http://wsifservice.stockquote/",
                    "StockquotePT");

            System.err.println("\nUsing locale '" + name + "'");
            StockquotePT stub =
                (StockquotePT) service.getStub(server+"Port", StockquotePT.class);

            float quote = stub.getQuote("");
            System.err.println(">> Received quote " + quote + " for ''");

        } catch (Exception e) {
View Full Code Here

Examples of org.apache.wsif.WSIFService

            new org.apache.wsif.providers.soap.apacheaxis
                .WSIFDynamicProvider_ApacheAxis());

        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory.getService(
                    wsdlPath + wsdl,
                    null,
                    null,
                    "http://mime/",
                    "Mime");

            // Many of the error tests are badly behaved and would
            // throw an exception here.
            Mime stub = null;
            if (!cmd.startsWith("BAD"))
                stub = (Mime) service.getStub(portName, Mime.class);

            if (cmd.equals(SEND_DH))
                send_dh(service,stub);
            else if (cmd.equals(RECEIVE_DH))
                receive_dh(service,stub);
View Full Code Here

Examples of org.apache.wsif.WSIFService

                provider);
        }

        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory.getService(
                    wsdlLocation,
                    null,
                    null,
                    "http://wsifservice.inout/",
                    "Inout");

            service.mapType(
                new QName("http://wsiftypes.inout/", "arrayofint"),
                Class.forName("[I"));

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

            if (cmd.equals(ADDRESS))
                address(stub);
            else if (cmd.equals(NULLNAME))
                nullname(stub);
View Full Code Here

Examples of org.apache.wsif.WSIFService

            // create a service factory
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();

            // parse WSDL
            WSIFService service =
                factory.getService(
                    args[0],
                    null,
                    null,
                    "http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/",
                    "net.xmethods.services.stockquote.StockQuotePortType");
            // create the stub
      // check if the user specified a preferred port
            NetXmethodsServicesStockquoteStockQuotePortType stub = null;
      stub = (NetXmethodsServicesStockquoteStockQuotePortType)
    service.getStub(NetXmethodsServicesStockquoteStockQuotePortType.class);

            // do the invocation
            // args[1] is the company symbol
            float quote = stub.getQuote(args[1]);
            System.out.println(quote);
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.