1 SOAP Response example

1.1 SOAPXMLServer

1.1.1 EXECUTE an xsql-script on the database

  • SOAP Request:
    Copy
    Content-Type: text/xml; charset=utf-8
    Content-Transfer-Encoding: 8bit
    text/xml: text/xml;charset=utf-8
    Content-ID: <23025815.1383670095562.apache-soap.deister_mac6>
    Content-Length: 749
     
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <ns1:executeXML xmlns:ns1="urn:SOAPXMLServer" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <database xsi:type="xsd:string">demo_sports</database>
    <xml_code xsi:type="xsd:string">&lt;xsql-script name=&apos;hola_mundo&apos;&gt;
     
    	&lt;body&gt;
     
    		&lt;println&gt;Hola Mundo ....&lt;/println&gt;
     
    		&lt;return&gt;
               &lt;string&gt;Hola Mundo&lt;/string&gt;
    		&lt;/return&gt;
    	&lt;/body&gt;
     
    &lt;/xsql-script&gt;</xml_code>
    </ns1:executeXML>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • SOAP Response:
    Copy
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <ns1:executeXMLResponse xmlns:ns1="urn:SOAPXMLServer" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sqlresponse SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
    <sqlresponse country="ES" date="2013-11-05T16:48:14.388Z" date-format="dd-MM-yyyy" dbms="demo_sports" from="XMLSQLResultSetSerializer" host="web1" lang="es" number-format="#.##0,###" rows="1" time-format="HH:mm:ss" timestamp-format="dd-MM-yyyy HH:mm:ss" type="rawsql">
     <sqlinfo>
      <stdout><![CDATA[Hola Mundo ....
    ]]></stdout>
      <stderr><![CDATA[]]></stderr>
      <sqlstmt><![CDATA[&lt;xsql-script name=&apos;hola_mundo&apos;&gt;
     
    	&lt;body&gt;
     
    		&lt;println&gt;Hola Mundo ....&lt;/println&gt;
     
    		&lt;return&gt;
               &lt;string&gt;Hola Mundo&lt;/string&gt;
    		&lt;/return&gt;
    	&lt;/body&gt;
     
    &lt;/xsql-script&gt;]]></sqlstmt>
      <sqlsort/>
      <sqluser>demo</sqluser>
      <sqldbms>demo_sports</sqldbms>
      <sqlengine/>
      <sqllang>es-</sqllang>
      <sqltype/>
      <sqltime>0</sqltime>
      <sqlcount>0</sqlcount>
      <sqlserial>0</sqlserial>
      <sqlmaxrows>500</sqlmaxrows>
      <sqltables>
      </sqltables>
     </sqlinfo>
     <metadata>
      <column catalogName="" columnClassName="java.lang.String" columnDisplaySize="10" columnLabel="" columnName="(constant_1)" columnType="1" columnTypeName="char" isAutoIncrement="false" isCaseSensitive="false" isCurrency="false" isDefinitelyWritable="false" isHidden="false" isNullable="0" isNumeric="false" isPercent="false" isReadOnly="false" isRowid="false" isSigned="false" isTotal="false" isWritable="false" precision="0" scale="0" schemaName="" tableName=""/>
     </metadata>
     <rowset encoding="UTF-8" lang="es-">
      <r>
       <c>Hola Mundo</c>
      </r>
     </rowset>
    </sqlresponse>
    </sqlresponse>
    </ns1:executeXMLResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

1.1.2 Ejecutar un xsql-script sobre la base datos con array de argumentos

  • SOAP Request:
    Copy
    POST /soap/servlet/rpcrouter HTTP/1.0
    Content-Type: text/xml;charset=utf-8
    Content-Length: 662
    SOAPAction: ""
    Accept-Encoding: gzip
    Authorization: Basic ZGVpc3Rlcl9hano6YWp6MTIz
     
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <ns1:executeXML xmlns:ns1="urn:SOAPXMLServer" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <database xsi:type="xsd:string">demo_formacion</database>
    <xml_code xsi:type="xsd:string">LeerStock</xml_code>
    <arg_data xmlns:ns2="http://xml.apache.org/xml-soap" xsi:type="ns2:ArrayList">
    <item xsi:type="xsd:string">0000000171083</item>
    </arg_data>
    </ns1:executeXML>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • SOAP Response:
    Copy
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
          <ns1:executeXMLResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:SOAPXMLServer">
             <sqlresponse SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
                <sqlresponse country="ES" date="2016-05-06T09:40:06.571Z" date-format="dd-MM-yyyy" dbms="demo_formacion" from="XMLSQLResultSetSerializer" host="mustang_dev2.212.0.125.24" lang="es" number-format="#.##0,###" rows="1" time-format="HH:mm:ss" timestamp-format="dd-MM-yyyy HH:mm:ss" type="rawsql">
                   <sqlinfo>
                      <stdout/>
                      <stderr/>
                      <sqlstmt>&amp;lt;call name=&amp;apos;LeerStock&amp;apos; /&amp;gt;</sqlstmt>
                      <sqlsort/>
                      <sqluser>soap</sqluser>
                      <sqldbms>demo_formacion</sqldbms>
                      <sqlengine/>
                      <sqllang>es-</sqllang>
                      <sqltype/>
                      <sqltime>0</sqltime>
                      <sqlcount>0</sqlcount>
                      <sqlserial>0</sqlserial>
                      <sqlmaxrows>100000</sqlmaxrows>
                      <sqltables></sqltables>
                   </sqlinfo>
                   <metadata>
                      <column catalogName="" columnClassName="java.lang.String" columnDisplaySize="99" columnLabel="(constant&lt;br/>1)" columnName="(constant_1)" columnType="1" columnTypeName="char" isAutoIncrement="false" isCaseSensitive="false" isCurrency="false" isDefinitelyWritable="false" isHidden="false" isNullable="0" isNumeric="false" isPercent="false" isReadOnly="false" isRowid="false" isSigned="false" isTotal="false" isWritable="false" precision="0" scale="0" schemaName="" tableName=""/>
                   </metadata>
                   <rowset encoding="UTF-8" lang="es-">
                      <r>
                         <c><![CDATA[<r>
       <EAN>0000000171083</EAN>
       <Store ID>A10</Store ID>
       <Quantity>8.000</Quantity>
      </r>]]></c>
                      </r>
                   </rowset>
                </sqlresponse>
             </sqlresponse>
          </ns1:executeXMLResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>