This document covers the following topics:
See also Migration Considerations for XML/SOAP Components.
Use the XML Mapping Editor to map IDL parameters to XML structures.
The mapping editor offers several mapping types:
element mapping: all IDL parameters map to elements in an XML document
attribute mapping: all scalar/simple IDL parameters map to attributes; program name and complex types (groups and structures) map to elements
SOAP mapping: a standard SOAP document is generated, IDL parameters map to elements in <Body>-part
user-defined mapping: users create their own XML or SOAP documents and map the IDL parameters to elements or attributes of an XML document.
In addition, the mapping editor shows one of general information (Overview page), the request message (XML Request), response message within fault information (XML Response page), mapping parameters (Mapping Parameters page) or sample editor (XML Samples page) at one time.
Before you start the generation of the XMM file, select the IDL file and open the context menu to set the properties for this IDL file. The settings for an IDL file are inherited from the preferences (they provide the defaults):
To set the general options, path settings and XML options
Select Preferences... in the Windows menu of Eclipse.
Select Software AG > EntireX.
Select the tab XML.
Fill in the screen as follows:
Screen Item | Description |
---|---|
XML default encoding | This encoding is used for the XML/SOAP document sent, if the box "Use incoming encoding" is not checked (for XML-based clients) or if the RPC Server for XML/SOAP is used. |
Use incoming encoding | Check this box to enable the XML/SOAP Wrapper to use same encoding for the incoming document as for the outgoing document. |
Confirm the settings with
.After setting the general properties, set the properties specific to the IDL file. The settings for the XML/SOAP Wrapper classes are on the two tab pages: General and XML.
To set the IDL properties
In the file tree browser, select the IDL file to be processed.
To display the Properties window, use either the context menu or the menu and choose .
The subsequent screen will show the defaults you entered with
.Use this page to specify the Broker ID, the server address (Server class, Server name, and Service) and other properties. If you do not enter Broker ID, server name, etc., the defaults (as entered in the / menu) will be used.
Select the XML tab.
Complete the screen as follows:
Screen Item | Description |
---|---|
XML default encoding | This encoding is used for the XML/SOAP document sent, if the box "Use incoming encoding" is not checked (for XML-based Clients) or if the RPC Server for XML/SOAP is used. |
Use incoming encoding | Check this box to enable the XML/SOAP Wrapper to use the same encoding for the incoming document as that used for the document sent. |
Confirm the settings with
.To generate the XMM file, use the EntireX Workbench.
The IDL file, the XML file and the properties are used to generate an XMM file.
To generate the XMM file
Specify an IDL-XML mapping.
Save the mapping.
If you are using the default settings of the EntireX Workbench, an XMM file is saved. The name of the XMM file is <idl file name>.xmm
Warning: If you modify the IDL file, the IDL-XML mapping file or the properties, you must re-generate the XMM file. |
The XML/SOAP Runtime uses standard default values for all parameters (for EntireX RPC) and elements/attributes (for XML documents) if no value can be retrieved and no user default value is defined. The table below shows the standard default values for XML and RPC.
Value | Description |
---|---|
A(n) | XML: Empty string with length 0 RPC: String with n blanks |
AV | Empty string with length 0 |
B(n) | String with n zeros |
BV | Empty field with length 0 |
K(n) | XML: Empty string with length 0 RPC: String with n blanks |
KV | Empty string with length 0 |
L | false |
I1 | 0 |
I2 | 0 |
I4 | 0 |
F4 | 0.0 |
F8 | 0.0 |
N | 0.0 |
P | 0.0 |
D | new Date() |
T | new Date() |
U(n) | XML: Empty Unicode string with length 0 RPC: Unicode String with n blanks |
UV | XML: Empty Unicode string with length 0 |