Показ дописів із міткою services. Показати всі дописи
Показ дописів із міткою services. Показати всі дописи

четвер, 28 січня 2016 р.

How to test SOAP service in Eclipse by Webservice Explorer

1. create soap service
2. run on server the project
3.copy the wsdl
4. go to Run/Launch Webservice Explorer

How to test SOAP service

1. click soap service
2. create war file and deploy to Tomcat
3. test by SoapUI
create project and input wsdl file
message should be sent for testing soap service. For testing rest service URI should be send

Create SOAP web services in java(JAX-WS) using Apache CXF

1. create Dynamic web project
2. create interface ICalculator

HTTP Status Codes

Sr. No.HTTP CodeDescription
1200OK, shows success.
2201CREATED, when a resource is successful created using POST or PUT request. Return link to newly created resource using location header.
3204NO CONTENT, when response body is empty for example, a DELETE request.
4304NOT MODIFIED, used to reduce network bandwidth usage in case of conditional GET requests. Response body should be empty. Headers should have date, location etc.
5400BAD REQUEST, states that invalid input is provided e.g. validation error, missing data.
6401UNAUTHORIZED, states that user is using invalid or wrong authentication token.
7403FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights.
8404NOT FOUND, states that method is not available.
9409CONFLICT, states conflict situation while executing the method for example, adding duplicate entry.
10500INTERNAL SERVER ERROR, states that server has thrown some exception while executing the method.

How to test REST service

1. create service
2. deploy it on Tomcat or run locally in Eclipse "Run on server"
3. test by SoapUI
   add REST project in SoapUI

пʼятниця, 22 січня 2016 р.

Create RESTful web services in java(JAX-RS) using Apache CXF

Java API for RESTful Web Services (JAX-RS), is a set if APIs to developer REST service. JAX-RS is part of the Java EE6
Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS
In this article we will build a service and deploy it on Tomcat

четвер, 21 січня 2016 р.

About REST and SOAP services

1. Web services is a technology for transmitting data over the Internet and allowing programmatic access to that data using standard Internet protocols, typically HyperText Transfer Protocol (HTTP).
2. You can think of an individual Web service as a piece of software that performs a specific task (also known as a function), and makes that task available by exposing a set of operations that can be performed (known asmethods or Web methods) with the task. Additionally, each of the methods exposes a set of variables that can accept data passed into the method. These variables are known as parameters or properties. Together, the properties and methods refer to a Web service's interface.
3. Web services provide an application integration technology that can be successfully used over the Internet. 
4. based Web applications that interact with other web applications for the purpose of exchanging data. Web Services can convert your existing applications into Web-applications.
5. A web service takes the help of WSDL to describe the availability of service. It provides a definition of how the Web service works, so that when you create a reference to it
6. WSDL is an XML-based language for describing web services and how to access them.
7. SOAP is an XML-based protocol for exchanging information between computers.
8. Simple Object Access Protocol (SOAP) and REpresentational State Transfer (REST) are two answers to the same question: how to access Web services. 
9. Web services are client and server applications that communicate over the World Wide Web’s (WWW) HyperText Transfer Protocol (HTTP)


Rest:
1. RESTful web services are based on HTTP protocol and its methods PUT, GET, POST, and DELETE. These web services are better integrated with HTTP than SOAP-based services are, and as such do not require XML SOAP messages or WSDL service definitions


понеділок, 16 листопада 2015 р.

Step by Step tutorial to create a REST/SOAP service/client using Apache CXF

http://blog.sortedset.com/step-by-step-web-services-with-tomcat-tomee-apache-cxf-eclipse/
http://www.asjava.com/web-services/web-services-hello-world-example-with-cxf/
https://www.youtube.com/watch?v=Vt97IU7xNJs
http://www.javacodegeeks.com/2013/06/developing-soap-web-service-using-apache-cxf.html
http://www.javatips.net/blog/2012/02/cxf-restful-tutorial
http://www.javatips.net/blog/2012/02/cxf-restful-client
http://www.javatips.net/blog/2012/04/expose-cxf-service-with-rest-and-soap
http://www.javatips.net/blog/2011/09/create-cxf-client
https://angelozerr.wordpress.com/2011/08/24/jaxwscxf_step2/#WSHelloServiceImpl
APACHE CXF RESTFUL WEB SERVICE EXAMPLE
http://www.simplecodestuffs.com/create-and-deploy-web-service-and-web-service-client-in-eclipse/
http://www.javacodegeeks.com/2013/06/developing-soap-web-service-using-apache-cxf.html
https://www.ibm.com/developerworks/ru/library/ws-soapvalid/
http://www.benchresources.net/apache-cxf-jax-rs-restful-web-service-integrating-with-spring-hibernate/
http://www.tutorialspoint.com/restful/restful_quick_guide.htm
https://mjtoolbox.wordpress.com/2014/03/30/building-restful-webserviceclient-using-wildfly-8-0-0-final-resteasy-and-maven-deployment/
http://www.dineshonjava.com/2013/06/restful-web-services-with-jersey-jax-rs.html#.VqpAxPl96Uk
http://blog.sortedset.com/step-by-step-web-services-with-tomcat-tomee-apache-cxf-eclipse/

How to check what services are in run and kill proces in Windows using console.

1. c:\> cd c:\windows\system32
2. C:\WINDOWS\system32>netstat -o -n -a | findstr 8080

  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       4184

3. C:\WINDOWS\system32> taskkill /F /PID 4184

SUCCESS: Sent termination signal to the process with PID 4184.

вівторок, 14 квітня 2015 р.

Webservice


  1. webservice response for the web request
  2. it's a framework for conversation between two computers: client send request and server receive that request and return response. When the browser made request for web page it receive html
  3. service always handled by http but the format of receive is differ
  4. Elements of Web Service API (Application Programming Interface): message format: SOAP, XML, JSON and request syntax: named methods, Uniform Resources Identifier (URI), parameter names and data types; requesting an action (HTTP verbs: POST, GET, PUT, PATCH, DELETE); security (what do we need for authenticatin: username and password); when the data is return from webservice - in what form it should be: receiving the data (SOAP, XML, JSON; metadata - describes data structure, including field/property namse and data types)