Regardless whether an operation is used in a service or in an internal context, each operation can have parameters that define the input and output objects.
For example, operation helloWorldInOut of port type HelloWorldPort requires an object input as input and will return an object output as output (see figure below).

Figure: Operation Parameters

Operation parameters may not only be of complex types but also of base types, for instance String or Array. The type of the array elements is defined in the tagged value arrayElement  (see parameter specification below).

Figure: Operation Parameters of Base Type Array

  

SOAP Null Values

Output values being NULL are not serialized to the SOAP output stream. Vice verca, input operation parameters and input object attributes that do not exists in the SOAP input stream are set to NULL in the corresponding UML operations respectively object flow states. The same applies, if the input parameters or attributes do have the xsi:nil attribute set to true.

The Bridge does not support xsi:nil attributes for SOAP output streams. However, this is compliant to SOAP 1.1.

Examples

In the example on the right, an input item is shown. If the attribute JOB should be sent to the Bridge as an empty string, the JOB tag has to be provided but is not filled.

   

<item xsi:type="ns2:Employee"> 
   <EMPNO xsi:type="xsd:int"> 7369</EMPNO> 
   <JOB xsi:type="xsd:string"></JOB> 
</item>

If you want to provide a NULL value as input, you have two options: either you omit the tag completely (like the JOB tag) or use xsi:nil as in the ENAME tag. Both alternatives are compliant to the SOAP standard.


<item xsi:type="ns2:Employee"> 
   <EMPNO xsi:type="xsd:int"> 7369</EMPNO> 
   <ENAME xsi:type="xsd:string" xsi:nil="true"></ENAME> 
</item>

The above rules are also valid for output items.
In this example on the right, the attribute JOB is 'empty' and the output returns the attribute JOB with a string value of length 0. However, the complete item structure will be returned.


<item xsi:type="ns2:Employee"> 
   <EMPNO xsi:type="xsd:int"> 7369</EMPNO> 
   <JOB xsi:type="xsd:string"></JOB> 
   <ENAME xsi:type = "xsd:string"> SMITH</ENAME> 
</item>

In the next example the attribute JOB is NULL, so the output for the client will not include the attribute JOB.


<item xsi:type="ns2:Employee"> 
   <EMPNO xsi:type="xsd:int"> 7369</EMPNO> 
   <ENAME xsi:type="xsd:string"> SMITH</ENAME> 
</item>
On this Page:
  • No labels