Skip to main content
Skip table of contents

Controlling Access to IPM Data Elements

The Service Definition Wizard creates method definitions with a single request and response parameter and these parameters consist of the entire request and response IPM. It is often not desirable to expose the entire IPM structure to the web service client. The access and defaultAccess attributes of the <element/> and <type/> element can be used to control the visibility of IPM elements in the service definition.

The access attribute may be applied to the <element/> element and indicates whether or not the element will appear in the WSDL. Valid values are "public" or "private". A value of "public" will cause the element to appear in the WSDL and will be accessible to client applications. A value of "private" will cause the element to be omitted from the WSDL and will be inaccessible to client applications. Note that an element marked as "private" will still be initialized properly in the IPM and can still act as an initializer target. The default value for the attribute is "public".

The defaultAccess attribute may be applied to the <type/> element and defines the default value for the access attribute for the type's child elements. The default value is "public". This attribute can be used in those cases where the majority of the elements in a type will be private. The defaultAccess attribute can be set to "private" and only those elements that should be visible in the WSDL can be set to "public" using the access attribute.

In the following SDF type definitions several elements of my_ipm are marked as private. These elements will not be visible in the WSDL for the service. Because the type my_structure has the defaultAccess attribute set to "private", only those child elements marked as "public" will be visible.

SDF Type Definitions

XML
<type name="my_ipm" >
  <element name="msg_code" type="short" size="2" access="private"/>
  <element name="a_public_string" type="string" size="256"/>
  <element name="a_private_string" type="string" size="256" access="private"/> 
  <element name="a_structure" type="my_structure" />
</type>
<type name="my_structure" defaultAccess="private">
  <element name="a_public_int" type="int" size="4" access="public"/>
  <element name="a_private_numeric" type="numeric" size="6" />
</type>


Resulting WSDL

XML
<xsd:complexType name="my_ipm">
  <xsd:sequence>
    <xsd:element minOccurs="1" maxOccurs="1" name="a_public_string" type="xsd:string" />
    <xsd:element minOccurs="1" maxOccurs="1" name="a_structure" type="n0:my_structure" />
  </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="my_structure">
  <xsd:sequence>
    <xsd:element minOccurs="1" maxOccurs="1" name="a_public_int" type="xsd:int" />
  </xsd:sequence>
</xsd:complexType>



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.