Skip to main content

Publish from Java using the new OASIS UDDI WSDL Technical Note

Use UDDI4J to publish WSDL to UDDI

Return to article


Listing 16. Method to publish sample portType tModels
private static void publishPortTypeTModels(Publish publish)
        throws UDDIException, TransportException
    {
        TModelDetail tModelDetail = null;
        Vector v = null;
        TModel tModel = null;

        // ConfiguratorPortType tModel
        tModelDetail =
            publish.publish_portType_tModel(
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.wsdl",
                "ConfiguratorPortType",
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.wsdl");
        v = tModelDetail.getTModelVector();
        tModel = (TModel)v.elementAt(0);
        configuratorPortTypeKey = tModel.getTModelKey();
        System.out.println(
            "ConfiguratorPortType key is " + configuratorPortTypeKey);

        // LoggingFacilityLogPortType tModel
        tModelDetail =
            publish.publish_portType_tModel(
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.wsdl",
                "LoggingFacilityLogPortType",
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.wsdl");
        v = tModelDetail.getTModelVector();
        tModel = (TModel)v.elementAt(0);
        loggingFacilityPortTypeKey = tModel.getTModelKey();
        System.out.println(
            "LoggingFacilityLogPortType key is " + loggingFacilityPortTypeKey);

        // ManufacturerPortType tModel
        tModelDetail =
            publish.publish_portType_tModel(
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer.wsdl",
                "ManufacturerPortType",
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer.wsdl");
        v = tModelDetail.getTModelVector();
        tModel = (TModel)v.elementAt(0);
        manufacturerPortTypeKey = tModel.getTModelKey();
        System.out.println(
            "ManufacturerPortType key is " + manufacturerPortTypeKey);

        // RetailerPortType tModel
        tModelDetail =
            publish.publish_portType_tModel(
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl",
                "RetailerPortType",
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl");
        v = tModelDetail.getTModelVector();
        tModel = (TModel)v.elementAt(0);
        retailerPortTypeKey = tModel.getTModelKey();
        System.out.println("RetailerPortType key is " + retailerPortTypeKey);

        // WarehouseShipmentsPortType tModel
        tModelDetail =
            publish.publish_portType_tModel(
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl",
                "WarehouseShipmentsPortType",
                "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl");
        v = tModelDetail.getTModelVector();
        tModel = (TModel)v.elementAt(0);
        warehouseShipmentsPortTypeKey = tModel.getTModelKey();
        System.out.println(
            "WarehouseShipmentsPortType key is "
                + warehouseShipmentsPortTypeKey);
    }
            			

Return to article