liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor 
use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r194625117
 
 

 ##########
 File path: 
demo/demo-schema/src/main/java/org/apache/servicecomb/demo/CodeFirstRestTemplate.java
 ##########
 @@ -123,6 +128,23 @@ private void testCodeFirstTextPlain(RestTemplate 
template, String cseUrlPrefix)
     TestMgr.check(body, result);
   }
 
+  private void testCodeFirstAppXml(RestTemplate template, String cseUrlPrefix) 
{
+    JAXBPerson person = new JAXBPerson("jake", 22, "it", "60kg");
+    person.setJob(new JAXBJob("developer", "coding"));
+    System.out.println("person:\n" + person);
+    HttpHeaders headers = new HttpHeaders();
+    headers.add("Accept", MediaType.APPLICATION_XML_VALUE);
+    headers.add("Content-Type", MediaType.APPLICATION_XML_VALUE);
+    HttpEntity<JAXBPerson> requestEntity = new HttpEntity<>(person, headers);
+    ResponseEntity<JAXBPerson> resEntity = template.exchange(cseUrlPrefix + 
"appXml",
+        HttpMethod.POST,
+        requestEntity,
+        JAXBPerson.class);
+    System.out.println("result:\n" + resEntity.getBody());
 
 Review comment:
   Change to TestMgr.check
   to check the content is correct.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to