SlideShare a Scribd company logo
1 of 41
Web services
SOA-Service Oriented Architecture
SOA expands to Service Oriented Architecture, is a
software model designed for achieving
communication among distributed application
components, irrespective of the differences in terms
of technology, platform, etc.,
contd
Service-Oriented Architecture (SOA) is a design approach and architectural style
used in software development to create flexible and scalable systems by organizing
software components (services) into loosely coupled, reusable, and interoperable
units. These services can be thought of as self-contained, modular units that
provide specific functionality and can communicate with each other over a
network.
Key concepts and principles of SOA include:
• Services: These are the fundamental building blocks of an SOA. Services are self-
contained, independent units of functionality that can be accessed over a network
through standard protocols, such as HTTP, SOAP, or REST. Services are designed to
perform specific tasks or functions and can be reused in different applications.
• Loose Coupling: In SOA, services are loosely coupled, meaning they are
independent of one another and can evolve separately without affecting other
services. This allows for greater flexibility and adaptability in the system.
• Interoperability: SOA promotes the use of standardized communication protocols
and data formats to ensure that services can work together, regardless of the
technologies or platforms on which they are implemented. This facilitates
integration between heterogeneous systems.
What are Web services
Web services are a technology that enables
communication and data exchange between
different software applications over the internet or a
network. They provide a standardized way for
applications, regardless of the programming
languages, platforms, or technologies they are built
with, to interact with one another. Web services are
based on open standards and protocols, making
them highly interoperable.
Types of Web Services
There are mainly two types of web services.
• Simple Object Access Protocol (SOAP) web
services.
• Representational State Transfer(REST)
services.
SOAP
• SOAP is an acronym for Simple Object Access
Protocol.
• SOAP is a XML-based protocol for accessing web
services.
• SOAP is a W3C recommendation for communication
between applications.
• It is important for web applications to be able to
communicate over the Internet.
• The best way to communicate between applications
is over HTTP, because HTTP is supported by all
Internet browsers and servers. SOAP was created to
accomplish this.
• SOAP provides a way to communicate between
applications running on different operating systems,
with different technologies and programming
languages.
SOAP Building Blocks
A SOAP message is an ordinary XML document
containing the following elements:
• An Envelope element that identifies the XML
document as a SOAP message
• A Header element that contains header
information
• A Body element that contains call and response
information
• A Fault element containing errors and status
information
SOAP Message Format
SOAP Syntax
REST
REST is an acronym that stands for REpresentational
State Transfer. It was created by Roy Thomas Fielding,
who also created HTTP. The primary purpose of
RESTful web services is to improve the efficiency of
online services. RESTful web services attempt to
describe services by utilizing the many principles
currently existing in HTTP. REST is a design approach,
not a protocol.
contd
• The standard message exchange format is not defined. REST
services may be built using both XML and JSON. With REST,
JSON is the more prevalent format. In REST, the key
abstraction is a resource. Anything can be considered a
resource.
• The resource is available in XML, HTML, and JSON formats. A
representational resource captures the current state. When
we request a resource, we supply the resource's
representation. HTTP's most significant methods are:
• POST: This method generates a new resource.
• DELETE: This command deletes the resource.
• GET: This command reads a resource.
• PUT: It is used to update an existing resource.
status codes
• HTTP specifies the following standard status
codes as well:
• 401: UNAUTHORISED
• 500: SERVER ERROR
• 404: RESOURCE NOT FOUND
• 200: SUCCESS
• 201: CREATED
For example
• If we conduct the following steps in the social media
application, we will receive the following outcomes.
• POST /users: This method creates a user.
• GET /users/{id}: Retrieves information about a single user.
• GET /users: It retrieves all users' information.
• DELETE/users: It removes all users.
• DELETE /users/{id}: This command deletes a user.
• GET /users/{id}/posts/id post_id: It retrieves information
about a certain post.
• POST/users/{id}/ posts: This method produces a post for a
certain user.
• GET /users/{id}/post: Retrieve all posts for a certain user.
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch

More Related Content

Similar to unit -4 spring web services like SOA Arch

Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservicesGagandeep Singh
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Aravindharamanan S
 
Simple Object Access Protocol (SOAP).pptx
Simple Object Access Protocol (SOAP).pptxSimple Object Access Protocol (SOAP).pptx
Simple Object Access Protocol (SOAP).pptxShohedulIslam3
 
Web Service Testing By Sheshadri Mishra
Web Service Testing By Sheshadri MishraWeb Service Testing By Sheshadri Mishra
Web Service Testing By Sheshadri MishraSheshadri Mishra
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETPonraj
 
Web service implementation
Web service implementationWeb service implementation
Web service implementationYatindra Sahu
 
web programming
web programmingweb programming
web programmingshreeuva
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar Kumar
 
Rest based xml web services
Rest based xml web servicesRest based xml web services
Rest based xml web servicessnegacmr
 
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs
SOAP vs REST_ Which Web Service Protocol is Right for Your NeedsSOAP vs REST_ Which Web Service Protocol is Right for Your Needs
SOAP vs REST_ Which Web Service Protocol is Right for Your NeedsSigner.Digital
 
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docxSOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docxSigner.Digital
 
