I was able to generate the (java) client in Eclipse, using the WSDL available at link .
The following classes have been generated:
package br.gov.bcb.pec.sgs.casosdeuso.ws.comum;
WSValorSerieVO
WSSerieVO
package br.gov.bcb.www3.wssgs.services.FachadaWSSGS
interface FachadaWSSGS
interface FachadaWSSGSService
classe FachadaWSSGSServiceLocator
classe FachadaWSSGSProxy
classe FachadaWSSGSSoapBindingStub
My question now is how to instantiate these classes and use the service.
My goal is to get the dollar quote on a specific date dd-mm-aaaa
Can anyone give a force?
I think it would be something close to:
public class main {
public static void main(String[] args) throws ServiceException {
FachadaWSSGSProxy proxy = new FachadaWSSGSProxy();
FachadaWSSGSServiceLocator service = new FachadaWSSGSServiceLocator();
FachadaWSSGSSoapBindingStub stub = (FachadaWSSGSSoapBindingStub) service.getPort(proxy.getEndpoint(),FachadaWSSGSService.class );
try {
System.out.println(stub.getValor (1,"24/01/2017").toString());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
But this does not work.