Examples of WSIFService


Examples of org.apache.wsif.WSIFService

            WSIFPluggableProviders.overrideDefaultProvider(
                "http://schemas.xmlsoap.org/wsdl/soap/",
                new WSIFDynamicProvider_ApacheAxis());

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service = factory.getService(wsdlLocation, null, // serviceNS
        null, // serviceName
        "http://wsifservice.stockquote/", // portTypeNS
    "StockquotePT"); // portTypeName

        StockquotePT stub = null;
        if (portName != null) {
            System.err.println("\n\nUsing '" + portName + "' port:");
            stub = (StockquotePT) service.getStub(portName, StockquotePT.class);
            doit(stub);
        } else {
            System.err.println("\n\nUsing SOAP port:");
            stub = (StockquotePT) service.getStub("SOAPPort", StockquotePT.class);
            doit(stub);

            System.err.println("\n\nUsing Java port:");
            stub = (StockquotePT) service.getStub("JavaPort", StockquotePT.class);
            doit(stub);
        }

        if (protocol.equals("axis")) { // reset to default provider
            WSIFPluggableProviders.overrideDefaultProvider(
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SingleTag"),
               SingleTag_Type.class );

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SimpleDocument"),
               SimpleDocument_Type.class );

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "ComplexDocument"),
               ComplexDocument_Type.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "ArrayOfSimpleDocument"),
               ArrayOfSimpleDocument.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SimpleDocument"),
               SimpleDocument_Type.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "ChildDocument"),
               ChildDocument.class );

      WSIFPort port = service.getPort(portName);

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

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapPackage("http://soapinterop.org/", "interop.wsifservice");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SingleTag"),
               SingleTag_Type.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);

            SingleTag_Type stet = new SingleTag_Type();

            SingleTag_Type response = stub.singleTag(stet);
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapPackage("http://soapinterop.org/", "interop.wsifservice");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SimpleDocument"),
               SimpleDocument_Type.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);

            SimpleDocument_Type sdt = new SimpleDocument_Type();
            sdt.setValue("petra");

            SimpleDocument_Type response = stub.simpleDocument(sdt);
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://soapinterop.org/",
          "Doc_TestPortType");

            service.mapPackage("http://soapinterop.org/", "interop.wsifservice");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "ComplexDocument"),
               ComplexDocument_Type.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "ArrayOfSimpleDocument"),
               ArrayOfSimpleDocument.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://soapinterop.org/",
                   "SimpleDocument"),
               SimpleDocument_Type.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "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();
            checkComplexDocument(cdt);
                       
            ComplexDocument_Type response = stub.complexDocument(cdt);
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://ws.cdyne.com",
                    "Zip2GeoSoap");

            // map types
            service.mapType(
                new QName("http://ws.cdyne.com", "LatLongReturn"),
                Class.forName(
                    "complexsoap.client.stub.com.cdyne.ws.LatLongReturn"));

            // create the stub
            Zip2GeoSoap stub = (Zip2GeoSoap) service.getStub(Zip2GeoSoap.class);

            // do the invocation
            // args[1] is the zip code
            LatLongReturn zipInfo = stub.GetLatLong(args[1], "");
View Full Code Here

Examples of org.apache.wsif.WSIFService

    private void doit (String wsdl, String expectedException)
    {
      try
      {
        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(
          wsdl,
          null,                                           // serviceNS
          null,                                           // serviceName
          "http://wsifservice.addressbook/", // portTypeNS
          "AddressBook");                                 // portTypeName

        AddressBook stub=(AddressBook)service.getStub(server+"Port", AddressBook.class);

        stub.addEntry(name1, addr1);
        Address resp1 = stub.getAddressFromName (name1);
        assertTrue(new AddressUtility(addr1).equals(resp1));
        assertTrue(expectedException==null);
View Full Code Here

Examples of org.apache.wsif.WSIFService

        TestUtilities.setProviderForProtocol( protocol );

        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
                WSIFService service = factory.getService(wsdlLocation, null, // serviceNS
        null, // serviceName
        "http://www.buyservice.com/buy-interface", // portTypeNS
    "buyService"); // portTypeName

            System.err.println("\n\nUsing '" + portName + "' port:");
            buyService stub = (buyService) service.getStub(portName, buyService.class);

            String resp = stub.buy("IBM", 100);
            System.out.println("\nResponse >> " + resp);
        } catch (Exception e) {
            System.err.println("StockquoteTest(" + portName + ") caught exception " + e);
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.