Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml Microsoft CommerceServer Web服务搜索子句_Xml_Web Services_Soap_Commerce - Fatal编程技术网

Xml Microsoft CommerceServer Web服务搜索子句

Xml Microsoft CommerceServer Web服务搜索子句,xml,web-services,soap,commerce,Xml,Web Services,Soap,Commerce,我正在使用MicrosoftCommerceServer,最近我学习了如何使用XMLWeb服务。我需要使用“updateitems”方法更新一些产品 SOAP信封如下所示: <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/en

我正在使用MicrosoftCommerceServer,最近我学习了如何使用XMLWeb服务。我需要使用“updateitems”方法更新一些产品

SOAP信封如下所示:

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
<UpdateItems xmlns="http://schemas.microsoft.com/CommerceServer/2006/06/CatalogWebService">
  <catalogName>string</catalogName>
  <searchClause>string</searchClause>
  <propertyName>string</propertyName>
  <replacementValue />
  <classTypes>None or CategoryClass or ProductVariantClass or ProductClass or ProductFamilyClass or ProductFamilyForVariantsClass or ProductVariantsForFamilyClass or AllClassTypesClass</classTypes>
  <language>string</language>
</UpdateItems>
</soap:Body>
</soap:Envelope>
$client = new nusoap_client($wsdl, TRUE);
$client->setCredentials('', '', 'ntlm');
$client->setUseCurl(true);
$client->useHTTPPersistentConnection();
$client->setCurlOption(CURLOPT_USERPWD, *);

$m = array(
'catalogName' => 'cat',
'propertyName => 'itemdesc',
'replacementValue' => 'somevalue'
);
$resp = ($client->call('UpdateItems', $m));

我不理解的是搜索条款。我不知道这些表或列的名称,因为我处理的是敏感数据,而且很多敏感数据,我不想通过反复试验进行测试。我想在搜索子句中执行类似“ProductID=159999”的操作,但它没有。

几个指导要点:

  • SearchClaire属性:SearchClaire允许您基于您的_ProductCatalog数据库内的_CatalogProducts表中的属性构建where子句,其中引用您的目录名称(可在Commerce Server catalog Manager中查看),并引用您为Commerce Server站点提供的名称

  • 属性名称:您在这里使用的属性名称将对应于您正在更新的实体的类类型。单击此处了解有关各种类类型的更多信息。要了解哪些属性映射到哪些实体,可以查看Commerce Server Catalog和Inventory Schema Manager。在这里可以找到所有特性定义、产品定义、类别定义和目录定义

  • 示例搜索子句,用于更新网球鞋的红色产品变体的标价,该网球鞋的产品id为ABC123和变体id(鞋子的红色变体颜色是ABC123-red。我不熟悉nuSoap,但根据上面的示例,我认为您的代码应该是这样的。此外,您需要正确地转义下面search子句中的单引号。)

    $client = new nusoap_client($wsdl, TRUE);
    $client->setCredentials('', '', 'ntlm');
    $client->setUseCurl(true);
    $client->useHTTPPersistentConnection();
    $client->setCurlOption(CURLOPT_USERPWD, *);
    
    $m = array(
    'catalogName' => 'YourCatalogName',
    'searchClause' => '(ProductId = ''ABC123'' AND VariantId = ''ABC123-RED'')',
    'propertyName => 'Description',
    'replacementValue' => 'Red is the new color for fall, check out these kicks!'
    );
    $resp = ($client->call('UpdateItems', $m));
    
    显然,如果属性名中有空格,则需要使用[]作为分隔符,如“[My Custom Column]”

    最好先熟悉存储产品目录的SQL数据库表,然后使用Commerce Server catalog and Inventory Manager和Commerce Server catalog Manager检查当前数据实例的当前数据配置

    你可能想考虑一下微软,然后是仙人掌,然后是Acthunm,现在拥有该产品的史米斯多年来一直说这些基于ASMX的Web服务正在消失,所以你可能只想编写自己的服务来消耗API。我建议你对更新有更大的控制权。在QL中,我建议深入研究我上面提到的产品目录数据库,它的结构非常简单,并且非常容易编写SSI或其他批量复制操作