SlideShare a Scribd company logo
[object Object],[object Object]
[object Object],[object Object],[object Object]
Both servlet endpoints and EJB endpoints can have an object implementing the  WebServiceContext  interface injected using the @Resource annotation
Allows developers to write message-oriented as well as RPC-oriented web services
With JAX-WS, the developer does  not generate or parse SOAP messages
the platform independence of the Java programming language beacuse jax-ws uses techology definined by the W3C :  HTTP, SOAP and WSDL
[object Object]
[object Object],[object Object]
Annotations  : supports the use of annotations.  ,[object Object]
Much easier to expose  method as web services
Webservices.xml is optional  and  overrides  all the information in a file class java ,[object Object],[object Object],[object Object]
Data Binding  : JAX-WS leverages the Java Architecture for XML Binding (JAXB) 2.1 API and tools as the binding technology for mappings between Java objects and XML documents.
Support for MTOM  : can send binary attachments such as images or files along with Web services requests
Support for SOAP 1.2  : JAX-WS supports both SOAP 1.1 and SOAP 1.2
Development tools  : JAX-WS provides the  wsgen   and  wsimport   command-line tools for generating portable artifacts for JAX-WS Web services
Support for WS-Addressing (JAX-WS 2.1) :  The new API enables you to create, transmit and use endpoint references to target a specific Web service endpoint
Support for JAX-WS 2.1 features :  JAX-WS 2.1 introduces the concept of features as a way to programmatically control certain functions or behaviors
[object Object],[object Object]
Both servlet endpoints and EJB endpoints can have an object implementing the  WebServiceContext  interface injected using the @Resource annotation
[object Object],[object Object]
@WebMethod -> only the methods annotates with @WebMethod will be exposed  to be a web services method
We can exclude some methods by annotating the method with the property exclude   setted to true into the @WebMethod annotation ,[object Object],[object Object],[object Object],[object Object]
[object Object],JAX-WS  HelloWorld  SEI: @WebService(name = &quot;HelloWorld&quot;, targetNamespace = &quot;urn:samples.ibm.com/HelloWorld&quot;) public interface HelloWorld { @WebMethod (action = &quot;urn:samples.ibm.com/HelloWorld/hello&quot;) @WebResult (name = &quot;response&quot;, targetNamespace = &quot;&quot;) @RequestWrapper (localName = &quot; hello &quot;, targetNamespace =  &quot;urn:samples.ibm.com/HelloWorld&quot;, className = &quot;com.ibm.samples.helloworld.Hello&quot;) @ResponseWrapper (localName = &quot; helloResponse &quot;, targetNamespace = &quot;urn:samples.ibm.com/HelloWorld&quot;, className =  &quot;com.ibm.samples.helloworld.HelloResponse&quot;) public String hello( @WebParam(name = &quot;name&quot;, targetNamespace = &quot;&quot;) String name);} <wsdl:types> <xsd:schema targetNamespace=&quot;urn:helloWorld/sample/ibm/com&quot;...> <xsd:element name=&quot;hello&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;helloResponse&quot; type=&quot;xsd:string&quot;/> </xsd:schema> </wsdl:types> <wsdl:message name=&quot; helloRequestMsg &quot;> <wsdl:part element=&quot;tns:hello&quot; name=&quot;helloParameters&quot; /> </wsdl:message> <wsdl:message name=&quot; helloResponseMsg &quot;> <wsdl:part element=&quot;tns:helloResponse&quot; name=&quot;helloResult&quot; /> </wsdl:message>
[object Object]

More Related Content

What's hot

Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
IndicThreads
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
Fahad Golra
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
Nicola Pedot
 
Web development with ASP.NET Web API
Web development with ASP.NET Web APIWeb development with ASP.NET Web API
Web development with ASP.NET Web API
Damir Dobric
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
IMC Institute
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
Dzmitry Naskou
 
