Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The procedure is logged in the cmd window and takes a few seconds. The generated source files, the<br />
compiled classes and the complete jar are now available in the Build directory. The jar file must be now be<br />
referenced when implementing the client program on the classpath. A whole lot of jar files have to be<br />
included in the class path in order to be able to compile and execute the client program. These are listed<br />
below.<br />
<br />
• jwsdp-shared<br />
jaxp<br />
jaxrpc<br />
saaj<br />
xws-security<br />
lib<br />
lib<br />
lib<br />
lib<br />
lib<br />
activation.jar<br />
jax-qname.jar<br />
mail.jar<br />
endorsed<br />
jaxp-api.jar<br />
jaxrpc-impl.jar<br />
jaxrpc-spi.jar<br />
jaxrpc-api.jar<br />
saaj-impl.jar<br />
saaj-api.jar<br />
security-plugin.jar<br />
soapprocessor.jar<br />
xmlsec.jar<br />
xws-security_jaxrpc.jar<br />
xws-security.jar<br />
dom.jar<br />
xercesImpl.jar<br />
xalan.jar<br />
Now for the implementation of the client. Our example here will show the retrieval of the list of open<br />
bills, i.e. the biller’s view. This person must have a valid username and password. If possible, these should<br />
be stored in a separate file or database and must on no account be accessible to unauthorized persons.<br />
First, there is an initialization block. In this example, the URLs of the web service and the eBillAccountID<br />
are stored in a properties file and read in via a property object. However, you can decide about this<br />
yourself. The important thing is to initialize the stub class and set the ENDPOINT_ADDRESS_PROPERTY.<br />
String serviceURL = pApplication.getProperty("ServiceUrl");<br />
DownloadInvoiceSoap_Stub stub =<br />
(DownloadInvoiceSoap_Stub)(dwnlService.getDownloadInvoiceSoap());<br />
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, serviceURL);<br />
String eBillAccountID = pApplication.getProperty("eBillAccountID");<br />
Next, you can already call up the method itself, because the proxy classes add the WS-Security extensions<br />
here (see Fig 3).<br />
ArrayOfReport report = stub.getOpenList(eBillAccountID);<br />
16/19