You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/06/05 03:59:48 UTC

[GitHub] imlidian commented on issue #732: SCB-333 Update to support the date time with JSR-310

imlidian commented on issue #732: SCB-333 Update to support the date time with JSR-310
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-394574079
 
 
   The Error and my test case implement way as follows. Did I miss something about adding one test case?
   
   Error:
   2018-06-05 10:24:19,605 [WARN] consumer method org.apache.servicecomb.demo.springmvc.client.CodeFirstSpringmvcIntf:testObject not exist in contract. org.apache.servicecomb.swagger.engine.SwaggerEnvironment.createConsumer(SwaggerEnvironment.java:98)
   
   Exception in thread "main" java.lang.IllegalStateException: Consumer method org.apache.servicecomb.demo.springmvc.client.CodeFirstSpringmvcIntf:testObject not exist in contract, microserviceName=springmvc, schemaId=codeFirst; new producer not running or not deployed.
   
   Interface Side:
   public interface CodeFirstSpringmvcIntf {
    
      Object testObject(Object input);
    
     LocalDate testLocalDate(LocalDate input);
   
     //LocalDateTime testLocalDateTime(LocalDateTime input);
   
   
   }
   Server Side:
   @RestSchema(schemaId = "codeFirst")
    @RequestMapping(path = "/codeFirstSpringmvc", produces = MediaType.APPLICATION_JSON_VALUE)
    public class CodeFirstSpringmvc {
        return input;
      }
     @PostMapping(path = "/testLocalDate")
     public LocalDate testLocalDate(@RequestBody LocalDate input) {
        return input;
      }
   
   Client Side:
   b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestObject.java
    public class TestObject {
        TestMgr.check("str", result);
        TestMgr.check(String.class, result.getClass());
    
       // LocalDate
       result = intf.testLocalDate(LocalDate.of(1968, 12, 8));
       TestMgr.check(LocalDate.of(1968, 12, 8), result);
       TestMgr.check(LocalDate.class, result.getClass());
   
       result = restTemplate.postForObject(prefix  "/object", "str", String.class);
       TestMgr.check("str", result);
       TestMgr.check(String.class, result.getClass());
   }

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services