We are using Apache CXF code-first approach to create web-services. We have a custom soap header to pass user credentials.
I am trying to pass the usercredentials in the SEI using a @webparam annotation.
These are two operations in the Service class.
@Path("/item/{id}")
@GET
public Item getItem(@PathParam("id") String id,
@WebParam(name="userDetails", header=true, mode=Mode.IN) UserDetails details) throws NotFoundException;
@Path("/name/{id}")
@GET
public Item getItemByName(@PathParam("id") String id,
@WebParam(name="userDetails", header=true, mode=Mode.IN) UserDetails details) throws NotFoundException;
Enunciate while generating the wsdl throws an error saying
D:\workspace\myService\src\main\java\com\ws\api\ItemPublicationWebService.java:52: [xml] Web method defines a message part named 'userDetails' that is identical to the name of a web message part defined in D:\workspace\myService\src\main\java\com\ws\api\ItemPublicationWebService.java:41. Please use annotations to disambiguate.
I found out that keeping the webParam name unique will generate the wsdl. But that is not the expected result.
Can anyone please point me what am I missing here?
Any Help would be appreciated.