質問編集履歴

1

エラーメッセージを追記

2020/03/10 12:37

投稿

fishStory
fishStory

スコア10

test CHANGED
File without changes
test CHANGED
@@ -90,9 +90,13 @@
90
90
 
91
91
  #実行結果/エラー内容
92
92
 
93
- > ] with org.springframework.http.converter.StringHttpMessageConverter
94
-
95
- 2020-03-10 19:39:15.146 [ERROR] [scheduling-1doSecondaryResponse:659] org.springframework.web.client.HttpClientErrorException$UnsupportedMediaType: 415 Unsupported Media Type: [<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
93
+ > 2020-03-10 21:35:44.478 [DEBUG] [scheduling-1Accept=[text/plain, application/json, application/*+json, */*]
94
+
95
+ 2020-03-10 21:35:44.478 [DEBUG] [scheduling-1Writing [<id>100</id>
96
+
97
+ ] with org.springframework.http.converter.StringHttpMessageConverter
98
+
99
+ 2020-03-10 21:35:45.014 [ERROR] [scheduling-1doSecondaryResponse:684] org.springframework.web.client.HttpClientErrorException$UnsupportedMediaType: 415 Unsupported Media Type: [<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
96
100
 
97
101
  <error>
98
102
 
@@ -114,8 +118,6 @@
114
118
 
115
119
 
116
120
 
117
-
118
-
119
121
  #環境
120
122
 
121
123
  java8
@@ -188,7 +190,9 @@
188
190
 
189
191
 
190
192
 
191
- 他にも、明示的にxmlになるようにしてみましたが、同様のエラーが出ます
193
+ 他にも、明示的にxmlになるようにしてみましたが、xmlではなくyang-data+xmlで指定するようにとのエラーが出ます
194
+
195
+ MediaTypeではyang-data+xmlが指定できません。
192
196
 
193
197
  ```java
194
198
 
@@ -211,3 +215,27 @@
211
215
  }
212
216
 
213
217
  ```
218
+
219
+
220
+
221
+ > 2020-03-10 21:23:11.488 [DEBUG] [scheduling-1Accept=[text/plain, application/json, application/*+json, */*]
222
+
223
+ 2020-03-10 21:23:11.488 [DEBUG] [scheduling-1Writing [<?xml version="1.0" encoding="utf-8"?><id>100</id>
224
+
225
+ ] as "application/xml"
226
+
227
+ 2020-03-10 21:23:11.945 [ERROR] [scheduling-1doSecondaryResponse:684] org.springframework.web.client.HttpClientErrorException$UnsupportedMediaType: 415 Unsupported Media Type: [<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
228
+
229
+ <error>
230
+
231
+ <error-message>Unsupported media type: application/xml ; Should be one of: application/yang-data+xml, application/yang-data+json.</error-message>
232
+
233
+ <error-tag>malformed-message</error-tag>
234
+
235
+ <error-type>application</error-type>
236
+
237
+ </error>
238
+
239
+ </errors>
240
+
241
+ ]