> -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Friday, April 14, 2017 11:07 AM > To: [email protected] > Subject: Re: Can form encoding use JAXB annotations for field name > mapping? > > You can have a BeanParam annotated parameter which is a bean with each > property annotated with FormParam. CXF specific FormParam("") also works > Sergey
This is something that can be used on the CLIENT side of a request? All the references I've found refer to FormParam and BeanParam being used in the definition of the service, clearly on the server side, not the client. I suppose I didn't make this clear. In this case I'm implementing CLIENTS of existing services that I don't control. I'm using ClientBuilder/Client to contact the service. > On Friday, April 14, 2017, KARR, DAVID <[email protected]> wrote: > > > In the past, I've written REST services using XML or JSON in the > > request and response, using JAXB annotations in POJOs to facilitate > the mapping. > > > > I've now started to work on a small set of services that will be using > > form encoding in the request and response (not my choice). I can > > certainly get this to work, using either FormProvider.readFrom() or > > FormUtils.readFrom() to read from a form stream into a Form, and then > > getting the Map from that, and then getting the values I need to > > assign to POJO field. I can do something similar writing a POJO to a > form. > > > > However, I notice that using this strategy I'm not using any implicit > > mapping specified in @Xml... annotations in my POJO. I could > > certainly write the code to do this mapping, but I find it hard to > > believe this hasn't been done already. Am I missing something? > > > > > -- > Sergey Beryozkin > > https://urldefense.proofpoint.com/v2/url?u=http- > 3A__sberyozkin.blogspot.com&d=DwIBaQ&c=LFYZ- > o9_HUMeMTSQicvjIg&r=OsTemSXEn-xy2uk0vYF_EA&m=QdbHTS- > a7GPspsc4Z1B0EIdaRIFB2qbVG75I8-7b9DU&s=Q1VIfTK8RvyrhJ8JQUz-n3e-F5j- > qdIWVhE17xieo8g&e= > Talend - https://urldefense.proofpoint.com/v2/url?u=http- > 3A__www.talend.com&d=DwIBaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=OsTemSXEn- > xy2uk0vYF_EA&m=QdbHTS-a7GPspsc4Z1B0EIdaRIFB2qbVG75I8- > 7b9DU&s=_pGIKfCiC4h6PT9sYKaU_KV_XMdN7TkqBTiucjTSe4Y&e=
