StrikeIron RESTful Web Services Are Cool!

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:

    http://ws.strikeiron.com/StrikeIron/emv6Hygiene/EMV6Hygiene/VerifyEmail?
    LicenseInfo.RegisteredUser.UserID=&
    LicenseInfo.RegisteredUser.Password=&
    VerifyEmail.Email=&
    VerifyEmail.Timeout=&
    VerifyEmail.Option alSourceId=

    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:

    http://ws.strikeiron.com/StrikeIron/NAAddressVerification6/
    NorthAmericanAddre ssVerificationService/NorthAmericanAddressVerification?
    LicenseInfo.Registered User.UserID=&
    LicenseInfo.RegisteredUser.Password=&
    NorthAmeric anAddressVerification.AddressLine1=&
    NorthAmericanAddressVerification. AddressLine2=&
    NorthAmericanAddressVerification.CityStateOrProvinceZIP OrPostalCode=&
    NorthAmericanAddressVerification.Country=&
    North AmericanAddressVerification.Firm=&
    NorthAmericanAddressVerification.Ur banization=&
    NorthAmericanAddressVerification.Casing=

    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.

Comments:

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.

Posted by Evan on December 23, 2013 at 11:15 PM PST #

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

Posted by Geertjan on December 24, 2013 at 12:15 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today