Geertjan's Blog

  • December 20, 2013

StrikeIron RESTful Web Services Are Cool!

Geertjan Wielenga
Product Manager

You have some kind of order entry form in your application where you enter customer details. Name, address, e-mail, etc. Wouldn't it be handy to know whether those details are valid? For example, the e-mail address you've been given could be wrong or the employee keying it in makes typos. Or the e-mail address was once right but has now been removed.

Enter StrikeIron! StrikeIron lets you instantly validate all customer contact information. Below you see a simple example. I have a text field where I entered my own e-mail address and via a StrikeIron service I get back a bunch of XML. The complete UI for this would show GUI components, probably checkboxes, with values filled in from the parsed XML, but for the moment I'm simply showing the XML payload in an editor pane:

In the context of NetBeans IDE, this doesn't make much sense since you're not going to be validating e-mail addresses while coding, most of the time. But imagine you have a business application on the NetBeans Platform, or a web application or any other business application on whatever framework, where customer details need to be entered. That's when the StrikeIron services become very interesting. 

How does it work? Well, aside from the StrikeIron SOAP services that are part of NetBeans IDE, and that have been there for several years already as this 2009 blog entry by StrikeIron CTO and co-founder Bob Brauer shows, there are also REST endpoints that you can use:

  • The VerifyEmail operation is called to perform email verification and hygiene on an email address. The
    URL for that operation with specific parameters is as follows:


    More details here (PDF)

  • The NorthAmericanAddressVerification operation is called to perform address verification on an address. The URL for that operation with specific parameters is as follows:


    More details here (PDF)

There's other services too, such as an SMS service, which is pretty cool. 

Finally, how did I integrate the REST service into a NetBeans Platform TopComponent? Using HttpClient, exactly as I did recently with the TestFairy REST service, as documented here. I literally copied all the code from there and then just changed the URL and the variables.

Join the discussion

Comments ( 2 )
  • Evan Tuesday, December 24, 2013

    This is cool. It seems like you outsource a part of your webpage to another company. So can we keep going? Say, outsource the header/footer to a company, I mean, get the html from the company. We can do the same to the rest. For example, I need a grid to show my data, so I call an api with the data as a request, then I got the html code I want.

  • Geertjan Tuesday, December 24, 2013

    Yup. I guess you're new to web services, but that's indeed what it's about.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.