Formatting a SOAP Envelope
The SOAP requests are embedded in a standard SOAP 1.2 envelope.
The envelope contains the following elements:
- <SOAP-ENV:Header>
- Contains NetView® operator ID and password
- <SOAP-ENV:Body>
- Contains the SOAP method call
The SOAP envelope header contains the NetView operator ID and password as shown in Table 1.
Supported tags | SOAP tag usage examples |
---|---|
|
|
The SOAP envelope body contains the SOAP request and its tags as
shown in Table 2.
SOAP request | Supported tags | NetView tag usage examples |
---|---|---|
NVCMD
Send a command request to the NetView program |
<cmd>
Any valid NetView command. This includes regular command processors, but does not include full screen commands or DST commands. The command must be enclosed with a CDATA tag if it contains special characters, for example the ampersand (&). The command is converted to uppercase unless you precede the command with the netvasis command. |
|
Figure 1 shows a sample NVCMD SOAP request. This
XML stub is embedded in a standard SOAP 1.2 envelope. SOAP envelope
elements are shown in bold. Input and output data are shown in italics.
Figure 1. SOAP Request Sent to SOAP Endpoint
<?xml version="1.0" encoding="EBCDIC-CP-US" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-
envelope">
<SOAP-ENV:Header>
<h:BasicAuth xmlns:h="http://soap-authentication.org/basic/2001/10/"
SOAP-ENV:mustUnderstand="1">
<Name>
NetView_operator_ID
</Name>
<Password>
NetView_Password
</Password>
</h:BasicAuth>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<NVCMD>
<cmd>
<![CDATA[NetView_Command]]>
</cmd>
</NVCMD>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Figure 2 shows the response received. The response
is sent in a SOAP element enclosed by the <xmlout> tag.
Figure 2. SOAP Response from SOAP Endpoint
<?xml version='1.0' encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<xmlout>
CNM353I LISTVAR : OPSYSTEM = MVS/ESACNM353I LISTVAR : MVSLEVEL =
SP7.0.8CNM353I LISTVAR : ECVTPSEQ = 01010800CNM353I LISTVAR :
CURSYS = NMP119CNM353I LISTVAR : VTAMLVL = V618CNM353I LISTVAR :
VTCOMPID = 5695-11701-180CNM353I LISTVAR : NetView = Tivoli
NetView for z/OS V5R3CNM353I LISTVAR : NETID = USIBMNTCNM353I
LISTVAR : DOMAIN = NTV77CNM353I LISTVAR : APPLID =
NTV77010CNM353I LISTVAR : OPID = SYSADMINCNM353I LISTVAR : LU
= SYSADMINCNM353I LISTVAR : TASK = OSTCNM353I LISTVAR :
NCCFCNT = 0CNM353I LISTVAR : HCOPY = CNM353I LISTVAR : IPV6ENV
= MIXEDCNM353I LISTVAR : TOWERS = MVSCMDMGT NPDA NLDM
TCPIPCOLLECT TEMACNM353I LISTVAR : CURCONID = CNM353I LISTVAR :
AUTCONID =
</xmlout>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Figure 3 shows the fault element that is received.
Figure 3. SOAP Fault Element
The encoding used for the SOAP envelopes is ISO-8859-1.<?xml version='1.0' encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>
Server.Fault
</faultcode>
<faultstring>
String
</faultstring>
<detail>
<znvFault>
Error cnmcmd. Hlbrc=20
</znvFault>
</detail>
<faultactor>""<faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>