For reference, this topic provides information on the classes generated by the SOAP Wizard.
Parameters and Keywords That Control Namespace Assignment
In the generated classes, the SOAP wizard uses parameters and keywords to control namespace assignments. The following subsections discuss namespaces for messages and namespaces for types.
You should not modify these values, because the web client or web service would no longer obey the WSDL. For details on SoapNameSpace and SoapTypeNameSpace, see the Class Definition Reference.
Namespaces for the Messages
The SOAP Wizard specifies the following values to control the namespaces used for the SOAP messages:
Namespaces for SOAP Messages Sent by Web Client or Service
Item |
Value Given by SOAP Wizard |
NAMESPACE (class parameter) |
Namespace of the request messages, if all request messages use the same namespace. |
SoapNameSpace (method keyword) |
Namespace of a given request message, if request messages use different namespaces. |
RESPONSENAMESPACE (class parameter) |
Namespace of the response messages. If this is not specified, the response messages are in the namespace given by the NAMESPACE parameter. Note that the SoapNameSpace keyword has no effect on the namespaces of the response messages. |
Namespaces for the Types
The SOAP Wizard automatically assigns the message types to namespaces as follows:
Namespaces for Types Used By Web Clients and Web Services
Item |
Value Given by SOAP Wizard |
TYPENAMESPACE (class parameter) |
The SOAP Wizard sets this parameter if all methods refer to types in the same namespace. |
RESPONSETYPENAMESPACE (class parameter) |
The SOAP Wizard sets this parameter if the WSDL uses document-style binding and the response messages use types in a different namespace than the request messages. This parameter applies to all methods in the class. Note that all response types are assumed to be in the same namespace as each other. |
SoapTypeNameSpace (method keyword) |
Value of the targetNamespace attribute of the <s:schema> element. The SOAP Wizard sets this keyword per method if methods use types from different namespaces.
This keyword does not override the RESPONSETYPENAMESPACE parameter. |
Creation of Array Properties
By default, the SOAP Wizard creates array-type properties in certain scenarios. You can use the Create No Array Properties option to create properties with a different structure if needed.
Specifically, consider a WSDL that includes the following types:
<s:complexType name="Obj">
<s:sequence>
<s:element minOccurs="0" name="MyProp" type="test:Array"/>
</s:sequence>
</s:complexType>
<s:complexType name="Array">
<s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Item" nillable="true" type="test:Item"/>
</s:sequence>
</s:complexType>
<s:complexType name="Item">
<s:simpleContent>
<s:extension base="s:string">
<s:attribute name="Key" type="s:string" use="required"/>
</s:extension>
</s:simpleContent>
</s:complexType>
By default, the SOAP Wizard generates the following class:
Class testws.Obj Extends (%RegisteredObject, %XML.Adaptor)
{
Parameter ELEMENTQUALIFIED = 1;
Parameter NAMESPACE = "https://testws.org";
Parameter XMLNAME = "Obj";
Parameter XMLSEQUENCE = 1;
Property MyProp As array Of %String(MAXLEN = "", XMLITEMNAME = "Item",
XMLKEYNAME = "Key", XMLNAME = "MyProp", XMLPROJECTION = "COLLECTION");
}
If you select Create No Array Properties when you use the SOAP Wizard, the property MyProp in generated Obj class is defined as follows instead:
Property MyProp As list Of testws.Item(XMLITEMNAME = "Item", XMLNAME = "MyProp", XMLPROJECTION = "COLLECTION");
This property refers to the following class, which the SOAP Wizard also generates:
Class testws.Item Extends (%SerialObject, %XML.Adaptor)
{
Parameter ELEMENTQUALIFIED = 1;
Parameter NAMESPACE = "https://testws.org";
Parameter XMLNAME = "Item";
Parameter XMLSEQUENCE = 1;
Property content As %String(MAXLEN = "", XMLNAME = "content", XMLPROJECTION = "CONTENT");
Property Key As %String(MAXLEN = "", XMLNAME = "Key", XMLPROJECTION = "ATTRIBUTE")
[ Required, SqlFieldName = _Key ];
}