Skip to content

Instantly share code, notes, and snippets.

@rredpoppy
Created February 23, 2017 09:51
Show Gist options
  • Save rredpoppy/c453400fbf4b9a15ca6fe4ad18f28f42 to your computer and use it in GitHub Desktop.
Save rredpoppy/c453400fbf4b9a15ca6fe4ad18f28f42 to your computer and use it in GitHub Desktop.
Aida client
package aidaclient;
import com.sun.xml.internal.ws.developer.WSBindingProvider;
import com.whitecitycode.aida.*;
import java.util.List;
/**
*
* @author adrian
*/
public class AidaClient {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
AIDAWebServices ws = new AIDAWebServices();
AIDAWebServicesPT pt = ws.getAIDAWebServicesPT();
WSBindingProvider bp = (WSBindingProvider)pt;
AuthHeader a = new AuthHeader();
a.setUsername("user");
a.setPassword("pw");
a.setResellerCode("CODE");
bp.setOutboundHeaders(a);
AIDAGlobeCountriesRS rs = pt.globeCountries(new AIDAGlobeCountriesRQ());
List<CountryType> cs = rs.getCountries().getCountry();
for (int i = 0; i < cs.size(); i++) {
System.out.println(cs.get(i).getName());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment