无法在单个请求中向ChangeCatalogEntry Web服务(Websphere Commerce)提交多个产品

时间:2013-06-20 12:55:41

标签: websphere websphere-commerce

使用Websphere Commerce V7,FP6,FEP5 我正在尝试使用ChangeCatalogEntry Web服务更新我们的目录。我可以很好地更新单个产品。我的问题是任何额外的CatalogEntry节点都被完全忽略。它似乎只处理它找到的第一个CatalogEntry节点。我正在使用SoapUI提交请求。这是我试图提交的示例。在此示例中,部件号p_MAT153已更新,但p_MAT203和p_MAT185未更新。 Web服务是否设计为仅针对每条消息更新单个产品?

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1">
            <wsse:UsernameToken>
                <wsse:Username>
                    wcs_sonic
                </wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
                    passw0rd
                </wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
<ChangeCatalogEntry xmlns:udt="http://www.openapplications.org/oagis/9/unqualifieddatatypes/1.1"
                    xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation"
                    xmlns="http://www.ibm.com/xmlns/prod/commerce/9/catalog"
                    xmlns:oa="http://www.openapplications.org/oagis/9"
                    xmlns:clmIANAMIMEMediaTypes="http://www.openapplications.org/oagis/9/IANAMIMEMediaTypes:2003"
                    xmlns:oacl="http://www.openapplications.org/oagis/9/codelists"
                    xmlns:clm54217="http://www.openapplications.org/oagis/9/currencycode/54217:2001"
                    xmlns:clm5639="http://www.openapplications.org/oagis/9/languagecode/5639:1988"
                    xmlns:qdt="http://www.openapplications.org/oagis/9/qualifieddatatypes/1.1"
                    xmlns:clm66411="http://www.openapplications.org/oagis/9/unitcode/66411:2001"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/9/catalog C:/Users/SteveS/MuleStudio/workspace/shapeitdeltaupdates/src/main/resources/WebContent/component-services/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ChangeCatalogEntry.xsd"
                    releaseID="9.0"
                    versionID="7.0.0.0">
   <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType">
      <oa:CreationDateTime>2013-04-29T15:38:19.173-04:00</oa:CreationDateTime>
      <_wcf:BusinessContext>
         <_wcf:ContextData name="storeId">10651</_wcf:ContextData>
         <_wcf:ContextData name="catalogId">10051</_wcf:ContextData>
      </_wcf:BusinessContext>
   </oa:ApplicationArea>
   <DataArea>
      <oa:Change>
         <oa:ActionCriteria>
            <oa:ActionExpression actionCode="Change" expressionLanguage="_wcf:XPath">/CatalogEntry[1]/Description[1]</oa:ActionExpression>
         </oa:ActionCriteria>
      </oa:Change>
      <CatalogEntry>
         <CatalogEntryIdentifier>
            <_wcf:ExternalIdentifier ownerID="7000000000000000601">
               <_wcf:PartNumber>p_MAT153</_wcf:PartNumber>
               <_wcf:StoreIdentifier>
                  <_wcf:UniqueID>10551</_wcf:UniqueID>
               </_wcf:StoreIdentifier>
            </_wcf:ExternalIdentifier>
         </CatalogEntryIdentifier>
         <Description language="-1">
            <Name>Absorbent Pants Roll</Name>
            <ShortDescription>     universal XSMP133</ShortDescription>
            <LongDescription>These are my pants.</LongDescription>
            <Attributes name="auxDescription1">I need an aux description</Attributes>
         </Description>
      </CatalogEntry>
      <CatalogEntry>
         <CatalogEntryIdentifier>
            <_wcf:ExternalIdentifier ownerID="7000000000000000601">
               <_wcf:PartNumber>p_MAT203</_wcf:PartNumber>
               <_wcf:StoreIdentifier>
                  <_wcf:UniqueID>10551</_wcf:UniqueID>
               </_wcf:StoreIdentifier>
            </_wcf:ExternalIdentifier>
         </CatalogEntryIdentifier>
         <Description language="-1">
            <Name>Absorbent Mat Roll</Name>
            <ShortDescription>     universal XSMP133</ShortDescription>
            <LongDescription>These are not my pants. These are your pants.</LongDescription>
            <Attributes name="auxDescription1">These pants should be washed regularly.</Attributes>
         </Description>
      </CatalogEntry>
      <CatalogEntry>
         <CatalogEntryIdentifier>
            <_wcf:ExternalIdentifier ownerID="7000000000000000601">
               <_wcf:PartNumber>p_MAT185</_wcf:PartNumber>
               <_wcf:StoreIdentifier>
                  <_wcf:UniqueID>10551</_wcf:UniqueID>
               </_wcf:StoreIdentifier>
            </_wcf:ExternalIdentifier>
         </CatalogEntryIdentifier>
         <Description language="-1">
            <Name>Pants on a Roll</Name>
            <ShortDescription>     universal XSMP133</ShortDescription>
            <LongDescription>A roll of pants. Genuius. </LongDescription>
            <Attributes name="auxDescription1">Still more pants. Need a different aux description.</Attributes>
         </Description>
      </CatalogEntry>
   </DataArea>
</ChangeCatalogEntry>
    </soapenv:Body>
</soapenv:Envelope>

2 个答案:

答案 0 :(得分:0)

答案结果是在oa:ActionCriteria节点中。我需要为CatalogEntry的每个实例提供匹配的节点。

        <oa:ActionCriteria>
            <oa:ActionExpression actionCode="Change" expressionLanguage="_wcf:XPath">/CatalogEntry[1]/Description[1]</oa:ActionExpression>
        </oa:ActionCriteria>
        <oa:ActionCriteria>
            <oa:ActionExpression actionCode="Change" expressionLanguage="_wcf:XPath">/CatalogEntry[2]/Description[1]</oa:ActionExpression>
        </oa:ActionCriteria>
        <oa:ActionCriteria>
            <oa:ActionExpression actionCode="Change" expressionLanguage="_wcf:XPath">/CatalogEntry[3]/Description[1]</oa:ActionExpression>
        </oa:ActionCriteria>

答案 1 :(得分:0)

只是添加到:你可以运行几个动作子相同的数据对象,例如创建属性,删除属性,设置SEO数据等。但是,如果你不对动作进行排序,这可能会混淆图形对象按添加,更改和删除的顺序。