Returns the code of error contained in the object org.apache.soap.Fault which is passed as argument.

1 soap.fault.getCode

<soap.fault.getCode>
    <data /> ?
</soap.fault.getCode>
Example

Obtain the language assigned to the user profile. In case of error, returns the code and error message.

Copy
<xsql-script name='getPolicy'>
    <body>
       <set name='m_response'>
          <soap.call
             url='http://web1/soap/servlet/rpcrouter'
             uri='urn:SOAPAPPServer'
             method='getPolicy'
             user='soap'
             password='soap999'
             >
          </soap.call>
       </set>
       <if><expr><soap.isFault><m_response/></soap.isFault></expr>
           <then>
                <println><soap.fault.getCode><m_response/></soap.fault.getCode></println>
                <println><soap.fault.getString><m_response/></soap.fault.getString></println>
           </then>
           <else>
               <println><map.get name='m_response'><string>lang</string></map.get></println>
           </else>
       </if>       
    </body>
 </xsql-script>