Generating a client proxy for the web services
The BlackBerry® Administration API includes several web services and each web service is associated with a WSDL definition. You can use a proxy generator to specify the web references for each WSDL definition and automatically generate the classes in your project. To make sure that you do not have multiple copies of the same data types in your project, you should generate a single client proxy using a command line proxy generator. Microsoft® Visual Studio® includes a compatible proxy generator called wsdl.exe, Apache CXF™ includes a proxy generator called wsdl2java, and JAX-WS RI includes a proxy generator called WSimport.
If you remove components from the BlackBerry® Enterprise Server, you can regenerate your client proxy to update your definitions and test your application to make sure that programming elements have not been removed. If you add components to the BlackBerry Enterprise Server, you can regenerate your client proxy to add any new programming elements to your development environment.
By default, not all proxy generators interpret the BlackBerry Administration API namespaces in the same way. For example, if you are working in Java® and you use the wsdl2java proxy generator included with Apache CXF, by default, the class DispatcherService.java uses the class path com.rim.com_rim_bes_basplugin_dispatcher instead of the path com.rim.bes.basplugin.dispatcher that the BlackBerry Administration API documentation and code samples use. Your proxy generator might include an option that you can use to manually specify how to interpret the namespaces.
You would typically generate the corews, utilws, and dispatcherws web services, and one of the email web services if you plan to use the messaging features. You should not generate the client proxy with multiple email web services. Only the corews web service is required.
Example: Generating a client proxy in Microsoft Visual C#
wsdl.exe /sharetypes /out:proxy.cs https://<servername>/baaws/core/ws?wsdl https://<servername>/baaws/emailexchange/ws?wsdl https://<servername>/baaws/core/wsutil?wsdl https://<servername>/baaws/dispatcher/ws?wsdl
Example: Generating a client proxy in Java and Apache CXF
wsdl2java.bat -wv 1.1 -d -d C:\Temp\proxy https://<servername>/baaws/core/ws?wsdl wsdl2java.bat -wv 1.1 -d -d C:\Temp\proxy https://<servername>/baaws/core/wsutil?wsdl wsdl2java.bat -wv 1.1 -d -d C:\Temp\proxy https://<servername>/baaws/dispatcher/ws?wsdl wsdl2java.bat -wv 1.1 -d -d C:\Temp\proxy https://<servername>/baaws/emailexchange/ws?wsdl
wsdl2java.bat -wv 1.1 -p http://www.rim.com/com.rim.bes.basplugin.emailcommon.dto=com.rim.bes.basplugin.emailcommon.dto -p http://www.rim.com/com.rim.bes.basplugin.dispatcher.dto=com.rim.bes.basplugin.dispatcher.dto -p http://www.rim.com/com.rim.bes.bas.dto=com.rim.bes.bas.dto -p http://www.rim.com/com.rim.bes.bas.baa.dispatcher.dto=com.rim.bes.bas.baa.dispatcher.dto -p http://www.rim.com/com.rim.bes.bas.baa.common.dto=com.rim.bes.bas.baa.common.dto -d C:\Temp\proxy https://<servername>/baaws/dispatcher/ws?wsdl