According to Grimoires users' feedback, it is not easy to program against Grimoires. Hence, a new client-side Class GrimoiresProxy is implemented, which addressses Grimoires' programmatic usabiity in the following ways:
public final String attachMetadataToOperation(String metadataType, String metadataValue,
String portTypeNamespace, String portTypeName, string operationName)attached
a piece of metadata to a WSDL operation. Users do not need to
understand the data model detail of metadata and WSDL operation. They
do not need to know how to create them, either.
public final String saveService(String businessKey, String name, String description, String accessPoint, String wsdlURL)saves a service belonging to the business with the specified business key. The services has the specified name and description. It is installed at the specified access point. And its interface is described by a WSDL, which itself is published as a tModel.
GrimoiresProxy grimoiresProxy = null;
// Create a proxy for Grimoires at the default location.
grimoiresProxy = new GrimoiresWebServiceProxyFactory().createProxy(null);
// Or, create a business logic proxy.
// grimoiresProxy = new GrimoiresBusinessLogicProxyFactory().createProxy(null);
// save business
String businessKey = grimoiresProxy.saveBusiness(businessName, businessDescription);
// save service
String serviceKey = grimoiresProxy.saveService(
businessKey, serviceName, serviceDescription, accessPoint, wsdlURL);
-- WeijianFang - 17 Jul 2006