web service service registry service requestor service provider publishfind bind
TRANSCRIPT
![Page 1: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/1.jpg)
Web Service
Service Registry
Service Requestor
Service provider
Publish find
Bind
http://www.ibm.com/services/uddihttp://www.ibm.com/services/uddi/testregistryhttp://uddi.microsoft.comhttp://test.uddi.mirosoft.comhp – available soon
SOAP on HTTP
All the Service describe by UDDI
![Page 2: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/2.jpg)
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
![Page 3: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/3.jpg)
UDDI Business RegistryBusinesses 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
![Page 4: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/4.jpg)
UDDI by examples
Two examples in UDDI registry 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)
![Page 5: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/5.jpg)
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 )
WSDL
Service Implementation Definition
Service
Port
Service Interface Definition
Binding
Message
PortType
Type
url to accept the soap request
![Page 6: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/6.jpg)
WSDL ExamplesExamples from www.xmethods.net
Service Name: Joke of the DayDescription: 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
![Page 7: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/7.jpg)
SOAPSimple 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 messagehttp headers
soap Envelope
soap header
soap body
![Page 8: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/8.jpg)
SOAPHeader• Use for authentication, transaction
management, payment, encryption etc.
Body• Special defines one body entry: Fault
<SOAP-ENV: Fault>
<faultcode>SOAP-ENV:server</faultcode>
<faultstring>Method’s getXXX is not supported.</ faultstring>
<faultactor>/xxx/xxx.jsp</ faultactor>/
</SOAP-ENV: Fault>
![Page 9: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/9.jpg)
SOAP MessagePOST /WeatherServioce HTTP/1.1Host:www.weatherservice.comContent-Type: text/xml; charset=“utf-8”Content-Length: nnnnSOAPAction: “Some-URL”
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
<SOAP-ENV:Body> <m:GetWeather xmlns:m=‘Some-URL’> <city>Seattle</city> <state>WA</state> </m:GetWeather> </SOAP-ENV:Body></SOAP-ENV:Envelope>
![Page 10: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/10.jpg)
Web Services Stack
Service Negotiation
internet
Transport
Messaging
Service Description
Workflow, Choreography
Routing & Attachments
Managem
ent
Quality of S
ervice (QoS
)
Security
![Page 11: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/11.jpg)
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.
![Page 12: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/12.jpg)
Web Service
Service Registry
Service Requestor
Service provider
1. Service provider Publish Service2. Service requestor
find the service
3. Use the service through a SOAP call (use WSDL to build the SOAP request)
SOAP on HTTP
![Page 13: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/13.jpg)
J2EE vs. .NetTo 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.
![Page 14: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/14.jpg)
Tools availableTools 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)
![Page 15: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/15.jpg)
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
![Page 16: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/16.jpg)
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
![Page 17: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/17.jpg)
IBM/Apache Struts
Input Form JSP
Struts Controller
Servlet
WSDL Parser Action
WSDL
Output Form JSP
Struts Controller
Servlet
SOAP call Action
SOAP
![Page 18: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/18.jpg)
GLUEto 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
![Page 19: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/19.jpg)
Glue - Demopublic 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 Publish1GLUE 1.2 © 2001 The Mind ElectricStartup server on http://129.57.41.138:8004/glue
![Page 20: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/20.jpg)
Glue - Demohttp://einstein.jlab.org:8004/glue/urn:exchange.wsdl
![Page 21: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/21.jpg)
Glue - Demoimport 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
![Page 22: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/22.jpg)
Glue - Demohttp://einstein.jlab.org:8080/console/index.espWSDL = http://einstein.jlab.org:8004/glue/urn:exchange.wsdl
![Page 23: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/23.jpg)
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.
![Page 24: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/24.jpg)
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
![Page 25: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/25.jpg)
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.
![Page 26: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/26.jpg)
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)
![Page 27: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/27.jpg)
Sun - bowstreetBowStreet - 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.
![Page 28: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/28.jpg)
SummaryJAX 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
![Page 29: Web Service Service Registry Service Requestor Service provider Publishfind Bind](https://reader036.vdocuments.net/reader036/viewer/2022062619/5518cc93550346a61f8b5ac0/html5/thumbnails/29.jpg)
JLab Grid Web ServiceService:• 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.