The FindProductByName function is used to to find one or more products by product name.

The product name can be a partial entry (for example, to find "MyApplicationA" and "MyApplicationB" you could enter only "MyApplication") and is case-insensitive (for example, "myapplication" and "MYAPPLICATION" are interpreted as the same entries).

This function uses an offset and requires a login token, which is obtained using the Login function. 

Return values

The response is of the type Soap_Response_List_Product, with result_array of type ArrayOfSoap_Product.

Example request

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.lac0.pl:8080/soap/type/vendor/version/1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:FindProductByName soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <token xsi:type="xsd:string">fa2a900090a1db29b769725418c1a2fe6b57733f</token>
         <name xsi:type="xsd:string">Product</name>
         <offset xsi:type="xsd:int">0</offset>
      </ns:FindProductByName>
   </soapenv:Body>
</soapenv:Envelope>

Example response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.lac0.pl:8080/soap/type/vendor/version/1"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <ns1:FindProductByNameResponse>
         <return xsi:type="ns1:Soap_Response_List_Product">
            <result_array SOAP-ENC:arrayType="ns1:Soap_Product[2]" xsi:type="ns1:ArrayOfSoap_Product">
               <item xsi:type="ns1:Soap_Product">
                  <id xsi:type="xsd:int">2</id>
                  <name xsi:type="xsd:string">Product test 1</name>
                  <version xsi:type="xsd:string">1.0</version>
                  <description xsi:type="xsd:string">test</description>
                  <ProductTemplates SOAP-ENC:arrayType="ns1:Soap_ProductTemplate[2]" xsi:type="ns1:ArrayOfSoap_ProductTemplate">
                     <item xsi:type="ns1:Soap_ProductTemplate">
                        <id xsi:type="xsd:int">3</id>
                        <name xsi:type="xsd:string">Default</name>
                     </item>
                     <item xsi:type="ns1:Soap_ProductTemplate">
                        <id xsi:type="xsd:int">6</id>
                        <name xsi:type="xsd:string">ProductTemplate test 1</name>
                     </item>
                  </ProductTemplates>
               </item>
               <item xsi:type="ns1:Soap_Product">
                  <id xsi:type="xsd:int">3</id>
                  <name xsi:type="xsd:string">Product test 2</name>
                  <version xsi:type="xsd:string">2.0</version>
                  <description xsi:type="xsd:string">test</description>
                  <ProductTemplates SOAP-ENC:arrayType="ns1:Soap_ProductTemplate[2]" xsi:type="ns1:ArrayOfSoap_ProductTemplate">
                     <item xsi:type="ns1:Soap_ProductTemplate">
                        <id xsi:type="xsd:int">7</id>
                        <name xsi:type="xsd:string">Default</name>
                     </item>
                     <item xsi:type="ns1:Soap_ProductTemplate">
                        <id xsi:type="xsd:int">8</id>
                        <name xsi:type="xsd:string">ProductTemplate test 2</name>
                     </item>
                  </ProductTemplates>
               </item>
            </result_array>
            <result_code xsi:type="xsd:int">0</result_code>
            <result_string xsi:nil="true"/>
         </return>
      </ns1:FindProductByNameResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels