Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Service Service Registry Service Requestor Service provider Publishfind Bind

Similar presentations


Presentation on theme: "Web Service Service Registry Service Requestor Service provider Publishfind Bind"— Presentation transcript:

1 Web Service Service Registry Service Requestor Service provider Publishfind Bind http://www.ibm.com/services/uddi http://www.ibm.com/services/uddi/testregistry http://uddi.microsoft.com http://test.uddi.mirosoft.com hp – available soon SOAP on HTTP All the Service describe by UDDI

2 UDDI (xml schemas) UDDI- Universal Description, Discovery, and Integration Programmatic descriptions of businesses and the services supported Programmatic descriptions of web service specifications Programming model & schema

3 UDDI Business Registry Businesses register public information about themselves White pages Yellow pages Green pages Business name, Text description, Contact info, Known identifiers Business categories (standard taxonomies) Specify how to bind to a service provider. Technical info about service (how to invoke their services) – a point to WSDL

4 UDDI by examples Two examples in UDDI registry http://uddi.microsoft.com http://uddi.microsoft.com 1.Flower (a regular service) 2.Xmethods (provides more than one web services, each one is described in a WSDL file)

5 WSDL- Web Service Description Language (an xml vocabulary that is used to define the service interface for a web service) Service interface detail Access protocol Contact endpoint (http://www.xmethods.net/detail.html?id=5 )http://www.xmethods.net/detail.html?id=5 WSDL Service Implementation Definition Service Port Service Interface Definition Binding Message PortType Type url to accept the soap request

6 WSDL Examples Examples from www.xmethods.net Service Name:Joke of the Day Description:Provides a random joke on each execution. WSDL URL: http://services.xmltoday.com/vx_engine/wsdl_publish.vep/joke.wsdl Service Name: Sun/Moon rise and set data Description: Sunrise, sunset, moonrise, moonset for a given latitude, longitude, date and time bias. WSDL URL: http://www.armyaviator.com/cgi-bin/astro.exe/wsdl/IAstro

7 SOAP Simple Object Access Protocol (SOAP) is a lightweight protocol that defines a uniform way of passing XML-encoded data. (It also defines a way to perform remote procedure using HTTP as the underlying communication protocol) soap message http headers soap Envelope soap header soap body

8 SOAP Header Use for authentication, transaction management, payment, encryption etc. Body Special defines one body entry: Fault SOAP-ENV:server Methods getXXX is not supported. /xxx/xxx.jsp /

9 SOAP Message POST /WeatherServioce HTTP/1.1 Host:www.weatherservice.com Content-Type: text/xml; charset=utf-8 Content-Length: nnnn SOAPAction: Some-URL <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/> Seattle WA

10 Web Services Stack Service Negotiation internet Transport Messaging Service Description Workflow, Choreography Routing & Attachments Management Quality of Service (QoS) Security

11 Web Service Currently most service entry (>95%) in UDDI registry are not web based service. In the future there will be private vertical UDDI registries and only trust company can register the service. Real business will used private UDDI registry to find the service.

12 Web Service Service Registry Service Requestor Service provider 1. Service provider Publish Service 2. Service requestor find the service 3. Use the service through a SOAP call (use WSDL to build the SOAP request) SOAP on HTTP

13 J2EE vs..Net To develop web service: java: Platform > JVM > servlet, jsp, jdbc, jndi, jms, rmi, corba, EJB, jax package etc..net Wintel > CLR (common Language Runtime) > System.WebService, ASP.NET, DirectoryServices, System.Messaging, System.Runtime.Remoting, MSXML, SOAP, WSDL etc.

14 Tools available Tools for Java & Web Service SOAP4J (apache & IBM), JAX package (sun) GLUE (the mind electric) Sun: bowstreet ( include Jbuilder ) IBM websphere (include Application developer IDE) Utility tools Tcp monitor/tunnel (Soap4J) (to monitor soap message) Struts(apache) (to generate web interface from WSDL file) Sun ONE (Open Net Environment)

15 SOAP4J (apache) Client library to invoke SOAP service - API for invoking SOAP RPC service - API for sending and receiving SOAP messages. Used as a server – side tool to implement SOAP accessible services. -RPC accessible service -Message accessible service

16 JAX package – Java API for XML JAXP – parse XML documents JAXB – map XML elements to java classes JAXM – sends SOAP messages JAXR –provides a standard way to access business registry JAX-RPC – sends SOAP calls to remote parties MultiSchema Validation – not in JAX package

17 IBM/Apache Struts Input Form JSP Struts Controller Servlet WSDL Parser Action WSDL Output Form JSP Struts Controller Servlet SOAP call Action SOAP

18 GLUE to create software building blocks that are language, platform and location independent. Useful feature: A toolkit for parsing and manipulating XML XML/Java mapping system XML storage system SSL authentication A browser-based management console

19 Glue - Demo public class Exchange { public float getRate( String country1, String country2 ) { return 122.69F; // always return a constant for this demo } import electric.registry.Registry; import electric.server.http.HTTP; public class Publish1 { public static void main( String[] args ) throws Exception { // start a web server on port 8004, accept messages via /glue HTTP.startup( "http://localhost:8004/glue" ); // publish an instance of Exchange Registry.publish( "urn:exchange", new Exchange() ); } >java Publish1 GLUE 1.2 © 2001 The Mind Electric Startup server on http://129.57.41.138:8004/glue

20 Glue - Demo http://einstein.jlab.org:8004/glue/urn:exchange.wsdl

21 Glue - Demo import electric.registry.Registry; import examples.publish.IExchange; public class Invoke1{ public static void main( String[] args ) throws Exception { // bind to web service whose WSDL is at the specified URL String url = "http://localhost:8004/glue/urn:exchange.wsdl"; Exchange exchange = (Exchange) Registry.bind( url, Exchange.class ); // invoke the web service as if it was a local java object float rate = exchange.getRate( "usa", "japan" ); System.out.println( "usa/japan exchange rate = " + rate ); } > java Invoke1 usa/japan exchange rate = 122.69

22 Glue - Demo http://einstein.jlab.org:8080/console/index.esp WSDL = http://einstein.jlab.org:8004/glue/urn:exchange.wsdl

23 IBM WebSphere Studio WebSphere Stuio Site Developer – a tool for developing and managing web sites that include HTML, JSP pages, Java servlets, rich media, xml, and web services. WebSphere Stuio Application Developer – a J2EE-compliant server-side Java tool, focusing on EJB development, deployment, and profiling, that also contains all the functionally of Site Developer.

24 IBM Application Developer EJB and servlet creation and deployment Performance profiling and analysis tools Database wizards Web services wizards JSP tags Team environment XML tools Core Java IDE Web page wizards with dynamic effects Java development environment

25 Web service development Discover – browse the UDDI registry to locate existing Web services for integration Create or transform – create Web service from existing projects. Build – wrap existing artifacts as SOAP and HTTP service and describe them in WSDL. Deploy – deploy the Web service into Websphere Application server or Tomcat. Test – test the web service as it runs locally or remotely Develop – generate a sample application to assist you in creating your own Web service client application. Publish – publish Web service to the UDDI business registry.

26 XML tools Create, view, and validate DTDs and XML schemas Create XML documents from DTD Generate JavaBeans from DTD or xml schema Define mappings between XML documents and generate XSLT scripts that transform documents. XSL stylesheet processor (xalan)

27 Sun - bowstreet BowStreet - Business Web Portal Solution Portal Configuration & Customization - Create portals within minutes using wizards. - Build in portal factory Application Integration -Packaged application -Content & document management -Application servers -Messaging systems -XML, EJB, SOAP etc.

28 Summary JAX package - use it in grid project to send soap message Apache SOAP4J - slow, include server and client. GLUE – use it to generate WSDL and web console. Sun: bowstreet ( include Jbuilder ) - no experience IBM Websphere - only got complimentary preview copy - contains too much (most are not needed) Jbuilder – Good IDE for java development

29 JLab Grid Web Service Service: Convert the GridServer (application) to a bean-like application. Modify GridService (servlet) to take SOAP request using jaxm package (or other). Add WSDL to describe our service (use GLUE or other package to generate it). Client: Add Soap layer for requesting the service. Create service web interface (html) using GLUE or Struts package.


Download ppt "Web Service Service Registry Service Requestor Service provider Publishfind Bind"

Similar presentations


Ads by Google