RESTful API by abubakar
RESTful API by abubakarRESTful API by abubakar
RESTful API by abubakarKenAndTea
 

Similar to unit -4 spring web services like SOA Arch (20)

WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservices
 
Unit 2
Unit 2Unit 2
Unit 2
 
Web services
Web servicesWeb services
Web services
 
Service view
Service viewService view
Service view
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0
 
Simple Object Access Protocol (SOAP).pptx
Simple Object Access Protocol (SOAP).pptxSimple Object Access Protocol (SOAP).pptx
Simple Object Access Protocol (SOAP).pptx
 
Web Service Testing By Sheshadri Mishra
Web Service Testing By Sheshadri MishraWeb Service Testing By Sheshadri Mishra
Web Service Testing By Sheshadri Mishra
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
Cc unit 2 updated
Cc unit 2 updatedCc unit 2 updated
Cc unit 2 updated
 
CS-802 Act-1.ppt
CS-802 Act-1.pptCS-802 Act-1.ppt
CS-802 Act-1.ppt
 
Web service implementation
Web service implementationWeb service implementation
Web service implementation
 
web programming
web programmingweb programming
web programming
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Rest based xml web services
Rest based xml web servicesRest based xml web services
Rest based xml web services
 
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs
SOAP vs REST_ Which Web Service Protocol is Right for Your NeedsSOAP vs REST_ Which Web Service Protocol is Right for Your Needs
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs
 
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docxSOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
 
RESTful API by abubakar
RESTful API by abubakarRESTful API by abubakar
RESTful API by abubakar
 
Java web services
Java web servicesJava web services
Java web services
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 

unit -4 spring web services like SOA Arch

  • 2.
  • 3. SOA-Service Oriented Architecture SOA expands to Service Oriented Architecture, is a software model designed for achieving communication among distributed application components, irrespective of the differences in terms of technology, platform, etc.,
  • 4. contd Service-Oriented Architecture (SOA) is a design approach and architectural style used in software development to create flexible and scalable systems by organizing software components (services) into loosely coupled, reusable, and interoperable units. These services can be thought of as self-contained, modular units that provide specific functionality and can communicate with each other over a network. Key concepts and principles of SOA include: • Services: These are the fundamental building blocks of an SOA. Services are self- contained, independent units of functionality that can be accessed over a network through standard protocols, such as HTTP, SOAP, or REST. Services are designed to perform specific tasks or functions and can be reused in different applications. • Loose Coupling: In SOA, services are loosely coupled, meaning they are independent of one another and can evolve separately without affecting other services. This allows for greater flexibility and adaptability in the system. • Interoperability: SOA promotes the use of standardized communication protocols and data formats to ensure that services can work together, regardless of the technologies or platforms on which they are implemented. This facilitates integration between heterogeneous systems.
  • 5.
  • 6. What are Web services Web services are a technology that enables communication and data exchange between different software applications over the internet or a network. They provide a standardized way for applications, regardless of the programming languages, platforms, or technologies they are built with, to interact with one another. Web services are based on open standards and protocols, making them highly interoperable.
  • 7.
  • 8. Types of Web Services There are mainly two types of web services. • Simple Object Access Protocol (SOAP) web services. • Representational State Transfer(REST) services.
  • 9. SOAP • SOAP is an acronym for Simple Object Access Protocol. • SOAP is a XML-based protocol for accessing web services. • SOAP is a W3C recommendation for communication between applications.
  • 10. • It is important for web applications to be able to communicate over the Internet. • The best way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. • SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
  • 11. SOAP Building Blocks A SOAP message is an ordinary XML document containing the following elements: • An Envelope element that identifies the XML document as a SOAP message • A Header element that contains header information • A Body element that contains call and response information • A Fault element containing errors and status information
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. REST REST is an acronym that stands for REpresentational State Transfer. It was created by Roy Thomas Fielding, who also created HTTP. The primary purpose of RESTful web services is to improve the efficiency of online services. RESTful web services attempt to describe services by utilizing the many principles currently existing in HTTP. REST is a design approach, not a protocol.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. contd • The standard message exchange format is not defined. REST services may be built using both XML and JSON. With REST, JSON is the more prevalent format. In REST, the key abstraction is a resource. Anything can be considered a resource. • The resource is available in XML, HTML, and JSON formats. A representational resource captures the current state. When we request a resource, we supply the resource's representation. HTTP's most significant methods are: • POST: This method generates a new resource. • DELETE: This command deletes the resource. • GET: This command reads a resource. • PUT: It is used to update an existing resource.
  • 27. status codes • HTTP specifies the following standard status codes as well: • 401: UNAUTHORISED • 500: SERVER ERROR • 404: RESOURCE NOT FOUND • 200: SUCCESS • 201: CREATED
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. For example • If we conduct the following steps in the social media application, we will receive the following outcomes. • POST /users: This method creates a user. • GET /users/{id}: Retrieves information about a single user. • GET /users: It retrieves all users' information. • DELETE/users: It removes all users. • DELETE /users/{id}: This command deletes a user. • GET /users/{id}/posts/id post_id: It retrieves information about a certain post. • POST/users/{id}/ posts: This method produces a post for a certain user. • GET /users/{id}/post: Retrieve all posts for a certain user.