org.systinet.wasp.management.services.wsdiscovery
Interface WsDiscoveryApi


public interface WsDiscoveryApi

This is Web Service Discovery service API accessible using SOAP interface.
WS Discovery service is Utility Web Service which provides a way how to expose web services hosted by a WSO2 SOA Enablement Server to outer web sevices world.

Since:
4.0
Component:
WSDiscovery-US

Method Summary
 boolean addKnownUddiRegistry(UddiRegistry uddiRegistry)
          Add a registry to the list of known UDDI registries.
 void checkUddiRegistry(UddiRegistry uddiRegistry, int method)
          Check target UDDI registry.
 WsDiscoveryRecord customWebService2Uddi(UddiAccount uddiAccount, java.lang.String wsdlBaseUri, int method, java.lang.String wsdlTModelUuid, WaspServerProfile waspServerProfile, TypedUuid typedUuid, Ws2UddiCustomData ws2UddiCustomData, boolean detectTModels)
          Custom publish of a WSDL service implementation definition to a UDDI registry.
 UddiRegistry[] getKnownUddiRegistries()
          Get the list of registries which are known to this Ws Discovery service.
 WsDiscoveryRecord getServicesHostedByWaspServers(UddiRegistry uddiRegistry, WaspServerProfile waspServerProfile)
          Get information about web services published into UDDI registry and hosted by a Systinet Server.
 WsDiscoveryRecord initializeRegistry(UddiAccount uddiAccount, WaspServerProfile waspServerProfile)
          Initialize content of UDDI registry for extended publishing.
 WsDiscoveryRecord isWebServicePublished(UddiRegistry uddiRegistry, java.lang.String serviceEndpoint, WaspServerProfile waspServerProfile)
          Determine whether is the web service hosted by a WSO2 SOA Enablement Server described by waspServerProfile published in UDDI registry.
 WsDiscoveryRecord webService2Uddi(UddiAccount uddiAccount, java.lang.String wsdlLocation, int method)
          Publish a web service described by WSDL document to a UDDI registry.
 WsDiscoveryRecord webServiceInterface2Uddi(UddiAccount uddiAccount, java.lang.String wsdlLocation, int method)
          Publish web service interface to a UDDI registry based on the choosen method.
 

Method Detail

checkUddiRegistry

public void checkUddiRegistry(UddiRegistry uddiRegistry,
                              int method)
                       throws WsDiscoveryException
Check target UDDI registry.

Parameters:
uddiRegistry - UDDI registry about to be checked.
method - the method how is the registry checked:
  • COMMON_REGISTRY_CHECK: checks registry accessibility only.
  • EXTENDED_REGISTRY_CHECK: check the registry accessibility and whether it is initialized for extended publishes (well known tModels, etc.).
Returns:
known UDDI registries.
Throws:
WsDiscoveryException - exception which denotes problem.

getKnownUddiRegistries

public UddiRegistry[] getKnownUddiRegistries()
                                      throws WsDiscoveryException
Get the list of registries which are known to this Ws Discovery service.

Returns:
known UDDI registries.
Throws:
WsDiscoveryException - exception which denotes problem.

addKnownUddiRegistry

public boolean addKnownUddiRegistry(UddiRegistry uddiRegistry)
                             throws WsDiscoveryException
Add a registry to the list of known UDDI registries.

Parameters:
uddiRegistry - UDDI registry about to be added.
Returns:
false if the registry is already known (inquiry and publishing ports), on successfull add returns true.
Throws:
WsDiscoveryException - exception which denotes problem.

initializeRegistry

public WsDiscoveryRecord initializeRegistry(UddiAccount uddiAccount,
                                            WaspServerProfile waspServerProfile)
                                     throws WsDiscoveryException
Initialize content of UDDI registry for extended publishing. This method checks for the existence of well known tModels and publishes these which are missing.
Usually this method is run by WSO2 SOA Enablement Server administrator on adding UDDI registry on trust list.

Parameters:
waspServerProfile - WSO2 SOA Enablement Server host profile.
Returns:
information about (published) well known tModels UUIDs.
Throws:
WsDiscoveryException - exception which denotes a problem.

webService2Uddi

public WsDiscoveryRecord webService2Uddi(UddiAccount uddiAccount,
                                         java.lang.String wsdlLocation,
                                         int method)
                                  throws WsDiscoveryException
