Package org.apache.wsif

Examples of org.apache.wsif.WSIFService


                .setDynamicWSIFProvider( "http://schemas.xmlsoap.org/wsdl/ejoe/", new WSIFDynamicProvider_EJOE() );
        WSIFServiceImpl.addExtensionRegistry( new EJOEExtensionsRegistry() );

        try
        {
            WSIFService service = factory.getService( WSIFTest.class.getResource( "AddressBook.wsdl" ).toString(),
                                                      null, null, "http://wsifservice.addressbook/", "AddressBook" );

            // get the port
            port = service.getPort();
        }
        catch ( Exception e )
        {
            e.printStackTrace();
            fail( e.toString() );
View Full Code Here


                                                    new WSIFDynamicProvider_EJOE() );
            WSIFServiceImpl.addExtensionRegistry( new EJOEExtensionsRegistry() );

            try
            {
                WSIFService service = factory.getService( WSIFTypeTest.class.getResource( "SimpleTypes.wsdl" )
                        .toString(), null, null, "http://wsifservice.simpletypes/", "SimplePT" );

                // get the port
                port = service.getPort();
            }
            catch ( Exception e )
            {
                e.printStackTrace();
                fail( e.toString() );
View Full Code Here

            System.exit(1);
        }

        // create a service factory
        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service =
            factory.getService(
                args[0],
                null,
                null,
                "http://wsifservice.addressbook/",
                "AddressBook");

        // map types
        service.mapType(
            new QName("http://wsiftypes.addressbook/", "Address"),
            Class.forName("localjava.client.stub.addressbook.wsiftypes.Address"));
        service.mapType(
            new QName("http://wsiftypes.addressbook/", "Phone"),
            Class.forName("localjava.client.stub.addressbook.wsiftypes.Phone"));

        // get the port
        WSIFPort port = service.getPort();

        // add the first address
        addFirstAddress(port);

        // add the second address
View Full Code Here

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

            // parse WSDL
            WSIFService service =
                factory.getService(
                    args[0],
                    null,
                    null,
                    "http://wsifservice.addressbook/",
                    "AddressBook");

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

            // do the invocations
            addFirstAddress(stub);
            addSecondAddress(stub);
            queryAddresses(stub);
View Full Code Here

                String portTypeNS = resolveString(ref.get("portTypeNS"));
                String portTypeName = resolveString(ref.get("portTypeName"));

                if (wsdlLoc != null) {
                    WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
                    WSIFService service =
                        factory.getService(wsdlLoc, serviceNS, serviceName, portTypeNS, portTypeName);
                    Trc.exit(service);
                    return service;
                }
            } else if (ref.getClassName().equals(WSIFServiceStubRef.class.getName())) {
                String wsdlLoc = resolveString(ref.get("wsdlLoc"));
                String serviceNS = resolveString(ref.get("serviceNS"));
                String serviceName = resolveString(ref.get("serviceName"));
                String portTypeNS = resolveString(ref.get("portTypeNS"));
                String portTypeName = resolveString(ref.get("portTypeName"));
                String preferredPort = resolveString(ref.get("preferredPort"));
                String className = resolveString(ref.get("className"));

                if (wsdlLoc != null) {
                    WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
                    WSIFService service =
                        factory.getService(wsdlLoc, serviceNS, serviceName, portTypeNS, portTypeName);
                    Class iface =
                        Class.forName(className, true, Thread.currentThread().getContextClassLoader());
                    Object stub = service.getStub(preferredPort, iface);
                    Trc.exit(stub);
                    return stub;
                }
            }
        }
View Full Code Here

        if (portTypeNS == null)
            throw new IllegalArgumentException("port type namespace can not be null");
        if (portTypeName == null)
            throw new IllegalArgumentException("port type name can not be null");

        WSIFService ws = null;
        try {
            if (initContextClass == null) {
                initContextClass =
                    Class.forName(
                        "javax.naming.InitialContext",
View Full Code Here

   * @return <code>PortTypeArray</code>
   * @throws <code>WSIFException</code>
   */
  public PortTypeArray getPortTypes(String queryString) throws WSIFException {
    try {
      WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);

      WSIFPort port = portFactory.getPort();

      WSIFOperation operation = port.createOperation(GET_PORTTYPES_OPERATION);
      WSIFMessage inputMessage = operation.createInputMessage();
      WSIFMessage outputMessage = operation.createOutputMessage();
      inputMessage.setObjectPart(QUERY_STRING_PART, queryString);
View Full Code Here

   * @return <code>ImportDefinition</code>
   * @throws <code>WSIFException<code>
   */
  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();

View Full Code Here

   * @return <code>byte[]</code>
   * @throws <code>WSIFException</code>
   */
  public byte[] getRawEISMetaData(String queryString) throws WSIFException {
    try {
      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();
View Full Code Here

            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

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.