本文整理汇总了C#中org.getAllServices方法的典型用法代码示例。如果您正苦于以下问题:C# org.getAllServices方法的具体用法?C# org.getAllServices怎么用?C# org.getAllServices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org
的用法示例。
在下文中一共展示了org.getAllServices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: registerBusinessServices
public businessService[] registerBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
{
List<businessService> businessServices = new List<businessService>();
Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
while (it.MoveNext())
{
QName serviceQName = (QName)it.Current.Key;
org.xmlsoap.schemas.easyWsdl.tService service = wsdlDefinition.getService(serviceQName);
businessService businessService = null;
//add service
Uri serviceUrl = null;
if (service.port != null && service.port.Count > 0)
{
HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
while (it2.MoveNext())
{
//for (Object portName : service.getPorts().keySet()) {
businessService = registerBusinessService(serviceQName, (String)it2.Current.name, serviceUrl, wsdlDefinition).getBusinessService();
}
}
if (businessService != null)
{
businessServices.Add(businessService);
}
}
return businessServices.ToArray();
}
示例2: unRegisterBusinessServices
public String[] unRegisterBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
{
String[] businessServices = new String[wsdlDefinition.getAllServices().Count];
int i = 0;
Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
while (it.MoveNext())
{
QName serviceQName = it.Current.Key;
org.xmlsoap.schemas.easyWsdl.tService service = it.Current.Value;
//unregister service
Uri serviceUrl = null;
if (service.port != null && service.port.Count > 0)
{
HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
while (it2.MoveNext())
{
//construct the accessURL
serviceUrl = new Uri(getBindingURL((org.xmlsoap.schemas.easyWsdl.tPort)service.getPort(it2.Current.name)));
businessServices[i++] = unRegisterBusinessService(serviceQName, (String)it2.Current.name, serviceUrl);
}
}
}
return businessServices;
}
示例3: createBusinessServices
/// <summary>
///
/// Creates a business service based off of a WSDL definition<Br>No changes are made to the UDDI
/// endpoints using this method
/// <br>
/// Example Code:
/// <pre>
/// URL url = new URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl");
/// String domain = url.getHost();
/// ReadWSDL rw = new ReadWSDL();
/// Definition wsdlDefinition = rw.readWSDL(url);
/// properties.put("keyDomain", domain);
/// properties.put("businessName", domain);
/// properties.put("serverName", url.getHost());
/// properties.put("serverPort", url.getPort());
/// wsdlURL = wsdlDefinition.getDocumentBaseURI();
/// WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
/// BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
/// </pre>
/// </summary>
/// <param name="wsdlDefinition">must not be null</param>
/// <returns>a business service</returns>
/// <exception cref="ArgumentNullException"> if the wsdlDefinition is null</exception>
public businessService[] createBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
{
if (wsdlDefinition == null)
{
throw new ArgumentNullException();
}
List<businessService> businessServices = new List<businessService>();
Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
while (it.MoveNext())
{
QName serviceQName = it.Current.Key;
org.xmlsoap.schemas.easyWsdl.tService service = it.Current.Value;
businessService businessService = createBusinessService(serviceQName, wsdlDefinition);
//service.getExtensibilityElements().
//add the bindingTemplates
Uri serviceUrl = null;
if (service.port != null && service.port.Count > 0)
{
List<bindingTemplate> bts = new List<bindingTemplate>();
HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
while (it2.MoveNext())
{
bindingTemplate bindingTemplate = createWSDLBinding(serviceQName, (String)it2.Current.name, serviceUrl, wsdlDefinition);
bts.Add(bindingTemplate);
}
businessService.bindingTemplates = bts.ToArray();
}
businessServices.Add(businessService);
}
return businessServices.ToArray();
}