Package org.apache.wsif

Examples of org.apache.wsif.WSIFService


            return;

        debug("\n*** TEST EJB BINDING ***");

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory.getService(wsdlPath + "ShoppingCartAll.wsdl", // WSDL file
        "http://www.shoppingcart.com/definitions/ShoppingCartInterface", // serviceNS,
        "ShoppingCart_EJBService", // serviceName,
        "http://www.shoppingcart.com/definitions/ShoppingCartInterface",
        // portTypeNS,
        "ShoppingCart_EJBPortType" //  portTypeName
    );

        Iterator it = service.getAvailablePortNames();
        {
            System.out.println("Available ports for the service are: ");
            while (it.hasNext()) {
                System.out.println((String) it.next());
            }
        }

        WSIFPort port = service.getPort();
        WSIFOperation operation;
        WSIFMessage inputMessage;
        WSIFMessage outputMessage;
        WSIFMessage faultMessage;

View Full Code Here


        boolean ExceptionExpected = (portName.indexOf("bad") != -1);

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

            service.mapType(
                new QName("http://wsiftypes.addressbook/", "zero"),
                jms.NumberZero.class);

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

            if ("timeout".equals(cmd))
                doTimeout(stub, deliveryMode);
            else {
                if (cmd == null)
View Full Code Here

    */
    public void testWSDL_Java_InputOnly() throws Exception {
        debug("\n*** TEST INPUT ONLY OPERATION USING JAVA BINDING ***");

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory
                    .getService(
                        wsdlPath + "ShoppingCartAll.wsdl",
                        "http://www.shoppingcart.com/definitions/ShoppingCartInterface",
        // serviceNS,
        "ShoppingCart_JavaService", // serviceName,
        "http://www.shoppingcart.com/definitions/ShoppingCartInterface",
        // portTypeNS,
        "ShoppingCart_JavaPortType" //  portTypeName
    );

        WSIFPort port = service.getPort();

        WSIFOperation operation;
        WSIFMessage inputMessage;
        WSIFMessage outputMessage;
        WSIFMessage faultMessage;
View Full Code Here

            return;

        debug("\n*** TEST INPUT ONLY OPERATION USING EJB BINDING ***");

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory
                    .getService(
                        wsdlPath + "ShoppingCartAll.wsdl",
                        "http://www.shoppingcart.com/definitions/ShoppingCartInterface",
        // serviceNS,
        "ShoppingCart_EJBService", // serviceName,
        "http://www.shoppingcart.com/definitions/ShoppingCartInterface",
        // portTypeNS,
        "ShoppingCart_EJBPortType" //  portTypeName
    );

        WSIFPort port = service.getPort();

        WSIFOperation operation;
        WSIFMessage inputMessage;
        WSIFMessage outputMessage;
        WSIFMessage faultMessage;
View Full Code Here

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http/www.pointwsp.net/ws/finance",
          "pwspNoCentrbankCurRatesSoap");

            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "currencyrates"),
               Currencyrates.class );

            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "ArrayOfCurrency"),
               ArrayOfCurrency.class);

            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();
View Full Code Here

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          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();
      assertTrue("unexpected result: " + o, o instanceof Currencyrates);
//            Currencyrates cr = (Currencyrates) o;
//            System.out.println("source=" + cr.getSource());
View Full Code Here

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

      WSIFPort port = service.getPort(portName);

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

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

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http/www.pointwsp.net/ws/finance",
          "pwspNoCentrbankCurRatesSoap");

            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "currencyrates"),
               Currencyrates.class );

            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "ArrayOfCurrency"),
               ArrayOfCurrency.class);

            service.mapType(
               new javax.xml.namespace.QName("http/www.pointwsp.net/ws/finance", "currency"),
               Currency.class);

      WSIFPort port = service.getPort(portName);

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

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

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

      WSIFPort port = service.getPort(portName);

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

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

    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.wsifserviceWrapped");

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

      WSIFPort port = service.getPort(portName);

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

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

TOP

Related Classes of org.apache.wsif.WSIFService

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.