Web Services .

Uploaded on:
Category: Fashion / Beauty
Slide 1

Web Services Bruce Armstrong TeamSybase bruce.armstrong@teamsybase.com

Slide 2

Agenda • Introduction to Web Services • Creating .NET Web Services • Consuming Web Services • Web Service DataWindow • Q & A

Slide 3

Introduction to Web Services

Slide 4

Introduction to Web Services Facilitate c ommunication between frameworks Different stages Different programming dialects Through firewalls effectively Self engaging API Self unmistakable information

Slide 5

What are Web Services? A gathering of operations that can be depicted, distributed, found, and gotten to over a system utilizing institutionalized XML informing Proposed to World Wide Web Consortium (W3C) in Mar 2001 http://www.w3c.org Web Services use XML making them both stage and dialect autonomous XML gives us an instrument for making cross-stage or potentially cross-dialect correspondences

Slide 6

Web Service Components The essential parts that make up Web Services are: WSDL – Web Services Description Language Used to portray Web administrations SOAP – Simple Object Access Protocol Used for sending and getting messages from Web administrations

Slide 7

Describing Web Services Why does a Web benefit should be depicted? Web administrations could be utilized by anybody, anyplace, utilizing any dialect on any stage A portrayal permits a designer to know how to cooperate with a Web benefit PowerBuilder gives devices to peruse and coordinate WSDL Web administrations are depicted utilizing Web Services Description Language (WSDL) WSDL is composed in XML Usually an engineer of a Web Service does not need to physically compose WSDL PowerBuilder 11 makes the ASMX, DISCO and WSDL

Slide 8

CREATING .NET Web Services

Slide 9

PowerBuilder/.Net Web Services PowerBuilder gives you the decision of yielding PowerScript code as an Assembly Web Service The main distinction PowerBuilder Web Service creation now versus back in Version 9.0 of PowerBuilder is EAServer is no longer a necessity These Web Services are sent to your Microsoft IIS Web Server

Slide 10

.Net Web Service Target

Slide 11

Web Service Virtual Directory The wizard is for all intents and purposes the same concerning .NET gatherings, and so forth. You should indicate a virtual index name for your Web Service however in light of the fact that it will live on IIS

Slide 12

.Net Web Service Wizard Output PBL, Application Object, Project, NVO

Slide 13

NVOs – Code as you ordinarily would

Slide 14

Web Service Project Wizard decisions may dependably be changed in the Project:

Slide 15

Web Servic e Deployment Options Directly to IIS or make a MSI introduce File

Slide 16

Web Service Specifics You should choose which techniques you need to uncover You can see WSDL and test your Web Service

Slide 17

Viewing WSDL Must convey your .NET Web Service target first Project View WSDL catch OR In a program http ://hostname/virtdirname/service.asmx?WSDL

Slide 18

WSDL Example

Slide 19

More WSDL – Message, Operation, Service, Port

Slide 20

IIS Directory – What is here?

Slide 21

Web Service Virtual Root Directory

Slide 22

Global.asax record A source record where engineers can include application level rationale into their Web applications Application occasions, for example, Application_Start , Application_End , Session_Start , Session_End live here Located at the foundation of a specific Web application\'s virtual catalog tree Automatically parsed and gathered into a dynamic .NET Framework class The first run through any asset or URL inside the application namespace is initiated or asked for

Slide 23

Global.asax record Configured to consequently dismiss any immediate URL ask for so that outer clients can\'t download or see the code inside <%@ Application Codebehind =" Global.asax.cs " Inherits=" PBWebApp.Global " %>

Slide 24

DISCO Files DISCO is a Microsoft innovation for distributing and finding Web Services DISCO documents make it conceivable to find the Web Services uncovered on a given server DISCO records make it conceivable to find the abilities of each Web Service (by means of documentation) and how to collaborate with it DISCO records live in the Web Application\'s virtual root <?xml version="1.0" encoding="utf-8"?> <discovery xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" xmlns ="http://schemas.xmlsoap.org/disco/"> < contractRef ref="http://localhost/webservice/n_webservice.asmx?wsdl" docRef ="http://localhost/webservice/n_webservice.asmx" xmlns ="http://schemas.xmlsoap.org/disco/scl/"/> </discovery>

Slide 25

ASPX records ASP.NET offers help for Web Services with the.asmx document (a wrapper to your Web Service) Similar to a . aspx records we discussed with PowerBuilder/WebForm applications From a program, enter the accompanying: http://hostname/virtdirname/service.asmx OR utilize the accompanying that was produced on organization of the Web Service: C:\ Inetpub\wwwroot\virtdirname\TestWebService.htm OR in the arrangement extend tap the Run Web Service catch

