Hi so I managed to generate WSDL Java Classes using Java-WS with the "wsimport" command. The WSDL file is from:
http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?wsdl
The problem is that Im not familiar on how to use this. How do I make a SOAP call to the CapitalCity SOAP method.
In SOAPUI, you would just pass the CountryISOCode like:
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.oorsprong.org/websamples.countryinfo">
<soapenv:Header/>
<soapenv:Body>
<web:CapitalCity>
<web:sCountryISOCode>UKR</web:sCountryISOCode>
</web:CapitalCity>
</soapenv:Body>
</soapenv:Envelope>
How to do this in Java? This is my code that I've started.
CountryInfoService countryInfoService = new CountryInfoService();
I dont know what follows next. Again Im trying to use the "CapitalCity" SOAP Operation.
Here's a sample answer:
CountryInfoService countryInfoService = new CountryInfoService();
CountryInfoServiceSoapType countryInfoServiceSoapType = countryInfoService.getCountryInfoServiceSoap();
System.out.println(countryInfoServiceSoapType.capitalCity("RUS"));
//output is 'Moscow'
That's how to use it.