Websphere interview Questions
Websphere interview QuestionsWebsphere interview Questions
Websphere interview Questions
gummadi1
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jsp
Ankit Minocha
 
Spring WebApplication development
Spring WebApplication developmentSpring WebApplication development
Spring WebApplication development
ThirupathiReddy Vajjala
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
Abhi Arya
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
Kevin Hazzard
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
VMahesh5
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
Eyal Vardi
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
praveen_guda
 
Servlet ppt by vikas jagtap
Servlet ppt by vikas jagtapServlet ppt by vikas jagtap
Servlet ppt by vikas jagtap
Vikas Jagtap
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
pasam suresh
 

What's hot (20)

Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
 
Web development with ASP.NET Web API
Web development with ASP.NET Web APIWeb development with ASP.NET Web API
Web development with ASP.NET Web API
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
Websphere interview Questions
Websphere interview QuestionsWebsphere interview Questions
Websphere interview Questions
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jsp
 
Spring WebApplication development
Spring WebApplication developmentSpring WebApplication development
Spring WebApplication development
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
Servlet ppt by vikas jagtap
Servlet ppt by vikas jagtapServlet ppt by vikas jagtap
Servlet ppt by vikas jagtap
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 

Similar to SCDJWS 5. JAX-WS

JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
Anil Allewar
 
Web api
Web apiWeb api
Web api
udaiappa
 
SCDJWS 6. REST JAX-P
SCDJWS 6. REST  JAX-PSCDJWS 6. REST  JAX-P
SCDJWS 6. REST JAX-P
Francesco Ierna
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSPGeethu Mohan
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentChui-Wen Chiu
 
Introducing dwr (direct web remoting)
Introducing dwr (direct web remoting)Introducing dwr (direct web remoting)
Introducing dwr (direct web remoting)
Ashish Boobun
 
Mule soft ppt 2
Mule soft ppt  2Mule soft ppt  2
Mule soft ppt 2
Vinoth Moorthy
 
Ppt on web development and this has all details
Ppt on web development and this has all detailsPpt on web development and this has all details
Ppt on web development and this has all details
gogijoshiajmer
 
quickguide-einnovator-7-spring-mvc
quickguide-einnovator-7-spring-mvcquickguide-einnovator-7-spring-mvc
quickguide-einnovator-7-spring-mvcjorgesimao71
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationAjax Experience 2009
 
Signal r
Signal rSignal r
Signal r
Vasilios Kuznos
 

Similar to SCDJWS 5. JAX-WS (20)

JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
 
11-DWR-and-JQuery
11-DWR-and-JQuery11-DWR-and-JQuery
11-DWR-and-JQuery
 
11-DWR-and-JQuery
11-DWR-and-JQuery11-DWR-and-JQuery
11-DWR-and-JQuery
 
Advanced soa and web services
Advanced soa and web servicesAdvanced soa and web services
Advanced soa and web services
 
Web api
Web apiWeb api
Web api
 
SCDJWS 6. REST JAX-P
SCDJWS 6. REST  JAX-PSCDJWS 6. REST  JAX-P
SCDJWS 6. REST JAX-P
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSP
 
Rest web service
Rest web serviceRest web service
Rest web service
 
JEE5 New Features
JEE5 New FeaturesJEE5 New Features
JEE5 New Features
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Introducing dwr (direct web remoting)
Introducing dwr (direct web remoting)Introducing dwr (direct web remoting)
Introducing dwr (direct web remoting)
 
Mule soft ppt 2
Mule soft ppt  2Mule soft ppt  2
Mule soft ppt 2
 
Ppt on web development and this has all details
Ppt on web development and this has all detailsPpt on web development and this has all details
Ppt on web development and this has all details
 
quickguide-einnovator-7-spring-mvc
quickguide-einnovator-7-spring-mvcquickguide-einnovator-7-spring-mvc
quickguide-einnovator-7-spring-mvc
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Jdbc[1]
Jdbc[1]Jdbc[1]
Jdbc[1]
 
