Examples of populateObject()


Examples of com.jaxws.json.codec.decode.WSJSONPopulator.populateObject()

  public void testPopulatePrimitive() throws Exception{
   
    WSJSONPopulator populator = new WSJSONPopulator(null, null, null, null, null);
    JSONReader r = new JSONReader();
    TestClass object = new TestClass();
    populator.populateObject(object, (Map) r.read("{\"name\":\"nm\"}"), null, null);
    assertEquals(object.name, "nm");
    assertEquals(object.values, null);
   
    populator.populateObject(object, (Map) r.read("{\"integer\":\"24\"}"), null, null);
    assertEquals(object.integer, 24);
View Full Code Here

Examples of com.jaxws.json.codec.decode.WSJSONPopulator.populateObject()

    TestClass object = new TestClass();
    populator.populateObject(object, (Map) r.read("{\"name\":\"nm\"}"), null, null);
    assertEquals(object.name, "nm");
    assertEquals(object.values, null);
   
    populator.populateObject(object, (Map) r.read("{\"integer\":\"24\"}"), null, null);
    assertEquals(object.integer, 24);
    assertEquals(object.values, null);
  }
 
  public void testList() throws Exception{
View Full Code Here

Examples of com.jaxws.json.codec.decode.WSJSONPopulator.populateObject()

  public void testList() throws Exception{
   
    WSJSONPopulator populator = new WSJSONPopulator(null, null, null, null, null);
    JSONReader r = new JSONReader();
    TestClass object = new TestClass();
    populator.populateObject(object, (Map) r.read("{\"values\":[\"nm\"]}"), null, null);
    assertEquals(object.name, null);
    assertEquals(object.values.size(), 1);
    assertEquals(object.values.get(0), "nm");
   
    // empty list
View Full Code Here

Examples of com.jaxws.json.codec.decode.WSJSONPopulator.populateObject()

    assertEquals(object.name, null);
    assertEquals(object.values.size(), 1);
    assertEquals(object.values.get(0), "nm");
   
    // empty list
    populator.populateObject(object, (Map) r.read("{\"values\":[]}"), null, null);
    assertNotNull(object.values);
    assertEquals(object.values.size(), 0);
  }
 
  // Test date plain format with date as number / date as string
View Full Code Here

Examples of com.jaxws.json.codec.decode.WSJSONPopulator.populateObject()

                //throw new RuntimeException(String.format("Request parameter %s can't be null. B.P 1.1 vilation", part.getKey()));
              }
       
        Object val = null;
              if(!WSJSONPopulator.isJSONPrimitive(parameterType)){
                val = jsonPopulator.populateObject(jsonPopulator.getNewInstance(parameterType),
                    (Map<String,Object>)operationParameters.get(part.getKey()),jsonwebService,
                    (List<MIMEPart>) invocationProperties.get(JSONCodec.MIME_ATTACHMENTS));
              } else {
                val  = jsonPopulator.convert(parameterType, null, operationParameters.get(part.getKey()),
                    seiMethod != null ? seiMethod.getAnnotation(JSONWebService.class) : null, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.