SlideShare a Scribd company logo
Service Oriented Architectureand Web servicesMohammed LuqmanShareef
COM, DCOM Microsoft specificEJB, RMI	Java SpecificCORBA  	Platform and Language Independent2010-02-082Popular Distributed Application Frameworks/Technologies
A software system is divided into highly flexible and re-usable components called services. SOA is just an architecture blue print It is NOT a technical standardIt is NOT a technology2010-02-083What is SOA?SOA is an architectural style of building software applications that promotes loose coupling between components for their reuse.Coarse grainedLoosely coupledPlatform independentStandard Interface
Self-contained module that perform a predetermined taskSoftware component that have published contracts/interfacesBlack-box to the consumersPlatform-IndependentInteroperable2010-02-084What is Service ?
Systems today are bigger than ever beforeComplexity increases exponentially with sizeSystems need to be interconnectedOO solved the problems of small-medium sized systemsCO (Component Orientation) solved problems of medium-large systemsNeither OO nor CO could cope with the problems of very large systems, systems of systems, or integration between systemsWhy SOA?
2010-02-086Why SOA?End Customer PortalOperator PortalPartner PortalCustomer InfoManagementOrder ManagementCredit ManagementSalesManagementBillingLets take a telecom enterprise systemInvoicingProvisioningNetwork ManagementInventoryServiceCatalogCustomer Profiles
2010-02-087Why SOA?End Customer PortalOperator PortalPartner PortalServicesCredit ManagementSalesManagementCustomer InfoManagementOrder ManagementProvisioningInvoicingInventoryNetwork ManagementCustomer ProfilesBillingServiceCatalog
Towards Service-Oriented ArchitectureCoordination oriented
Build to change
Incrementally built and deployed
Enterprise solutions
Loosely coupled
Message oriented
Abstraction
Function oriented
Build to last
Prolonged development cycles
Application silos
Tightly coupled
Object oriented
Known implementationManaging servicesService governancePerformanceReliabilitysecuritySLAsInteroperability of servicesChallenges
Loose couplingMinimize dependencies.Service contractServices adhere to a communications agreement.Service abstraction Hide the service execution logic from the outside world.Service reusabilityLogic is divided into services for reuse.2010-02-0810SOA: Architectural Principles
Service composabilityServices can be assembled to form composite service.Service autonomyServices have control over the logic they encapsulate.Service discoverabilityServices can be found and assessed via available discovery mechanisms.Service relevance		Service presented at a granularity recognized by user a meaningful service.2010-02-0811SOA: Architectural Principles
	SOA can be implemented using any service based technology such as CORBA, but the SOAP based web services standard implementation has gained wide industry acceptance, because these standards provide greater interoperability.	Key differences between CORBA and web service are2010-02-0812SOA Implementation