JDBC programming
JDBC programmingJDBC programming
JDBC programming
 
08 ajax
08 ajax08 ajax
08 ajax
 
Signal r
Signal rSignal r
Signal r
 

More from Francesco Ierna

Design Pattern 5. Singleton Pattern
Design Pattern 5. Singleton PatternDesign Pattern 5. Singleton Pattern
Design Pattern 5. Singleton Pattern
Francesco Ierna
 
Design Pattern 4. Factory Pattern
Design Pattern 4. Factory PatternDesign Pattern 4. Factory Pattern
Design Pattern 4. Factory Pattern
Francesco Ierna
 
SCBCD 2. differenze stateless stateful
SCBCD 2. differenze stateless   statefulSCBCD 2. differenze stateless   stateful
SCBCD 2. differenze stateless stateful
Francesco Ierna
 
SPRING 1. overview
SPRING 1. overviewSPRING 1. overview
SPRING 1. overview
Francesco Ierna
 
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet   req - resp (cap3 - cap4)SCWCD 2. servlet   req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
Francesco Ierna
 
SCWCD 1. get post - url (cap1 - cap2 )
SCWCD 1. get   post - url (cap1 - cap2 )SCWCD 1. get   post - url (cap1 - cap2 )
SCWCD 1. get post - url (cap1 - cap2 )
Francesco Ierna
 
Design Pattern - 3. Decorator pattern
Design Pattern - 3. Decorator patternDesign Pattern - 3. Decorator pattern
Design Pattern - 3. Decorator pattern
Francesco Ierna
 
Design Pattern - 2. Observer
Design Pattern -  2. ObserverDesign Pattern -  2. Observer
Design Pattern - 2. Observer
Francesco Ierna
 
SCDJWS 4. UDDI
SCDJWS 4. UDDISCDJWS 4. UDDI
SCDJWS 4. UDDI
Francesco Ierna
 
SCDJWS 3. WSDL
SCDJWS 3. WSDLSCDJWS 3. WSDL
SCDJWS 3. WSDL
Francesco Ierna
 
SCDJWS 2. Soap
SCDJWS 2. SoapSCDJWS 2. Soap
SCDJWS 2. Soap
Francesco Ierna
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
Francesco Ierna
 

More from Francesco Ierna (14)

2. wiring beans
2. wiring beans2. wiring beans
2. wiring beans
 
Design Pattern 5. Singleton Pattern
Design Pattern 5. Singleton PatternDesign Pattern 5. Singleton Pattern
Design Pattern 5. Singleton Pattern
 
Design Pattern 4. Factory Pattern
Design Pattern 4. Factory PatternDesign Pattern 4. Factory Pattern
Design Pattern 4. Factory Pattern
 
SCBCD 2. differenze stateless stateful
SCBCD 2. differenze stateless   statefulSCBCD 2. differenze stateless   stateful
SCBCD 2. differenze stateless stateful
 
SPRING 1. overview
SPRING 1. overviewSPRING 1. overview
SPRING 1. overview
 
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet   req - resp (cap3 - cap4)SCWCD 2. servlet   req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
 
SCWCD 1. get post - url (cap1 - cap2 )
SCWCD 1. get   post - url (cap1 - cap2 )SCWCD 1. get   post - url (cap1 - cap2 )
SCWCD 1. get post - url (cap1 - cap2 )
 
Design Pattern - 3. Decorator pattern
Design Pattern - 3. Decorator patternDesign Pattern - 3. Decorator pattern
Design Pattern - 3. Decorator pattern
 
Design Pattern - 2. Observer
Design Pattern -  2. ObserverDesign Pattern -  2. Observer
Design Pattern - 2. Observer
 
SCDJWS 4. UDDI
SCDJWS 4. UDDISCDJWS 4. UDDI
SCDJWS 4. UDDI
 