Slide 26

List of Web Service Operations The ASMX document records your Web Service strategies Clicking a connection takes you to a test "bridle" for that technique

Slide 27

Testing the Web Service

Slide 28

Test Results

Slide 29

Why Did We Do This? Interoperability You now have a Web Service prepared to be gotten to from: Java C # VB (VB.NET) PowerBuilder …

Slide 30

Sample: Calling PB Web Service from C#

Slide 31

CONSUMING Web Services

Slide 32

Accessing Web Services Once you have the points of interest and have fabricated your web benefit shopper application, how would you call that web administration\'s strategies? Make a Simple Object Access Protocol (SOAP) message PowerBuilder gives two choices equipped for perusing and composing SOAP messages "Legacy" EasySoap PBNI augmentation "New" .NET Engine

Slide 33

SOAP A XML-based interchanges convention " Everything is XML" Industry standard for cross-stage appropriated informing Defined by World Wide Web Consortium (W3C)

Slide 34

Web Service Consumption Consuming a Web Service from a PowerBuilder customer is fundamentally the same as utilizing a PowerBuilder/EAServer segment An intermediary is required, however Web Services require a Web Service intermediary, not an EAServer intermediary An association is required, but rather Web Services require a Soap Connection The Web Service is like a NVO/Component in that it is a holder of techniques which could be called by means of SOAP messages Continued …

Slide 35

Web Service Consumption Invoking Web benefits through SOAP requires: Serialization and deserialization of information sorts The building and parsing of XML-based SOAP messages A PowerBuilder Web Service customer intermediary plays out these assignments for you killing the need broad learning of : The SOAP detail and mapping The XML Schema determination The WSDL particular and diagram

Slide 36

.Net Web Service Engine Flow Prerequisite: .NET 2.0 Framework SDK MUST be introduced on advancement machine. .NET 2.0 Framework (Runtime) MUST be introduced on both advancement and sending machine .

Slide 37

Web Service Proxy Wizard

Slide 38

Choose the Web Service Engine

Slide 39

Specify WSDL

Slide 40

Select a Service From WSDL

Slide 41

Define Prefix for Proxy (Optional)

Slide 42

Specify Project Name and Library

Slide 43

Specify PBL for created intermediary It is a standard practice to store your intermediaries in a different PBL in your library list

Slide 44

Proxy Project Upon fruition of the WSPW, the new venture is unmistakable in the System Tree, and the venture will be open in the painter Next, convey the venture

Slide 45

Use Proxy Servers? In the event that your organization utilizes a Proxy Server to connect amongst you and the Firewall, visit the Tools  System Options exchange Input the name of your Proxy Server, port, your client id and secret word to that intermediary server This is for configuration time Internet associations just

Slide 46

The Web Service Proxy System Tree (extended), after the send of the intermediary extend The function(s) accessible from the Web Service will be noticeable under the intermediary Be certain you comprehend that the intermediary venture is separate from the genuine intermediary question

Slide 47

Use of Aliases in Proxy PowerBuilder is not case delicate XML (SOAP) and .NET are case touchy To get around that distinction, every strategy in the intermediary utilizes a nom de plume The string that takes after "assumed name for" contains the case-delicate name and the mark of the comparing XML or SOAP technique

Slide 48

Exported Web Service Proxy Note the "false name for" provisions in the capacity or subroutine statements

Slide 49

.Net Web Service Engine – Files Created from Proxy

Slide 50

Web Service Runtime Engines EasySoap Engine – pbsoapclient110.pbd/pbx This motor is in reverse good with the PB9/PB10 Web Service motor It can chip away at machines that don\'t have the .NET structure .NET Engine – pbwsclient110.pbd/pbx This is new .NET SOAP motor Both of the above characterize two classes: SoapConnection SoapException

Slide 51

What Was that PBX Reference? An expansion to PowerBuilder usefulness made utilizing the PowerBuilder Native Interface (PBNI) Before 10.5, a PBNI augmentation (*.pbx or *.dll) engineer needed to: Use the pbx2pbd utility to make a PBD document from an expansion Be certain to put the augmentation record (PBX) in the application\'s pursuit way and add the PBD record to the objective\'s library list Now there are less strides: Import the *.pbx specifically into your *. pbl\'s utilizing the System Tree Must in any case convey the augmentation in the application\'s way

Slide 52

Importin g PowerBuilder Extensions Prior to PB 10.5, to pick up a SoapConnection , you included pbsoap nnn .pbd to your library list Pbsoap nnn .pbd was a PBNI expansion for EasySoap Now you c

View more...