Home
Find the answer to your question
How can I generate Java code stubs against ResolutionCaseManagement API WSDL using wsimport tool and make calls? |
This sample uses wsimport tool that ships with JAX-WS to generate Java code stubs and demonstrates how to make API calls to the ResolutionCaseManagement service.
Software Requirements:
1. Generate Java code stub using wsimport tool.
wsimport -extension https://svcs.ebay.com/ws/spf?wsdl&X-EBAY-SOA-SERVICE-NAME=ResolutionCaseManagementService
2. Create a jar file with the generated classes.
Run the following command from the same location where the previous command was run
jar -cvf resolutionCMS.jar .
3. Add the jar to the classpath along with jax-ws lib folder.
The follwing sample shows how to call the getEBPCaseDetails/getUserCases call.
4. To log SOAP Requests and response you need to add a Handler to the binding's handler chain. This is commented out int he code. If you need that enabled uncomment the code and impor the logging handler file that is attached.
/* © 2010-2013 eBay Inc., All Rights Reserved */ |
We've attached the sample code and the generated jar to this. But please note that this is only for reference. Its always advisable to generate the classes from the latest WSDL.