Skip to main content

Controlling the Namespaces of the Schema and Types

This topic describes how to control the namespace for the schema of the WSDL for an InterSystems IRIS® data platform web service, as well as the namespaces for any types defined within it.

Controlling the Namespace of the Schema

The TYPENAMESPACE parameter (of your web service) controls the target namespace for the schema of your web service.

If TYPENAMESPACE is null, the schema is in the namespace given by the NAMESPACE parameter of the web service. The WSDL might look as follows:

<?xml version='1.0' encoding='UTF-8' ?>
...
<types>
<s:schema elementFormDefault='qualified' 
targetNamespace = 'http://www.myapp.org'>
...

If you set TYPENAMESPACE to a URI, that URI is used as the namespace for the types. In this case, the WSDL might look as follows:

<?xml version='1.0' encoding='UTF-8' ?>
...
<types>
<s:schema elementFormDefault='qualified' 
targetNamespace = 'http://www.mytypes.org'>
...

Controlling the Namespace of the Types

For any types referenced within the schema, the following rules govern how they are assigned to namespaces:

  • If the USECLASSNAMESPACES parameter of the web service is 0 (the default), then the types are in the same namespace as the schema; see the previous section.

  • If the USECLASSNAMESPACES parameter of the web service is 1 (and if the web service uses the document binding style), then each type is in the namespace given by the NAMESPACE parameter of the corresponding type class.

    For a given type, if the NAMESPACE parameter is null for the type class, then the type is in the same namespace as the schema; see the previous section.

    For information on binding styles, see Specifying the Binding Style for the SOAP Messages.

FeedbackOpens in a new tab