Using wso2, DSS version 3.01, I am trying to have an input parameter that could be an optional parameter. A user can say, give me all the info for this specific code, or if a user does not specify any code, I want to give all the rows of data. Can you help?
相关问题
- JasperReports Server parameter dependency
- How to fix error “Enrollment failed” when trying W
- oAuth2 - WSO2 API Manager and Identity Server Inte
- wso2 esb file processing example smooks csv parser
- How to pass a Swift string to a c function?
相关文章
- WSO2 - disable HTTPS
- wso2 governance registry - client looks up service
- Deploying WSO2 ESB 4.6.0 onto JBoss 7
- WSO2 API Manager Gateway clustering. How to setup
- WSO2 Business Process bpel, error in gui with “if”
- issue running mvn eclipse:eclipse on platform tag
- WSO2 Aggregate Mediator premature/incomplete/unkno
- WSO2 ESB - writing files out of base64
Instead of creating a query for each optional parameter, you can also do the following:
Now you can call 'getEmployees' with 'employeeNumber' and get specific employee,
or you can call 'getEmployees' without 'employeeNumber' and get all employees.
(Calling without 'employeeNumber' is by omitting the 'employeeNumber' tag, or using 'xsi:nil="true"'.)
Obviously, you cannot query for the value 'null' this way.
Well you can make input parameters optional by giving default values to the input parameters. For example
Here if you do not mention the input parameters it will take the input parameter as one. Or else you need to create two queries and handle them programmatically
ok soo for example
select * from Employees
You have two queries employeesByNumberSQL, employeesByNumberSQL1 these two are mapped togetemployeesByNumber and getemployeesByNumber2