- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在解码时遇到异常。
javax.xml.bind.UnmarshalException: unexpected element (uri:"http://alexa.amazonaws.com/doc/2005-10-05/", local:"TrafficHistoryResponse"). Expected elements are <{}TrafficHistoryResponse>
<?xml version="1.0"?>
<aws:TrafficHistoryResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/">
<aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11">
<aws:OperationRequest>
<aws:RequestId>6b09364e-ac0d-686c-cb95-0b1393fd234e</aws:RequestId>
</aws:OperationRequest>
<aws:TrafficHistoryResult>
<aws:Alexa>
<aws:TrafficHistory>
<aws:Range>31</aws:Range>
<aws:Site>www.google.com</aws:Site>
<aws:Start>2014-09-17</aws:Start>
<aws:HistoricalData>
<aws:Data>
<aws:Date>2014-09-17</aws:Date>
<aws:PageViews>
<aws:PerMillion>127970</aws:PerMillion>
<aws:PerUser>27.04</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>507000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-18</aws:Date>
<aws:PageViews>
<aws:PerMillion>125880</aws:PerMillion>
<aws:PerUser>26.46</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>503000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-19</aws:Date>
<aws:PageViews>
<aws:PerMillion>120840</aws:PerMillion>
<aws:PerUser>25.15</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>497000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-20</aws:Date>
<aws:PageViews>
<aws:PerMillion>86640</aws:PerMillion>
<aws:PerUser>17.47</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>461000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-21</aws:Date>
<aws:PageViews>
<aws:PerMillion>85550</aws:PerMillion>
<aws:PerUser>17.39</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>463000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-22</aws:Date>
<aws:PageViews>
<aws:PerMillion>130800</aws:PerMillion>
<aws:PerUser>28.02</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>507000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-23</aws:Date>
<aws:PageViews>
<aws:PerMillion>128410</aws:PerMillion>
<aws:PerUser>27.23</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>501000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-24</aws:Date>
<aws:PageViews>
<aws:PerMillion>127350</aws:PerMillion>
<aws:PerUser>26.79</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>502000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-25</aws:Date>
<aws:PageViews>
<aws:PerMillion>125800</aws:PerMillion>
<aws:PerUser>26.35</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>499000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-26</aws:Date>
<aws:PageViews>
<aws:PerMillion>123290</aws:PerMillion>
<aws:PerUser>25.60</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>493000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-27</aws:Date>
<aws:PageViews>
<aws:PerMillion>87840</aws:PerMillion>
<aws:PerUser>17.58</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>459000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-28</aws:Date>
<aws:PageViews>
<aws:PerMillion>86350</aws:PerMillion>
<aws:PerUser>17.45</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>462000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-29</aws:Date>
<aws:PageViews>
<aws:PerMillion>130110</aws:PerMillion>
<aws:PerUser>27.71</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>500000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-09-30</aws:Date>
<aws:PageViews>
<aws:PerMillion>130220</aws:PerMillion>
<aws:PerUser>27.42</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>498000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-01</aws:Date>
<aws:PageViews>
<aws:PerMillion>131730</aws:PerMillion>
<aws:PerUser>27.12</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>500000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-02</aws:Date>
<aws:PageViews>
<aws:PerMillion>127800</aws:PerMillion>
<aws:PerUser>26.41</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>496000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-03</aws:Date>
<aws:PageViews>
<aws:PerMillion>100820</aws:PerMillion>
<aws:PerUser>18.61</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>461500</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-04</aws:Date>
<aws:PageViews>
<aws:PerMillion>73500</aws:PerMillion>
<aws:PerUser>14.07</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>421300</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-05</aws:Date>
<aws:PageViews>
<aws:PerMillion>72850</aws:PerMillion>
<aws:PerUser>14.09</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>427600</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-06</aws:Date>
<aws:PageViews>
<aws:PerMillion>100790</aws:PerMillion>
<aws:PerUser>20.06</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>467800</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-07</aws:Date>
<aws:PageViews>
<aws:PerMillion>103560</aws:PerMillion>
<aws:PerUser>20.10</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>469200</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-08</aws:Date>
<aws:PageViews>
<aws:PerMillion>103220</aws:PerMillion>
<aws:PerUser>20.12</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>471900</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-09</aws:Date>
<aws:PageViews>
<aws:PerMillion>104180</aws:PerMillion>
<aws:PerUser>19.82</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>470700</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-10</aws:Date>
<aws:PageViews>
<aws:PerMillion>97980</aws:PerMillion>
<aws:PerUser>18.43</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>461700</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-11</aws:Date>
<aws:PageViews>
<aws:PerMillion>76100</aws:PerMillion>
<aws:PerUser>14.42</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>437200</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-12</aws:Date>
<aws:PageViews>
<aws:PerMillion>74820</aws:PerMillion>
<aws:PerUser>14.26</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>435900</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-13</aws:Date>
<aws:PageViews>
<aws:PerMillion>102590</aws:PerMillion>
<aws:PerUser>19.99</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>469300</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-14</aws:Date>
<aws:PageViews>
<aws:PerMillion>103400</aws:PerMillion>
<aws:PerUser>19.04</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>467400</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-15</aws:Date>
<aws:PageViews>
<aws:PerMillion>103040</aws:PerMillion>
<aws:PerUser>19.01</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>475000</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-16</aws:Date>
<aws:PageViews>
<aws:PerMillion>102640</aws:PerMillion>
<aws:PerUser>19.49</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>465400</aws:PerMillion>
</aws:Reach>
</aws:Data>
<aws:Data>
<aws:Date>2014-10-17</aws:Date>
<aws:PageViews>
<aws:PerMillion>99020</aws:PerMillion>
<aws:PerUser>18.58</aws:PerUser>
</aws:PageViews>
<aws:Rank>1</aws:Rank>
<aws:Reach>
<aws:PerMillion>459800</aws:PerMillion>
</aws:Reach>
</aws:Data>
</aws:HistoricalData>
</aws:TrafficHistory>
</aws:Alexa>
</aws:TrafficHistoryResult>
<aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/">
<aws:StatusCode>Success</aws:StatusCode>
</aws:ResponseStatus>
</aws:Response>
</aws:TrafficHistoryResponse>
import java.io.Serializable;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "TrafficHistoryResponse")
public class AlexaResult implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3068403572663448394L;
private AlexaResponse alexaResponse;
@XmlElement(name="Response")
public AlexaResponse getAlexaResponse() {
return alexaResponse;
}
public void setAlexaResponse(AlexaResponse alexaResponse) {
this.alexaResponse = alexaResponse;
}
}
请帮助我!
最佳答案
您缺少命名空间声明。您是否手动创建 Java 类? (看起来像这样。)
然后添加 package-info.java
然后 @XmlSchema对您的包进行注释注释。
@javax.xml.bind.annotation.XmlSchema(namespace = "http://alexa.amazonaws.com/doc/2005-10-05/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.acme.foo.myPackage;
关于java - 在 JAXB 中解码时出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26459916/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!