2017-02-16 62 views
-1

我有一个SOAPUI请求。我需要从一个请求中执行多个产品ID。我们需要从SOAPUI进行更新。这是请求:如何从一个SOAPUI请求执行多个记录

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
     <SOAP-ENV:Body> 
      <DataService> 
      <Identity> 
       <DirectoryPath> 
        <Directory type="Enterprise">AP</Directory> 
        <Directory type="User">admin</Directory> 
       </DirectoryPath> 
       <Authentication type="password">admin</Authentication> 
      </Identity> 
      <Transaction> 
       <Command type="Modify"> 
        <!--The Supported CommandTypes for Save are Add and Modify--> 
        <MasterCatalogRecord etype="Entity" commandqualifier="NoValidate/NoProcess"> 
         <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process--> 
         <ExternalKeys> 
         <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
         <Key name="PRODUCTID" type="string">SYS1</Key> 
         </ExternalKeys> 
         <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
         </EntityData>   
        </MasterCatalogRecord> 
       </Command> 
      </Transaction> 
      </DataService> 
     </SOAP-ENV:Body> 
    </SOAP-ENV:Envelope> 
+0

是否要在同一个'MasterCatalog'中添加/编辑多个记录?你究竟想要做什么? – Rao

+0

你想修改相关记录或多个单一记录吗? –

回答

1

下面是示例要求通过单个请求添加多个记录(不相关)与不同的产品ID:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.tibco.com/cim/services/mastercatalogrecord/wsdl/2.0"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <DataService version="2.0" xmlns="http://www.tibco.com/cim/services/mastercatalogrecord/wsdl/2.0"> 
     <Identity> 
      <DirectoryPath> 
       <Directory type="Enterprise">AP</Directory> 
       <Directory type="User">admin</Directory> 
      </DirectoryPath> 
      <Authentication>admin</Authentication> 
     </Identity> 
     <Transaction atomic="on"> 
      <Command type="Modify"> 
       <!--The Supported CommandTypes for Save are Add and Modify--> 
       <MasterCatalogRecord etype="Entity" commandqualifier="NoValidate/NoProcess"> 
        <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process--> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
        <Key name="PRODUCTID" type="string">SYS1</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
      </Command> 
      <Command type="Modify"> 
       <!--The Supported CommandTypes for Save are Add and Modify--> 
       <MasterCatalogRecord etype="Entity" commandqualifier="NoValidate/NoProcess"> 
        <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process--> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
        <Key name="PRODUCTID" type="string">SYS2</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
      </Command> 
      <Command type="Modify"> 
       <!--The Supported CommandTypes for Save are Add and Modify--> 
       <MasterCatalogRecord etype="Entity" commandqualifier="NoValidate/NoProcess"> 
        <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process--> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
        <Key name="PRODUCTID" type="string">SYS3</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
      </Command> 
     </Transaction> 
     </DataService> 
    </soapenv:Body> 
</soapenv:Envelope> 

及以下的要求,广告中多个相关记录通过单个请求:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
    <SOAP-ENV:Body> 
     <DataService version="2.0" xmlns="http://www.tibco.com/cim/services/mastercatalogrecord/wsdl/2.0"> 
     <Identity> 
      <DirectoryPath> 
       <Directory type="Enterprise">AP</Directory> 
       <Directory type="User">admin</Directory> 
      </DirectoryPath> 
      <Authentication type="password">admin</Authentication> 
     </Identity> 
     <Transaction atomic="on"> 
      <Command type="Modify"> 
       <!--The Supported CommandTypes for Save are Add and Modify--> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess--> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
        <Key name="PRODUCTID" type="string">SYS1</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>SystemToClient</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT</Key> 
           <Key name="PRODUCTID" type="string">CLI1</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT</Key> 
        <Key name="PRODUCTID" type="string">CLI1</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_B</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>C1toC2</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
           <Key name="PRODUCTID" type="string">c25</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
        <Key name="PRODUCTID" type="string">c25</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_C</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
        <Key name="PRODUCTID" type="string">c25</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_B</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>C2toC3</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT3</Key> 
           <Key name="PRODUCTID" type="string">c25</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT3</Key> 
        <Key name="PRODUCTID" type="string">c25</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_C</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
      </Command> 
      <Command type="Modify"> 
       <!--The Supported CommandTypes for Save are Add and Modify--> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <!--The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess--> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">SYSTEM</Key> 
        <Key name="PRODUCTID" type="string">SYS2</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="RECORD_STATE" type="string">Confirmed</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>SystemToClient</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT</Key> 
           <Key name="PRODUCTID" type="string">CLI2</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT</Key> 
        <Key name="PRODUCTID" type="string">CLI2</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_B</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>C1toC2</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
           <Key name="PRODUCTID" type="string">c251</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
        <Key name="PRODUCTID" type="string">c251</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_C</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT2</Key> 
        <Key name="PRODUCTID" type="string">c251</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_B</Attribute> 
        </EntityData> 
        <RelationshipData> 
        <Relationship> 
         <RelationType>C2toC3</RelationType> 
         <RelatedEntities> 
          <MasterCatalogRecord etype="Entity"> 
           <ExternalKeys> 
           <Key name="MASTERCATALOGNAME" type="string">CLIENT3</Key> 
           <Key name="PRODUCTID" type="string">c251</Key> 
           </ExternalKeys> 
          </MasterCatalogRecord> 
         </RelatedEntities> 
        </Relationship> 
        </RelationshipData> 
       </MasterCatalogRecord> 
       <MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process"> 
        <ExternalKeys> 
        <Key name="MASTERCATALOGNAME" type="string">CLIENT3</Key> 
        <Key name="PRODUCTID" type="string">c251</Key> 
        </ExternalKeys> 
        <EntityData> 
        <Attribute name="attr1_string" type="string">Test_C</Attribute> 
        </EntityData> 
       </MasterCatalogRecord> 
      </Command> 
     </Transaction> 
     </DataService> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope>