Difference between revisions of "Integration/REST"
Jump to navigation
Jump to search
old>Admin |
old>Admin |
||
Line 6: | Line 6: | ||
=== Netbeans quick start guide === | === Netbeans quick start guide === | ||
Steps to create a simple interaction | |||
# Add Webservice to ide (wadl import) | # Add Webservice to ide (wadl import) | ||
#* URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].wadl | #* URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].wadl | ||
Line 13: | Line 14: | ||
## Add JAXB bindings to project (use XSD schema) | ## Add JAXB bindings to project (use XSD schema) | ||
##* URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].xsd | ##* URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].xsd | ||
==== Sample code for list view ==== | |||
FirmabilerClient session = new FirmabilerClient(); | |||
FirmabilerList result = session.getList(FirmabilerList.class, "admin", "password1223", "TITEL=Kasper" ); | |||
List <FirmabilerListItem> list = result.getFirmabilerListItem(); | |||
for(int i=0; i<list.size(); i++) { | |||
FirmabilerListItem item = list.get(i); | |||
System.out.println( item.getDataID() + "\t" + item.getNUMMERPLADE() ); | |||
} | |||
session.close(); |
Revision as of 13:48, 29 November 2013
This article has not yet been converted to Wiki format.
Please download the original article: Tempus Serva REST interface.pdf
Netbeans quick start guide
Steps to create a simple interaction
- Add Webservice to ide (wadl import)
- URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].wadl
- Create a new project
- Add REST Client to project
- Point to newly created webservice: [SolutionSystemName]
- Add JAXB bindings to project (use XSD schema)
- URL: [ServerName]/[ApplicationName]/rest/[SolutionSystemName].xsd
- Add REST Client to project
Sample code for list view
FirmabilerClient session = new FirmabilerClient(); FirmabilerList result = session.getList(FirmabilerList.class, "admin", "password1223", "TITEL=Kasper" ); List <FirmabilerListItem> list = result.getFirmabilerListItem(); for(int i=0; i<list.size(); i++) { FirmabilerListItem item = list.get(i); System.out.println( item.getDataID() + "\t" + item.getNUMMERPLADE() ); } session.close();