• CodeBear
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Using the API guide example code for one of the StrikeIron Services:

// 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 = 'you@company.com';
dns.LicenseInfo.RegisteredUser.Password = 'your-password';

// Make the Web service call

strikeironIplookup.DNSInfo info = dns.DNSLookup('www.google.com');

Where strikeiron and strikeironiplookup are classes generated by the WSDL downloaded from http://ws.strikeiron.com/relauto/iplookup?WSDL.

When I plugin my StrikeIron credentials into the above, this works just fine, and the web service call is successful.

If, however, I add:

dns.GetRemainingHits();

I get the exception:
22:11:23 ERROR - Evaluation error: System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://ws.strikeiron.com:GetRemainingHitsResponse' but found 'http://schemas.xmlsoap.org/soap/envelope/:Body'
22:11:23 ERROR - Evaluation error: Class.strikeironIplookup.DNSSoap.GetRemainingHits: line 70, column 13
AnonymousBlock: line 15, column 3
22:11:23 ERROR - Evaluation error: Class.strikeironIplookup.DNSSoap.GetRemainingHits: line 70, column 13 AnonymousBlock: line 15, column 3

Line 70 refers to the line with WebServiceCallout.invoke for GetRemainingHits().

I have had similar problems with other StrikeIron WSDL GetRemaingHits(), and also for some other web services (all the Parsing Error like the above), and not all of the methods are a void return, as GetRemainingHits is, so it is not just the return type.

How Can I debug this? Any assistance you can provide is greatly appreciated.