Oracle Service Cloud SOAP API RunAnalyticsReport过滤器问题

时间:2018-03-14 08:15:45

标签: oracle soap rightnow-crm oracle-service-cloud

这是关于Oracle Service Cloud SOAP。

我的包版广告:我希望能够使用关键字过滤(answers.search_fnl)。

下面我有一个SOAP标记,它使用报告ID来访问报告。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AppID>getFAQbyKeyword</ns7:AppID>
      </ns7:ClientInfoHeader>
      <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>username</wsse:Username>
            <wsse:Password>password</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns7:RunAnalyticsReport xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AnalyticsReport xsi:type="ns7:AnalyticsReport" xmlns:ns7="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ID id="#" xmlns="urn:base.ws.rightnow.com/v1_2"/>
         </ns7:AnalyticsReport>
      </ns7:RunAnalyticsReport>
   </soapenv:Body>
</soapenv:Envelope>

我现在想把这部分包含在其中:

        <ns7:Filters xsi:type="ns7:AnalyticsReportFilter">
           <ns7:Name>answers.search_fnl</ns7:Name>
           <ns7:Values>test</ns7:Values>
        </ns7:Filters>

我的尝试是:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AppID>getFAQbyKeyword</ns7:AppID>
      </ns7:ClientInfoHeader>
      <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>username</wsse:Username>
            <wsse:Password>password</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns7:RunAnalyticsReport xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AnalyticsReport xsi:type="ns7:AnalyticsReport" xmlns:ns7="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ID id="#" xmlns="urn:base.ws.rightnow.com/v1_2"/>
            <ns7:Filters xsi:type="ns7:AnalyticsReportFilter">
               <ns7:Name>answers.search_fnl</ns7:Name>
               <ns7:Values>test</ns7:Values>
            </ns7:Filters>
         </ns7:AnalyticsReport>
      </ns7:RunAnalyticsReport>
   </soapenv:Body>
</soapenv:Envelope>

我的错误是:

RightNowSyncService|urn:wsdl.ws.rightnow.com/v1_2 failed

Found out-of-order or unrecognized node

Filters|urn:messages.ws.rightnow.com/v1_2 while parsing node of type AnalyticsReport|urn:objects.ws.rightnow.com/v1_2

Failure in setting value for object RunAnalyticsReportMsg element AnalyticsReport of type objects_ws_rightnow_com_v1_2::AnalyticsReport

Failure in setting value for object RunAnalyticsReport element RunAnalyticsReport of type messages_ws_rightnow_com_v1_2::RunAnalyticsReportMsg

由于缺少或无效的XML

,从RunAnalyticsReport反序列化程序返回NULL

解决方案是否可以是SOAP结构,包括必要的编辑。

提前谢谢!

1 个答案:

答案 0 :(得分:0)

答案:

<ID id="#" xmlns="urn:base.ws.rightnow.com/v1_2"/> <Filters xmlns="urn:objects.ws.rightnow.com/v1_2"> <Name>answers.search_fnl</Name> <Values>string</Values> </Filters>