以下代码未通过xml反序列化:
var query = new TermQuery();
var results = query.ExecuteQuery(context);
var r = results.Count(); Console.WriteLine(R);
我收到404错误。看起来用于访问SalesTerm查询的资源不可用。
这是请求:
<?xml version="1.0" encoding="utf-8"?><TermQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" />
这是回复
<html><head><title>JBoss Web/2.1.12.GA-patch-03 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Null subresource for path: https://services.intuit.com/sb/none/v2/556745565</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Null subresource for path: https://services.intuit.com/sb/none/v2/556745565</u></p><p><b>description</b> <u>The requested resource (Null subresource for path: https://services.intuit.com/sb/none/v2/556745565) is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/2.1.12.GA-patch-03</h3></body></html>
谢谢!
答案 0 :(得分:3)
这是DevKit中的一个错误。如果查看端点,DevKit会将“none”作为实体类型传递。
https://services.intuit.com/sb/的无强> /
作为一种变通方法,您可以使用DevDefined或类似的库来构建OAuth请求并直接调用服务。这是一个例子: