Hi Gabo

You have a @QueryParam attached to it, is is only a method parameter
representing a request body (the one having no JAXRS parameter annotations)
that can be linked to a corresponding element in the grammar section...

cheers, Sergey

On Tue, Mar 9, 2010 at 5:09 AM, Gabo Manuel <[email protected]>wrote:

> Hi All,
>
> Just would like to inquire how to make certain set of enums show in the
> wadl. Given the following:
>
> @WebService(name="MyService",
>       targetNamespace="http://some.domain.com/";)
> @SOAPBinding(use=Use.LITERAL, style=Style.RPC)
> @Consumes("*/xml")
> @Produces("text/xml")
> @Path("/MyService")
> public interface MyService {
>   @XmlType(name="MyEnum", namespace="http://some.domain.com";)
>   @XmlRootElement(name="MyEnum", namespace="http://some.domain.com";)
>   public static enum MyEnum {
>       SOMEENUM1
>       , SOMEENUM2
>   }
>     @GET
>   @Path("/search")
>   @WebMethod
>   @WebResult(name="someObject")
>   public List<MyObject> getMyObjects(
>           @QueryParam("enumValue")
>           @WebParam(name="enumValue")
>           MyEnum enumValue
>   );
> }
>
>
> @XmlType(name="MyObject", namespace="http://some.domain.com";)
> @XmlAccessorType(XmlAccessType.PROPERTY)
> @XmlRootElement(name="MyObject", namespace="http://some.domain.com";)
> public class WSMyObject{
>   private Map<String, String> internalCopy = new HashMap<String, String>();
>      public WSMyObject(){}
>   public WSMyObject(Map<String, String> internalCopy){
>       if(internalCopy == null){
>           internalCopy = new HashMap<String, String>();
>       }
>       this.internalCopy = internalCopy;
>   }
>      public Map<String, String> getMap() {
>       return internalCopy;
>   }
>      public void setMap(Map<String, String> internalCopy) {
>       if(internalCopy == null){
>           internalCopy = new HashMap<String, String>();
>       }
>       this.internalCopy = internalCopy;
>   }
> }
>
>
> Issues are:
>
> 1. The enums are listed properly for the soap service, which is good.
> However, the enums are not listed for the wadl.
>
> 2. The result is displayed properly for soap service as a complex type,
> again as wanted. However, it is not displayed in the grammar section of
> wadl.
>
> Maybe I'm missing some annotation for both, but the enums example in the
> users guide (Gender) does not have any annotation at all. The method
> functions fine and as expected. It just requires an extra explanation in the
> doc as to what values are to be expected, something I hope to avoid since it
> would be possible to specify it in the wadl/wsdl.
>
> Thanks in advance.
>
> Gabo
>

Reply via email to