Java Examples:
If connecting to the VADS web service using Java, you can instantiate a client instance as in the following example...
import gov.cdc.vocab.service.VocabService;
import com.caucho.hessian.client.HessianProxyFactory;
HessianProxyFactory factory = new HessianProxyFactory();
VocabService service;
try {
service = (VocabService) factory.create(VocabService.class,
"http://phinvads.cdc.gov/vocabService/v2">);
} catch (MalformedURLException e) {
e.printStackTrace();
}
service.(web service method to execute);
If you are using a Spring Container with your application, you can define a Spring Bean that can be referenced to invoke
calls upon the Web Service...
<bean id="vocabService" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<property name="serviceUrl"
value="http://phinvads.cdc.gov/vocabService/v2" />
<property name="serviceInterface" value="gov.cdc.vocab.service.VocabService" />
</bean>
.Net Example:
If connecting to the VADS web service using .Net, you can instantiate a client instance as in the following example...
using VadsClient;
hessiancsharp.client.CHessianProxyFactory factory = new hessiancsharp.client.CHessianProxyFactory();
VocabService service = (VocabService)factory.Create(typeof(VocabService),
"http://phinvads.cdc.gov/vocabService/v2");
service.(web service method to execute);