Hello !!! I'm sorry for my English , is not very good !!
I'm new of this forum, I have created a RestFull Ws in Spring.
I have this controller :
It get a Model Attribute as input parameter.Code:@RequestMapping(value = "/modifyGallery") public @ResponseBody Gallery modifyGallery( @ModelAttribute("gallery") Gallery gallery) throws Exception { }
I have to call this with a client in another server with ( i think ) RestTemplate class .
Now i don't know as i pass the parameters for the model Attribute.
I don't undestand what i wrong, i have tryed to pass the object , json , map and other type.Code:RestTemplate template = new RestTemplate(); Gallery g = new Gallery(); g.setGalleryName("vafsdf"); Gallery ga = template.postForObject(url+path, g, Gallery.class); ga.getDesc();
Thank you for your reply !!!!
Bye


Reply With Quote