Publish a web service described by WSDL document to a UDDI registry.
Note that this method awaits well formed WSDL document. For example, it is assumed that the WSDL service implementation document contains at least one service and port element, and the port element contains a documentation element. Typically, you would check to verify that the elements exist before trying to use them.
New business entity, business service and binding templates are created by this call.
For the WSDL is always published new tModel.
For further details consult WSO2 SOA Enablement Server documentation please.

Parameters:
uddiAccount - target UDDI account.
method - how WSDL file should be published:
Returns:
record which holds published entities.
Throws:
WsDiscoveryException - exception which denotes problem.
See Also:
Constants

webServiceInterface2Uddi

public WsDiscoveryRecord webServiceInterface2Uddi(UddiAccount uddiAccount,
                                                  java.lang.String wsdlLocation,
                                                  int method)
                                           throws WsDiscoveryException
Publish web service interface to a UDDI registry based on the choosen method.

Parameters:
uddiAccount - target UDDI account.
method - how WSDL file should be published:
Returns:
record which holds UUDI of published tModel.
Throws:
WsDiscoveryException - exception which denotes problem.

customWebService2Uddi

public WsDiscoveryRecord customWebService2Uddi(UddiAccount uddiAccount,
                                               java.lang.String wsdlBaseUri,
                                               int method,
                                               java.lang.String wsdlTModelUuid,
                                               WaspServerProfile waspServerProfile,
                                               TypedUuid typedUuid,
                                               Ws2UddiCustomData ws2UddiCustomData,
                                               boolean detectTModels)
                                        throws WsDiscoveryException
Custom publish of a WSDL service implementation definition to a UDDI registry.
For further details consult WSO2 SOA Enablement Server documentation please.

Parameters:
uddiAccount - target UDDI account.
wsdlBaseUri - location of the source WSDL file.
method - how WSDL document should be published:
  • UDDI_ORG_BEST_PRACTICE_1_05: according to uddi.org best practice document .
  • UDDI_ORG_BEST_PRACTICE_1_05_EXTENDED: according to uddi.org best practice document with extended categorization which simplifies inquiries and assigns a WSO2 SOA Enablement Server to the published web service so it is possible to determine all web services hosted by particular WSO2 SOA Enablement Server.
  • SYSTINET_APPROACH_1_0: according to Systinet best practice document .
  • SYSTINET_APPROACH_1_0_EXTENDED: according to Systinet best practice document . with extended categorization which simplifies inquiries and assigns a WSO2 SOA Enablement Server to the published web service so it is possible to determine all web services hosted by particular WSO2 SOA Enablement Server.
wsdlTModelUuid - use this TModel instead of publishing new one.
waspServerProfile - this parameter is mandatory for EXTENDED methods. This structure should hold information about WSO2 SOA Enablement Server which hosts published web service.
typedUuid - this parameter allows you to control the root entity which will be published by this method. The default behavior (when this parameter is equal to null) is that the root entity is business entity. It means that business entity, business service(s) and binding template(s) is/are published.
You may choose business service as the root element. Then you must specify within this parameter UUID of the business entity which will encapsulate newly published business service(s).
The last case is that this method will publish just binding template(s), so you must specify UUID of business service which will encapsulate newly published binding templates using the typedUuid field.
detectTModels - if this option is true, then there is made a detection made before new tModel is published, else new tModels are always published with no regards to registry content.
Returns:
record which holds published entities.
Throws:
WsDiscoveryException - exception which denotes problem.
See Also:
Constants

getServicesHostedByWaspServers

public WsDiscoveryRecord getServicesHostedByWaspServers(UddiRegistry uddiRegistry,
                                                        WaspServerProfile waspServerProfile)
                                                 throws WsDiscoveryException
Get information about web services published into UDDI registry and hosted by a Systinet Server.

Parameters:
uddiRegistry - target UDDI registry.
waspServerProfile - is optional parameter. If it is omitted (null), then all the services hosted by WSO2 SOA Enablement Servers are returned.
Returns:
information about published web services.
Throws:
WsDiscoveryException - exception which denotes problem.

isWebServicePublished

public WsDiscoveryRecord isWebServicePublished(UddiRegistry uddiRegistry,
                                               java.lang.String serviceEndpoint,
                                               WaspServerProfile waspServerProfile)
                                        throws WsDiscoveryException
Determine whether is the web service hosted by a WSO2 SOA Enablement Server described by waspServerProfile published in UDDI registry.

Parameters:
uddiRegistry - target UDDI registry.
serviceEndpoint - web service endpoint.
waspServerProfile - mandatory parameter which holds web service host.
Returns:
if the web service is published, then information about published entities is returned.
Throws:
WsDiscoveryException - exception which denotes problem.