2010-02-0813Realizing SOA with Web Services
Web service is a standard way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. 	XML is used to tag the data, 	SOAP is used to transfer the data, 	WSDL is used for describing the services available and 	UDDI is used for listing what services are available. 	Web services are loosely coupled computing services that can reduce the complexity of building business applications, save costs, and enable new business models. Services running on an arbitrary machine can be accessed in a platform- and language-independent fashion.2010-02-0814What is web service ?
Lookup for the tomato sellersYellow Pages: contain companies that are selling tomatoes, their location, and contact information. 2010-02-0815How to buy tomatoes ?Find the service offered according to my needsWhere, when and how can I buy tomatoes? Buy the tomatoesDo the  transaction
Lookup for the Service ProviderRegistry: contain providers that are selling services, their location, and contact information. Find the service offered according to my needsWhere, when and how can I get the service? Access the servicedo the transaction 2010-02-0816How to access a service?
XML (eXtensibleMarkup Language)A uniform data representation and exchange mechanismSOAP (Simple Object Access Protocol)Lightweight (XML-based) protocol for exchange 	of information in a decentralized, distributed environmentWSDL (Web Service Description Language)XML format that describes the web serviceUDDI (Universal Description Discovery and Integration)Like yellow pages of Web services2010-02-0817Components of a web service
2010-02-08183 roles of service
2010-02-0819Service Vs. ConsumerPolicyAdheres togoverned byEnd PointBinds toExposesServesService ConsumerServiceContractsimplementsUnderstandsdescribesMessagesSends/ReceivesSends/Receives
Define the service implementation and compile it.	\WS>javac -d . HelloImpl.javaUse wsgen to generate the artifacts required to deploy the service.	\WS>wsgen -wsdlserver.HelloImpl3.   Package the files into a WAR file and deploy it .2010-02-0820Steps to develop a web serviceusing JAX-WSpackage server;import javax.jws.WebService;@WebServicepublic class HelloImpl {  /**   * @param name   * @return Say hello to the person.   */   public String sayHello(String name) {     return "Hello, " + name + "!";   }}
2010-02-0821HelloImplService.wsdl
2010-02-0822HelloImplService.wsdl contd…
2010-02-0823HelloImplService_schema1.xsd
Implement Client Code5.  Use wsimport to generate and compile the web service artifacts needed to connect to the service.	\WS>wsimportHelloImplService.wsdl	parsing WSDL...	generating code...	compiling code...6.  Run the client.2010-02-0824Steps to develop a web service contd…package myClient;import helloservice.endpoint.HelloService;import helloservice.endpoint.Hello;public class HelloClient {    public static void main(String[] args) {        try {HelloService service = new HelloService();            Hello port = service.getHelloPort();            String response = port.sayHello(“Luqman");System.out.println(response);        } catch (Exception e) {e.printStackTrace();        }    }}
WSDL is a contract between service provider and the consumerA WSDL document describesWhat the service can doWhere it residesHow to invoke it2010-02-0825WSDLWSDL elementsTypesMessageOperationPort TypeWSDLBindingPortService
Types	Data type definition used in exchanging messagesMessage	Describes the logical content of data being communicatedOperation	An Abstract description of an action supported by the servicePort Type	A set of operations and messages involved with the serviceBinding	A concrete protocol and data format specification for a port typePort	A single end point defined as a combination of a binding and a network addressService	Identifies which ports to group together2010-02-0826WSDL elements
2010-02-0827SOAPSOAP EnvelopeSOAP HeaderHeader BlockSOAP BodyMessage BodyFault HandlersSOAP message structureSOAP is a lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environment. SOAP is a format for sending messagesSOAP is independent of transport protocolA SOAP message is an ordinary XML document containing the following elements:Envelope  - identifies the XML document as a SOAP messageHeader  - contains application specific info like authentication etc.Body  - contains the message in request and responseFault  - contains errors and status information
<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/Hello">  <m:sayHello>    <m:name>Luqman</m:name>  </m:sayHello></soap:Body></soap:Envelope> 2010-02-0828SOAP ExampleRequestResponse<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/stock">  <m:sayHelloResponse>    <m:return>Hello Luqman</m:return>  </m:sayHelloResponse></soap:Body></soap:Envelope>
SOAP errors are handled using a specialised envelope known as a Fault EnvelopeA SOAP Fault is a special element which must appear as an immediate child of the body element<faultcode> and <faultstring> are required.2010-02-0829SOAP Fault
Printing SOAP Messagepublic class MySOAPHandler implements SOAPHandler<SOAPMessageContext>{  public booleanhandleMessage(SOAPMessageContext context) {    try {SOAPMessage message = context.getMessage();      if ((Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY) == true){System.out.println("Request Message: ");        }else{System.out.println("Response Message: ");        }message.writeTo(System.out);    } catch (Exception ex) {ex.printStackTrace();    }    return true;  }  public Set<QName> getHeaders() { return null;  }  public booleanhandleFault(SOAPMessageContext context) { return true; }  public void close(MessageContext context) {  }}Wite a new Class MySOAPHandlerImplement handleMessage
Printing SOAP Message contd...public class MyMessageHandlerResolver implements HandlerResolver {  public List<Handler> getHandlerChain(PortInfoportInfo) {    List<Handler> handlerChain = new ArrayList<Handler>();MySOAPHandlerhh = new MySOAPHandler();handlerChain.add(hh);    return handlerChain;  }}Wite a new Class MyHandlerResolverImplement getHandleChainSet the Handler Resolver in ClientInvoke the web methodRun the clientservice.setHandlerResolver(new MyMessageHandlerResolver());
UDDI is a set of specifications that is used to publish information for describing and discovering web services, finding businesses, building registries. UDDI is a directory for storing information about web services.UDDI communicates via SOAP.2010-02-0832UDDI3 levels of information in UDDIWhite PagesTo query companies with their names and attributesYellow PagesTo query businesses with their categoriesGreen PagesContains technical info on how to interact with the services
2010-02-0833UDDI Structure
2010-02-0834Registry APIs (SOAP Messages)Publishers API
Save things
save_business
save_service
save_binding
save_tModel
Delete things
delete_business
delete_service
delete_binding
delete_tModel

More Related Content

What's hot (20)

PPTX
Cloud computing 20 service modelling
Vaibhav Khanna
 
PDF
Web service assignment
ancymary1996
 
PDF
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
ecosio GmbH
 
PDF
Introduction to Web Services
Thanachart Numnonda
 
PDF
Web services concepts, protocols and development
ishmecse13
 
PPTX
Web services
Akshay Ballarpure
 
PPT
Introduction to web services and how to in php
Amit Kumar Singh
 
PDF
Client protocol connectivity flow in Exchange 2013/2010 coexistence | Introdu...
Eyal Doron
 
PDF
Client protocol connectivity flow in Exchange 2013/2007 coexistence | Introdu...
Eyal Doron
 
PPTX
web technologies Unit 5
madhusrinivasan9
 
PPTX
Introduction to webservices
Gagandeep Singh
 
PPTX
Unit 5 WEB TECHNOLOGIES
tamilmozhiyaltamilmo
 
PPTX
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 
PPTX
Understanding Web Services by software outsourcing company india
Jignesh Aakoliya
 
DOC
Osbsoa1
xavier john
 
PPT
Web service architecture
Muhammad Shahroz Anwar
 
ODP
Web service Introduction
Madhukar Kumar
 
PPTX
Web services wsdl
princeirfancivil
 
PPT
Web services for developer
Rafiq Ahmed
 
Cloud computing 20 service modelling
Vaibhav Khanna
 
Web service assignment
ancymary1996
 
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
ecosio GmbH
 
Introduction to Web Services
Thanachart Numnonda
 
Web services concepts, protocols and development
ishmecse13
 
Web services
Akshay Ballarpure
 
Introduction to web services and how to in php
Amit Kumar Singh
 
Client protocol connectivity flow in Exchange 2013/2010 coexistence | Introdu...
Eyal Doron
 
Client protocol connectivity flow in Exchange 2013/2007 coexistence | Introdu...
Eyal Doron
 
web technologies Unit 5
madhusrinivasan9
 
Introduction to webservices
Gagandeep Singh
 
Unit 5 WEB TECHNOLOGIES
tamilmozhiyaltamilmo
 
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 
Understanding Web Services by software outsourcing company india
Jignesh Aakoliya
 
Osbsoa1
xavier john
 
Web service architecture
Muhammad Shahroz Anwar
 
Web service Introduction
Madhukar Kumar
 
Web services wsdl
princeirfancivil
 
Web services for developer
Rafiq Ahmed
 

Viewers also liked (6)

PPTX
The Kobo Vox for Academic Library Circulation
Brendan Ryan
 
KEY
Crowdpark architecture backend
Francis Varga
 
DOC
Summary (refrigeration and air conditioning )
TinHlaing
 
PPT
Skyquestcom by Kolirana
Koli Bandyopadhyay
 
PPT
Ch11 cms march1
Mary Heuer
 
PPTX
I Care Presentation W 2 Kip
yokh05
 
The Kobo Vox for Academic Library Circulation
Brendan Ryan
 
Crowdpark architecture backend
Francis Varga
 
Summary (refrigeration and air conditioning )
TinHlaing
 
Skyquestcom by Kolirana
Koli Bandyopadhyay
 
Ch11 cms march1
Mary Heuer
 
I Care Presentation W 2 Kip
yokh05
 
Ad

Similar to Service Oriented Architecture Updated Luqman (20)

PPTX
Service Oriented Architecture
Luqman Shareef
 
PPTX
Service Oriented Architecture Luqman
Luqman Shareef
 
PPT
Java web services
kumar gaurav
 
PDF
SOAP-based Web Services
Katrien Verbert
 
PPT
complete web service1.ppt
Dr.Saranya K.G
 
PPT
webservicearchitecture-150614164814-lva1-app6892.ppt
Matrix823409
 
PPTX
Unit 6 SDET Web Services Testing.pptx
Dr. Pallawi Bulakh
 
PPT
WebServices
Rajkattamuri
 
PPTX
Web service- Guest Lecture at National Wokshop
Nishikant Taksande
 
DOCX
Web services Concepts
pasam suresh
 
PDF
Week2 cloud computing week2
Ankit Gupta
 
PPT
Intro to web services
Neil Ghosh
 
PPT
Mule webservices in detail
Shahid Shaik
 
PPTX
nptl cc video.pptx
MunmunSaha7
 
PDF
Web Service Implementation Using ASP.NET
Ponraj
 
PPT
WebService-Java
halwal
 
PPTX
Xml For Dummies Chapter 15 Using Xml With Web Servicesit-slideshares.blogsp...
phanleson
 
PPT
webservices.ppt for website designing ppt
SwapnilAshtekar3
 
PDF
SOA and WCF (Windows Communication Foundation) basics
Yaniv Pessach
 
PPTX
SOAP--Simple Object Access Protocol
Masud Rahman
 
Service Oriented Architecture
Luqman Shareef
 
Service Oriented Architecture Luqman
Luqman Shareef
 
Java web services
kumar gaurav
 
SOAP-based Web Services
Katrien Verbert
 
complete web service1.ppt
Dr.Saranya K.G
 
webservicearchitecture-150614164814-lva1-app6892.ppt
Matrix823409
 
Unit 6 SDET Web Services Testing.pptx
Dr. Pallawi Bulakh
 
WebServices
Rajkattamuri
 
Web service- Guest Lecture at National Wokshop
Nishikant Taksande
 
Web services Concepts
pasam suresh
 
Week2 cloud computing week2
Ankit Gupta
 
Intro to web services
Neil Ghosh
 
Mule webservices in detail
Shahid Shaik
 
nptl cc video.pptx
MunmunSaha7
 
Web Service Implementation Using ASP.NET
Ponraj
 
WebService-Java
halwal
 
Xml For Dummies Chapter 15 Using Xml With Web Servicesit-slideshares.blogsp...
phanleson
 
webservices.ppt for website designing ppt
SwapnilAshtekar3
 
SOA and WCF (Windows Communication Foundation) basics
Yaniv Pessach
 
SOAP--Simple Object Access Protocol
Masud Rahman
 
Ad

Service Oriented Architecture Updated Luqman

  • 1. Service Oriented Architectureand Web servicesMohammed LuqmanShareef
  • 2. COM, DCOM Microsoft specificEJB, RMI Java SpecificCORBA Platform and Language Independent2010-02-082Popular Distributed Application Frameworks/Technologies
  • 3. A software system is divided into highly flexible and re-usable components called services. SOA is just an architecture blue print It is NOT a technical standardIt is NOT a technology2010-02-083What is SOA?SOA is an architectural style of building software applications that promotes loose coupling between components for their reuse.Coarse grainedLoosely coupledPlatform independentStandard Interface
  • 4. Self-contained module that perform a predetermined taskSoftware component that have published contracts/interfacesBlack-box to the consumersPlatform-IndependentInteroperable2010-02-084What is Service ?
  • 5. Systems today are bigger than ever beforeComplexity increases exponentially with sizeSystems need to be interconnectedOO solved the problems of small-medium sized systemsCO (Component Orientation) solved problems of medium-large systemsNeither OO nor CO could cope with the problems of very large systems, systems of systems, or integration between systemsWhy SOA?
  • 6. 2010-02-086Why SOA?End Customer PortalOperator PortalPartner PortalCustomer InfoManagementOrder ManagementCredit ManagementSalesManagementBillingLets take a telecom enterprise systemInvoicingProvisioningNetwork ManagementInventoryServiceCatalogCustomer Profiles
  • 7. 2010-02-087Why SOA?End Customer PortalOperator PortalPartner PortalServicesCredit ManagementSalesManagementCustomer InfoManagementOrder ManagementProvisioningInvoicingInventoryNetwork ManagementCustomer ProfilesBillingServiceCatalog
  • 21. Known implementationManaging servicesService governancePerformanceReliabilitysecuritySLAsInteroperability of servicesChallenges
  • 22. Loose couplingMinimize dependencies.Service contractServices adhere to a communications agreement.Service abstraction Hide the service execution logic from the outside world.Service reusabilityLogic is divided into services for reuse.2010-02-0810SOA: Architectural Principles
  • 23. Service composabilityServices can be assembled to form composite service.Service autonomyServices have control over the logic they encapsulate.Service discoverabilityServices can be found and assessed via available discovery mechanisms.Service relevance Service presented at a granularity recognized by user a meaningful service.2010-02-0811SOA: Architectural Principles
  • 24. SOA can be implemented using any service based technology such as CORBA, but the SOAP based web services standard implementation has gained wide industry acceptance, because these standards provide greater interoperability. Key differences between CORBA and web service are2010-02-0812SOA Implementation
  • 26. Web service is a standard way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. Web services are loosely coupled computing services that can reduce the complexity of building business applications, save costs, and enable new business models. Services running on an arbitrary machine can be accessed in a platform- and language-independent fashion.2010-02-0814What is web service ?
  • 27. Lookup for the tomato sellersYellow Pages: contain companies that are selling tomatoes, their location, and contact information. 2010-02-0815How to buy tomatoes ?Find the service offered according to my needsWhere, when and how can I buy tomatoes? Buy the tomatoesDo the transaction
  • 28. Lookup for the Service ProviderRegistry: contain providers that are selling services, their location, and contact information. Find the service offered according to my needsWhere, when and how can I get the service? Access the servicedo the transaction 2010-02-0816How to access a service?
  • 29. XML (eXtensibleMarkup Language)A uniform data representation and exchange mechanismSOAP (Simple Object Access Protocol)Lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environmentWSDL (Web Service Description Language)XML format that describes the web serviceUDDI (Universal Description Discovery and Integration)Like yellow pages of Web services2010-02-0817Components of a web service
  • 31. 2010-02-0819Service Vs. ConsumerPolicyAdheres togoverned byEnd PointBinds toExposesServesService ConsumerServiceContractsimplementsUnderstandsdescribesMessagesSends/ReceivesSends/Receives
  • 32. Define the service implementation and compile it. \WS>javac -d . HelloImpl.javaUse wsgen to generate the artifacts required to deploy the service. \WS>wsgen -wsdlserver.HelloImpl3. Package the files into a WAR file and deploy it .2010-02-0820Steps to develop a web serviceusing JAX-WSpackage server;import javax.jws.WebService;@WebServicepublic class HelloImpl { /** * @param name * @return Say hello to the person. */ public String sayHello(String name) { return "Hello, " + name + "!"; }}
  • 36. Implement Client Code5. Use wsimport to generate and compile the web service artifacts needed to connect to the service. \WS>wsimportHelloImplService.wsdl parsing WSDL... generating code... compiling code...6. Run the client.2010-02-0824Steps to develop a web service contd…package myClient;import helloservice.endpoint.HelloService;import helloservice.endpoint.Hello;public class HelloClient { public static void main(String[] args) { try {HelloService service = new HelloService(); Hello port = service.getHelloPort(); String response = port.sayHello(“Luqman");System.out.println(response); } catch (Exception e) {e.printStackTrace(); } }}
  • 37. WSDL is a contract between service provider and the consumerA WSDL document describesWhat the service can doWhere it residesHow to invoke it2010-02-0825WSDLWSDL elementsTypesMessageOperationPort TypeWSDLBindingPortService
  • 38. Types Data type definition used in exchanging messagesMessage Describes the logical content of data being communicatedOperation An Abstract description of an action supported by the servicePort Type A set of operations and messages involved with the serviceBinding A concrete protocol and data format specification for a port typePort A single end point defined as a combination of a binding and a network addressService Identifies which ports to group together2010-02-0826WSDL elements
  • 39. 2010-02-0827SOAPSOAP EnvelopeSOAP HeaderHeader BlockSOAP BodyMessage BodyFault HandlersSOAP message structureSOAP is a lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environment. SOAP is a format for sending messagesSOAP is independent of transport protocolA SOAP message is an ordinary XML document containing the following elements:Envelope - identifies the XML document as a SOAP messageHeader - contains application specific info like authentication etc.Body - contains the message in request and responseFault - contains errors and status information
  • 40. <?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/Hello">  <m:sayHello>    <m:name>Luqman</m:name>  </m:sayHello></soap:Body></soap:Envelope> 2010-02-0828SOAP ExampleRequestResponse<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/stock">  <m:sayHelloResponse>    <m:return>Hello Luqman</m:return>  </m:sayHelloResponse></soap:Body></soap:Envelope>
  • 41. SOAP errors are handled using a specialised envelope known as a Fault EnvelopeA SOAP Fault is a special element which must appear as an immediate child of the body element<faultcode> and <faultstring> are required.2010-02-0829SOAP Fault
  • 42. Printing SOAP Messagepublic class MySOAPHandler implements SOAPHandler<SOAPMessageContext>{ public booleanhandleMessage(SOAPMessageContext context) { try {SOAPMessage message = context.getMessage(); if ((Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY) == true){System.out.println("Request Message: "); }else{System.out.println("Response Message: "); }message.writeTo(System.out); } catch (Exception ex) {ex.printStackTrace(); } return true; } public Set<QName> getHeaders() { return null; } public booleanhandleFault(SOAPMessageContext context) { return true; } public void close(MessageContext context) { }}Wite a new Class MySOAPHandlerImplement handleMessage
  • 43. Printing SOAP Message contd...public class MyMessageHandlerResolver implements HandlerResolver { public List<Handler> getHandlerChain(PortInfoportInfo) { List<Handler> handlerChain = new ArrayList<Handler>();MySOAPHandlerhh = new MySOAPHandler();handlerChain.add(hh); return handlerChain; }}Wite a new Class MyHandlerResolverImplement getHandleChainSet the Handler Resolver in ClientInvoke the web methodRun the clientservice.setHandlerResolver(new MyMessageHandlerResolver());
  • 44. UDDI is a set of specifications that is used to publish information for describing and discovering web services, finding businesses, building registries. UDDI is a directory for storing information about web services.UDDI communicates via SOAP.2010-02-0832UDDI3 levels of information in UDDIWhite PagesTo query companies with their names and attributesYellow PagesTo query businesses with their categoriesGreen PagesContains technical info on how to interact with the services
  • 46. 2010-02-0834Registry APIs (SOAP Messages)Publishers API
  • 70. get_tModelDetailWrite the implementation and interfaceGenerate WSDL file>java org.apache.axis.wsdl.Java2WSDL -o AdderWSDL.wsdl -l http://localhost:8080/axis/services/Adder luqman.AdderInterfaceGenerate server side and client side classes>java org.apache.axis.wsdl.WSDL2Java -o . -p luqman.generated -s AdderWSDL.wsdlBind web service with functionality providerBundle required classesjar cfv adderServerSide.jar luqman\*.class luqman\generated\*.classCopy the jar in the server’s axis/WEB-INF/lib folder>jar cfv adderClientSide.jar luqman\generated\AdderInterface.classluqman\generated\AdderInterfaceService.classluqman\generated\AdderInterfaceServiceLocator.classluqman\generated\AdderSoapBindingStub.classRegister web services with Axisjava org.apache.axis.client.AdminClientluqman\generated\deploy.wsddWrite Web service clientDeveloping a web service using Axis
  • 71. Printing SOAP Message in AXISEdit the generated code in AdderSoapBindingStub.class - In the corresponding method of the Stub class add the following lines of code after the _call.invoke(...) statementString requestMessage = _call.getMessageContext().getRequestMessage().getSOAPEnvelope().toString(); String responseMessage = _call.getMessageContext().getResponseMessage().getSOAPEnvelope().toString(); System.out.println(“Request SOAP Message” + requestMessage);System.out.println(“Request SOAP Message” + responseMessage);
  • 72. Adding attachments to SOAP Message in AXISClient Side CodeCalculatorService service = new CalculatorServiceLocator();Calculator calc = service.getcalculator();Stub stub = (Stub) calc;FileDataSourcefs = new FileDataSource(new File("E:/Code/testA.txt") );DataHandler dh = new DataHandler(fs);stub.addAttachment(dh);Display the Attachment in StubEdit the generated code in AdderSoapBindingStub.class - In the corresponding method of the Stub class add the following lines of code after the _call.invoke(...) statementMessageContext message = _call.getMessageContext(); //.getRequestMessage(); Iterator it = message.getRequestMessage().getAttachments();while (it.hasNext()) {AttachmentPart part = (AttachmentPart) it.next(); try {System.out.println("File Name : " + part.getDataHandler().getDataSource().getName());InputStream is = part.getDataHandler().getInputStream(); while (is.available() > 0) {System.out.print((char) is.read()); } } catch (Exception ex) {ex.printStackTrace(); }
  • 74. Each unique URL is a representation of some objectEx : http://www.mycompany.com/india/hyd/employees http://www. mycompany.com/india/hyd/employees/1234HTTP GET Method operates on the resource.Object state is transferred and stored at client.Representation of the resource state in XML, JSON etc.2010-02-0839RESTful web servicesREpresentationalState Transfer
  • 75. Every object has its own unique methodsMethods can be remotely invoked over the InternetA single URI represents the end-point, and that's the only contact with the WebData hidden behind method calls and parametersData is unavailable to Web applicationsRPC vs RESTRPCRESTEvery useful data object has an address
  • 76. Resources themselves are the targets for method calls
  • 77. The list of methods is fixed for all resources2010-02-0841RESTful web services contd…PrinciplesResource identification through URI
  • 78. Uniform interface GET/PUT/POST/DELETESelf-descriptive messages
  • 79. Stateful interactions through hyperlinksBenefitsClient sideEasy to experiment in browserBroad programming language supportChoice of data formatsbookmarkableServer sideUniform Interface
  • 82. Easy failover42ExampleRequestGET/india/hyd/employees/1234 HTTP/1.1Host: mycompany.comAccept: application/xmlResponseHTTP/1.1 200 OKDate: Tue, 09 Feb 2010 11:41:20 GMTServer: Apache/1.3.6Content-Type: application/xml; charset=UTF-8<?xml version="1.0"?><Employees xmlns="…"> <Employee name=“ABC”> … </Employee></Employees>ResourceMethodStatetransferRepresentation2010-02-08
  • 83. 2010-02-0843Developing a RESTful web service using JAX-WSpackage com.sun.jersey.samples.helloworld.resources;import javax.ws.rs.GET;import javax.ws.rs.Produces;import javax.ws.rs.Path;@Path("/employees/{empid}")public class Employee{@GET @Produces("text/xml") public String getEmployee(@PathParam(“empid") String empId) { ... … }}
  • 86. Securing web servicesSSL is not enoughSSL provides point to point securityWS needs end to end securitySSL provides security at transport levelWS needs security at message levelSSL doesn’t support non-repudiationNon-repudiation is critical for business WSWeb service security requirementsAuthentication ( Identity check )Authorization ( Access Control )Confidentiality ( Encryption )Integrity ( Signature Support )Non-repudiation ( Ability to prove that a particular transaction is performed)Accessibility ( Ensuring that the service is not impacted by attacks)2010-02-0846
  • 87. XML digital signature ( IETF and W3C)XML Encryption ( W3C)SAML (Secure Assertion Markup Language) ( OASIS)WS-Security (Web Services Security) (OASIS)WS-SecureConversationWS-FederationWS-PolicyWS-TrustWS-PrivacyXACML (Extensible Access Control Markup Language) (OASIS)2010-02-0847Web service security standards
  • 88. “BPEL is an XML language for defining the composition of web services into new services”BPEL would require that every process Either has a “center” of executionA process is composed of a large set of orchestration definitions interacting with each otherBPEL assumes that business processes can be fully captured in a single definition, including all possible exception pathsNot sure this is the right assumptionBPEL
  • 89. Identify the partners in the processDeclare the Partners in the ProcessDesign the workflow of the processDefine up the workflow processDeclare the Process Using BPEL Activity ConstructsAdd Business Logic Using BPELConstructsBPEL Steps
  • 90. Open source specification project from the Object Management Group (OMG), describing a UML profile and metamodel for the modeling and design of services within a service-oriented architecture.SoaML(SOA Modeling Language)
  • 91. Dealer Network ArchitectureThe dealer network is defined as a community “collaboration” involving three primary roles for participants in this community: the dealer, manufacturer, and shipper. The following diagram illustrates these roles and services in the dealer network architecture. SOAML Example
  • 92. The enterprise service bus (ESB) is a software infrastructure that facilitates application integration. An ESB does not itself implement SOA but provides the features with which SOA can be implemented.ExamplesGlassfish ESB (Sun)Websphere ESB (IBM)Biztalk Server (Microsoft)JBOSS ESBESB
  • 93. InvocationRoutingMediationMessage ProcessingService OrchestrationComplex Event ProcessingManagementCommon ESB Characteristics
  • 94. SOAP - http://www.w3c.org/TR/soapWSDL - http://www.w3c.org/TR/wsdlUDDI - http://www.uddi.xml.orgSAML - http://saml.xml.orgebXML - http://www.ebxml.orgCORBA Vs. Web services - http://www2002.og/CDROM/alternate/395SoaML - http://www.omg.org/spec/SoaMLBPEL - www.oasis-open.org/committees/wsbpel2010-02-0854For more information