Created
February 23, 2017 09:51
-
-
Save rredpoppy/c453400fbf4b9a15ca6fe4ad18f28f42 to your computer and use it in GitHub Desktop.
Aida client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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