web services - overview - bmc software · 2020-05-08 · integrate web-based applications by using...

20
Web Services - Overview Gonzalo de Salterain BMC Support- Onboarding

Upload: others

Post on 23-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

Web Services - Overview

Gonzalo de SalterainBMC Support- Onboarding

Page 2: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 2© Copyright 1/23/2014 BMC Software, Inc 2

What is a Web Service? How does this feature benefit my company? Architecture of a Web Service Consuming Web Services Publishing Web Services 3rd Party Tools Resources Questions

Agenda

Page 3: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 3

What is a Web Service?

Web Services are web-based application components stored on an a server providing certain functionality or data available on the publisher system to external 3rd party products. The function of a Web Service itself, is to integrate web-based applications by using standards such as XML, SOAP,WSDL and UDDI.

XML: Is used to "tag" the data

SOAP: Is used to transfer the data

WSDL: Is used for describing the available services

UDDI: Lists the services available

Compared to other web models, Web Services do not provide users with a GUI (Graphical User Interface). All the data shared through Web Services goes to another application interface, not the users. Developers can add a separate source to offer functionality for data coming from Web Services to their end Users.

Page 4: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 4

How does this feature benefit my company?

On a demanding world, Web Services simplifies the time consuming task of writing code to allow different sources of data to communicate each other. Since all the communication is in XML format, Web Services are not tied to specific languages nor operating systems. Java can talk with Perl, and Windows Applications can talk with Unix Applications.

Data from Remedy can be published to other applications that do not interact natively with Remedy products. Eg.: you could provide your own portal with all the tickets open, marked as Critical, without having to log to the Remedy platform (Web Services does all the work without user interaction). At the same time, your application could serve your own data to Remedy Systems.

Using Web Services has no extra cost. Your AR Server is ready to work with them, out-of-the-box.

Page 5: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 5

Architecture of a Web Service

Consuming a Web Service:

Publishing a Web Service:

Consuming or publishing Web Services is transparent to End Users

Mid-Tier is used as a publisher (container) of AR Server Web Services

The Web Services plugin is an Axis client running through the AR Plugin Server to make outgoing consumption calls.

Page 6: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 6

Consuming Web Services

Consuming Web Services and example:

Find the external WSDL (Web Service Description Language) and make sure it works (you can use 3rd party products to check its health)On this test, we’re going to use a “Quote of the Day” WSDL:http://www.swanandmokashi.com/Homepage/Webservices/QuoteOfTheDay.asmx?WSDL

Create a form containing the fields you want to use (map) on Remedy:

Page 7: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 7

Consuming Web Services

Create a new Filter with a Set Fields action reading the values from Web Service by typing the URL of your external Web Service (WSDL) and selecting the form saved earlier:

In this example, we’re going to use the following Execute Options:

• Modify

• Submit

Page 8: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 8

Consuming Web Services

Chose the Port and Operation populated by the Web Service:

Set the Output map between your form and the external Web Service for the fields you want to use

(Note that we’re mapping the fields from the form we’ve created earlier and it uses the Database name, not the label)

Page 9: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 9

Consuming Web Services

Test the Web Service on User Tool or Mid-Tier, based on the operations selected above. Our example uses the Submit execution so it will populate the content upon saving the record:

Open the form in New Mode:

And populate the required (bold) fields (Status, Short Description and Submitter). Do not fill the custom fields you’ve created, since they will be populated by the Web Service call automatically. Save the changes.

Page 10: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 10

Consuming Web Services

Open the form in Search Mode and select your record:

As seen on the above picture, the web service provide a random “Quote of the Day” and it was populated to the mapped field in the record.

Page 11: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 11

Publishing Web Services

Publishing Web Services and example:

Find the internal WSDL you want to use. Since we use Mid-Tier as a container for WSDLs, they can be found under:

http://Your_MidTier_Server:port/instancename/WSDL/public/servername/formname

On this test, we’re going to re-use our own “Quote of the Day” form created earlier to publish back the saved quotes to 3rd party applications. Since our form has no WSDL yet, we’re going to create one.

Create a new Web Service aiming our form:

Page 12: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 12

Publishing Web Services

Name the Port as you like, and add a new “Get Operation” with a friendly name:

From the Output Mapping, remove unneeded fields, leaving just what we want to show in our WSDL:

Page 13: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 13

Publishing Web Services

Give the Web Service Public permissions and save it with a new name:

Upon saving, the WSDL name will update. You will need to substitute the proper aliases of your webserver, including port and instance name in the WSDL URL:

Wrong: http://<midtier_server>/arsys/WSDL/public/onbmc-s/QuoteOfTheDay

Right: http://ondemand.onbmc.com/arsys/WSDL/public/onbmc-s/QuoteOfTheDay

Page 14: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 14

Publishing Web Services

The final result should look like this:

IMPORTANT:If you ever decide to modify a Web Service

make sure to Flush Mid-Tier’s cache. Simple flush is enough.

Page 15: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 15

3rd Party Products (and tests)

3rd Party Products are those non-Remedy tools or applications that you can use to test or integrate with the Remedy platform.

There are many applications that you may find useful, such as text editors with XML syntax checking, or applications that can act as Web Service consumers, such as SOAP-UI.

On this test we’re going to use SOAP-UI to consume the Web Service we’ve created on the Publishing section earlier:

Open SOAP-UI and create a new project, and paste our (Internal) Web Service URL (make sure to create Sample requests):

Page 16: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 16

3rd Party Products (and tests)

Our Get operation created earlier will be listed. Double click “Request 1” and remove all question marks “?” from the list, then populate the User name and password. Include the request number taken from our new record with the quote obtained earlier:

Page 17: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 17

3rd Party Products (and tests)

If the WSDL is working properly, upon clicking “Play” (green arrow button) you should be able to retrieve the data stored in Remedy:

<ns0:Submitter>Demo</ns0:Submitter><ns0:WS_Quoteoftheday>By and large, language is a tool for concealing the truth.</ns0:WS_Quoteoftheday><ns0:WS_Author>George Carlin</ns0:WS_Author>

Page 18: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 18

Resources

BMC Resources:

Web Services Best Practices: https://communities.bmc.com/docs/DOC-17544

Primer on Publishing WS: https://communities.bmc.com/docs/DOC-19

Using BMC ITSM OOB WS: https://communities.bmc.com/docs/DOC-16648

BMC 8.1 Documentation PDF (Integration Guide):https://docs.bmc.com/docs/display/public/ars81/Home

External Resources:

XML Validator (W3Schools): http://www.w3schools.com/xml/xml_validator.asp

Web Services Glossary: http://www.w3.org/TR/ws-gloss/

WebInject (Workload Graphs/Monitor/Validator): http://www.webinject.org/webservices.html

Soap-UI: http://www.soapui.org/

Eclipse Tools (Includes a good XML editor): http://www.eclipse.org/downloads/

Page 19: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 19

Questions?

Page 20: Web Services - Overview - BMC Software · 2020-05-08 · integrate web-based applications by using standards such as XML, SOAP, WSDL and UDDI. XML: Is used to "tag" the data SOAP:

© Copyright 1/23/2014 BMC Software, Inc 20

For Any Questions/Concerns, You can Get in Touch with Us!

OnDemand Communities site:

https://communities.bmc.com/community/bmcdn/bmc_remedy_ondemand

This webinar’s discussion thread:

https://communities.bmc.com/message/390958#390958

Contacts:

Gonzalo de Salterain ([email protected])

Gary Reif ([email protected])