Lotus: Using types from multiple namespaces in a single WSDL file

THEMES: Lotus\Notes/Domino 8 | Lotus\Composite Appl...
YEAR: 2007
Login Login
User: Anonymous


LABEL: Composite Application | Lotus Notes 8 | Lotus Notes API
ORGANIZATIONS: IBM
 

Open

Post comment
Using types from multiple namespaces in a single WSDL file16.10.2007 08:50Michel Siekendiek
 
Resources
Using types from multiple namespaces in a single WSDL file
http://www-03.ibm.com/developerworks/blogs/page/CompApps?entry=using_types_from_multiple_namespaces&ca=drs-bl

A feature of composite apps is bringing together components from different information domains. Since each information domain can have its own namespace, in order to interoperate you need to refer to these types scoped by their namespace. In this example we describe how to do so if you are creating your WSDL file by hand. For example, if you are creating a WSDL file for an Eclipse component. If you are creating a WSDL file for a Notes component ,you can do so as described by hand, or you can take equivalent steps with the Property Broker Editor extensions to Notes Designer.

Multiple namespace types are done by repeating the <xsd:schema> element within the <type> element with a new namespace in the targetNamespace tag. The attached example (Just download this file, rename it to sl_core_d.wsdl ) shows CompanyNameType, PagePathType, CategoryType, and LeadNameType declared under the namespace "http://www.ibm.com/wps/c2a". It then shows KeyFilterType under the namespace "http://com.ibm.compositeapps.samples", and emailAddress under the namespace "http://com.ibm.propertybroker.standardtypes".

Later, in the <part> element within the <message> element we reference these types. XML requires us to nominate their namespace when we do so. The simplest way is via an abbreviation declared in the <definitions> tag.

To walk you through it, there are three basic steps. Before you start, you need to know the types you are using and what namespace they belong to. The attached examples uses the ones listed above.

1) In the <definitions> tag, create an abbreviation for each namespace. In our example we declared them with:

xmlns:cus="http://www.ibm.com/wps/c2a"

xmlns:sys="http://com.ibm.compositeapps.samples"

xmlns:ibmst="http://com.ibm.propertybroker.standardtypes"

2) In the <types> element, declare each group of types in a <xsd:schema> tag, and each type in its own <xsd:simpleType> tag.

3) Lastly, in the <part> element in each <message> prepend the prefix to the type name in the type attribute to correctly refer to the type.