SCBCD 1. generic ejb
SCBCD 1. generic ejbSCBCD 1. generic ejb
SCBCD 1. generic ejb
 
SCDJWS 3. WSDL
SCDJWS 3. WSDLSCDJWS 3. WSDL
SCDJWS 3. WSDL
 
SCDJWS 2. Soap
SCDJWS 2. SoapSCDJWS 2. Soap
SCDJWS 2. Soap
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

SCDJWS 5. JAX-WS

  • 1.
  • 2.
  • 3. Both servlet endpoints and EJB endpoints can have an object implementing the WebServiceContext interface injected using the @Resource annotation
  • 4. Allows developers to write message-oriented as well as RPC-oriented web services
  • 5. With JAX-WS, the developer does not generate or parse SOAP messages
  • 6. the platform independence of the Java programming language beacuse jax-ws uses techology definined by the W3C : HTTP, SOAP and WSDL
  • 7.
  • 8.
  • 9.
  • 10. Much easier to expose method as web services
  • 11.
  • 12. Data Binding  : JAX-WS leverages the Java Architecture for XML Binding (JAXB) 2.1 API and tools as the binding technology for mappings between Java objects and XML documents.
  • 13. Support for MTOM  : can send binary attachments such as images or files along with Web services requests
  • 14. Support for SOAP 1.2  : JAX-WS supports both SOAP 1.1 and SOAP 1.2
  • 15. Development tools  : JAX-WS provides the wsgen and wsimport command-line tools for generating portable artifacts for JAX-WS Web services
  • 16. Support for WS-Addressing (JAX-WS 2.1) : The new API enables you to create, transmit and use endpoint references to target a specific Web service endpoint
  • 17. Support for JAX-WS 2.1 features : JAX-WS 2.1 introduces the concept of features as a way to programmatically control certain functions or behaviors
  • 18.
  • 19. Both servlet endpoints and EJB endpoints can have an object implementing the WebServiceContext interface injected using the @Resource annotation
  • 20.
  • 21. @WebMethod -> only the methods annotates with @WebMethod will be exposed to be a web services method
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 32. EndpointInterface : The qualified name of the service endpoint interface. This annotation allows the separation of interface contract from implementation.
  • 34.
  • 35. Action : The XML namespace of the the WSDL and some of the XML elements generated from this web service.
  • 36.
  • 37.
  • 38. mode: Represents the direction the parameter flows for this method. Possible values are IN , INOUT and OUT . INOUT and OUT modes
  • 39.
  • 40.
  • 42.
  • 43. document/literal wrapped -> is that methods on a document/literal wrapped endpoint can have multiple parameters bound to the body of a SOAP message,
  • 44.
  • 45. Use : Defines the encoding used for messages used in web service. Can only be LITERAL for JAX-WS 2.1. Def LITERAL
  • 46.
  • 47. javax.xml.ws.RequestWrapper  : annotates methods in the Service Endpoint Interface with the request wrapper bean to be used at runtime. Only the className is required in this case
  • 48. javax.xml.ws.ResponseWrapper  : annotates methods in the Service Endpoint Interface with the response wrapper bean to be used at runtime. Only the className is required in this case
  • 49.
  • 50. javax.xml.ws.RequestWrapper  : annotates methods in the Service Endpoint Interface with the request wrapper bean to be used at runtime. Only the className is required in this case
  • 51. javax.xml.ws.ResponseWrapper  : annotates methods in the Service Endpoint Interface with the response wrapper bean to be used at runtime. Only the className is required in this case
  • 52. javax.xml.ws.ServiceMode : allows the Provider developer to indicate whether a Provider implementation wishes to work with entire protocol messages or just with protocol message payloads
  • 53. javax.xml.ws.WebEndpoint : Used to annotate the get PortName() methods of a generated service interface
  • 54. javax.xml.ws.WebFault : This annotation is generated by the JAX-WS tools into service specific exception classes generated from a WSDL to customize to the local and namespace name of the fault element and the name of the fault bean and to mark the service specific exception as one generated from WSDL
  • 55. javax.xml.ws.WebServiceClient : specified in this annotation is sufficient to uniquely identify a wsdl:service element inside a WSDL document
  • 56. javax.xml.ws.WebServiceProvider : Annotation used to annotate a Provider implementation class
  • 57.
  • 58. javax.xml.ws.Feature : The @Feature annotation is used to enable/disable a feature to use for a web service endpoint implementation class. This annotation is used with @BindingType annotation.
  • 59.
  • 60.
  • 61.
  • 62. WsGen  : Tool to process a compiled javax.jws.WebService annotated class and to generate the necessary classes to make it a Web service
  • 63. WsImport  : Tool to import a WSDL and to generate an SEI (a javax.jws.WebService ) interface that can be either implemented on the server to build a webservice, or can be used on the client to invoke the web service
  • 64.
  • 65. 1. Code the implementation class.
  • 66. 2. Compile the implementation class.
  • 67. 3. Use wsgen to generate the artifacts required to deploy the service.
  • 68. 4. Package the files into a WAR file.
  • 69. 5. Deploy the WAR file. The web service artifacts (which are used to communicate with clients) are generated by the Application Server during deployment.
  • 70. 6. Code the client class.
  • 71. 7. Use wsimport to generate and compile the web service artifacts needed to connect to the service.
  • 72. 8. Compile the client class.
  • 73. 9. Run the client.
  • 74.
  • 75. The implementing class may explicitly reference an SEI through the endpointInterface element of the @WebService annotation, but is not required to do so. If no endpointInterface is specified in @WebService , an SEI is implicitly defined for the implementing class.
  • 76. The business methods of the implementing class must be public , and must NOT be declared static or final .
  • 77. Business methods that are exposed to web service clients must be annotated with javax.jws.WebMethod .
  • 78. Business methods that are exposed to web service clients must have JAXB-compatible parameters and return types.
  • 79. The implementing class must NOT be declared final and must NOT be abstract .
  • 80. The implementing class must have a default public constructor .
  • 81. The implementing class must NOT define the finalize() method.
  • 82. The implementing class may use the javax.annotation.PostConstruct or javax.annotation.PreDestroy annotations on its methods for life cycle event callbacks.
  • 83. Example package helloservice.endpoint; import javax.jws.WebService; @WebService public class Hello { private String message = new String(&quot;Hello, &quot;); public void Hello() {} @WebMethod public String sayHello(String name) { return message + name + &quot;.&quot;; } }
  • 84.
  • 85.
  • 86. Example public class HelloClient { @WebServiceRef(wsdlLocation=&quot;http://localhost:8080/helloservice/hello?wsdl&quot;) static HelloService service; public static void main(String[] args) { try { HelloClient client = new HelloClient(); client.doTest(args); } catch(Exception e) { e.printStackTrace();}} public void doTest(String[] args) { try { System.out.println(&quot;Retrieving the port from the following service: &quot; + service); Hello port = service.getHelloPort(); System.out.println(&quot;Invoking the sayHello operation on the port.&quot;); String name; if (args.length > 0) { name = args[0]; } else { name = &quot;No Name&quot;; } String response = port.sayHello(name); System.out.println(response); } catch(Exception e) { e.printStackTrace();}}}
  • 87.
  • 88. use XML messages for communications between Web services and Web services clients
  • 89. invoking services at the XML message level is provided by the Dispatch client API
  • 90. The Dispatch client can send data in either MESSAGE or PAYLOAD mode
  • 91.
  • 92. JAXB objects  : JAXB objects can only be used with SOAP or HTTP bindings
  • 93. javax.xml.soap.SOAPMessage  : You can only use SOAPMessage objects with SOAP
  • 94.
  • 95. Asynchronous  : requests and responses using the invokeAsync method with a callback or polling object
  • 96.
  • 97. extend the java.lang.reflect.Proxy