Service Oriented Architectures are amazing. Now more than ever companies are leveraging freely available web services to add value to their internal data. One of the most common ways on combining data today is via Google Maps. A great example of this is housingmaps.com. Housingmaps combines the power of Google Maps and CraigsList to allow you to view available housing in your area together with the power of Google Map navigation.
Today, all tools from SAP BusinessObjects can consume web services. The most popular reporting tool in the BusinessObjects platform is Crystal Reports. With the report creation wizard, we can be consuming a web service is seconds. Let’s walk through it step by step. We will connect to a web service that will provide us driving directions from Point A to Point B.
Step by Step
- Launch Crystal Reports 2008
- From the Start Page, choose Report wizard, this will launch the Standard Report Creation
- Next expand Create New Connection, and scroll down to XML and Web Services and expand the folder.
- The XML and Web Services data source dialog box will appear. Choose Use Web Service Data Source and choose Next>.
- In our case, we are going to use an HTTP Web Service, so choose Use HTTP(S) WSDL and type in: http://www.ecubicle.net/driving.asmx?WSDL and choose Next>.
- This Web Service does not require a UserID/Password, so choose Next>.
- After a moment or two, the Web Service, Port and Method screen should appear. You should see: driving, drivingSoap and GetDirections in the Service, Port and Method drop downs respectively. (If this does not work, there may be a firewall issue at your location. Check with your local IT.) Choose Finish.
- After choosing Finish, you will see a ResultSet box under the http://www.ecubicle.net/ data source. (You may need to expand it). Move the box over to the Selected Tables side by choosing the [>] button. When you do, you will be prompted to enter some parameters. So far so good.
- There are four input parameters to this:
- fromAddress – the starting address, e.g. 3734 Elvis Presley Boulevard Memphis, TN 38186
- toAddress – the destination address, e.g. 1600 Pennsylvania Ave NW, Washington, DC 20500
- distanceUnit – miles or km, default: miles
- expresswayEnabled – true or false, default:true
- After entering the values choose OK.
- Complete the Wizard by either choosing Finished or by walking through the remaining screens.
- Once the fields are added to the report, you should the directs Elvis would need to take to drive to the White House.
Here is your finished report:
Leveraging Web Services from within SAP BusinessObjects couldn’t be easier. If you are interested in seeing the same types of capabilities from within other BusinessObjects tools drop me a line and I’ll add it to the list. Enjoy.