0

Using Websphere Commerce V7, FP6, FEP5.
I am attempting to do an update to our catalog using the ChangeCatalogEntry web service. I am able to update a single product just fine. My problem is that any additional CatalogEntry nodes are completely ignored. It appears to process only the first CatalogEntry node it finds. I am using SoapUI to submit the requests. Here is a sample that I am attempting to submit. In this example part number p_MAT153 is updated but p_MAT203 and p_MAT185 are not. Is the webservice designed to only update a single product per message?

<?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>
4

2 回答 2

0

补充一点:您可以在同一个数据对象上运行多个操作,例如创建属性、删除属性、设置 SEO 数据等。但是,如果您不按顺序对操作进行排序,这可能会混淆图形对象添加,更改和删除。

于 2013-09-16T20:00:17.740 回答
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>
于 2013-07-02T21:03:04.677 回答