Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

No support for optional request/param in generated client #69

Open
glassfishrobot opened this issue Apr 9, 2013 · 2 comments
Open

No support for optional request/param in generated client #69

glassfishrobot opened this issue Apr 9, 2013 · 2 comments

Comments

@glassfishrobot
Copy link
Contributor

It would be nice to support non-required parameters in client generation.
Currently when in the wadl there are optional parameter in request ("required" attribute is missing) e.g.

<request> 
   <param name="startPeriod" type="xsd:dateTime" style="query" />
   <param name="endPeriod" type="xsd:dateTime" style="query" />
</request>

The generated client doesn't support to give one of them. Either all or none.

**GeneratedClient signatures**public<T >T getAsRepresentationName(String startperiod, String endperiod, Class<T> returnType);
public<T >T getAsRepresentationName(Class<T> returnType);

If a null is given to a parameter an exception is thrown.

java.lang.IllegalArgumentException: One or more of query value parameters are null.

Affected Versions

[1.1.4]

@glassfishrobot
Copy link
Contributor Author

Reported by spyros

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA WADL-69

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants