To invoke an external service after using its WSDL document to generate an Apex class, create an instance of the stub in your Apex script and call the methods on it.

For example, to invoke the StrikeIron IP address lookup service from Apex, you could write a script similar to the following:

// Create the stub
strikeironIplookup.DNSSoap dns = new strikeironIplookup.DNSSoap();

// Set up the license header
dns.LicenseInfo = new strikeiron.LicenseInfo();
dns.LicenseInfo.RegisteredUser = new strikeiron.RegisteredUser();
dns.LicenseInfo.RegisteredUser.UserID = ‘’;
dns.LicenseInfo.RegisteredUser.Password = ‘your-password’;

// Make the Web service call
strikeironIplookup.DNSInfo info = dns.DNSLookup(‘’);

Read More @