Potrebno je da ubacim AuthenticationHeader sa podacima koje sam dobio od NBS.
Code:
<soap:Header>
<AuthenticationHeader xmlns="http://communicationoffice.nbs.rs">
<UserName>string</UserName>
<Password>string</Password>
<LicenceID>guid</LicenceID>
</AuthenticationHeader>
</soap:Header>
<soap:Header>
<AuthenticationHeader xmlns="http://communicationoffice.nbs.rs">
<UserName>string</UserName>
<Password>string</Password>
<LicenceID>guid</LicenceID>
</AuthenticationHeader>
</soap:Header>
Kod kojim se poziva web servis za tekucu kursnu listu (generisan u NetBeansu) :
Code:
try { // Call Web Service Operation
rs.nbs.communicationoffice.ExchangeRateXmlService service = new rs.nbs.communicationoffice.ExchangeRateXmlService();
rs.nbs.communicationoffice.ExchangeRateXmlServiceSoap port = service.getExchangeRateXmlServiceSoap12();
// TODO initialize WS operation arguments here
int exchangeRateListTypeID = 0;
// TODO process result here
java.lang.String result = port.getCurrentExchangeRate(exchangeRateListTypeID);
System.out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
try { // Call Web Service Operation
rs.nbs.communicationoffice.ExchangeRateXmlService service = new rs.nbs.communicationoffice.ExchangeRateXmlService();
rs.nbs.communicationoffice.ExchangeRateXmlServiceSoap port = service.getExchangeRateXmlServiceSoap12();
// TODO initialize WS operation arguments here
int exchangeRateListTypeID = 0;
// TODO process result here
java.lang.String result = port.getCurrentExchangeRate(exchangeRateListTypeID);
System.out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}