Skip to main content

What are the basic that we should have aware on it before developing Jax-Rpc api based webservices ?

What are the basic that we should have aware on it before developing Jax-Rpc api based webservices ?📡
Normally there r 2 type of webservices
1.jax-rpc
2.jax-ws
Here I am disussing about only jax-rpc based webservices where we always develop provider. ...
Pre requisite for developing Jax-Rpc based webservices :-:-:-:-:-:-:-:-:-
@Type of approaches:-
= = = = = = = = = = = = = =
1 . Contact First approach
2 . Contract Last approach
👉Fst we have to discuss above 2 approach
Contract First and Contract Last:-
= = = = = = = = = = = = = = = = = = = =
Always webservices means we have to consider 2 actor I.e Consumer and provider .There is a middle person who always stay as a contract between consumer and provider which is called as WSDL.....
👉So if you Fst develop WSDL before developing provider it is called as Contract first. .
👉If you develop fst provider then u develop WSDL it is called as Contract Last approach
@Type of endpoint :-
= = = = = = = = = = = = =
1 . servlet endpoint
2 . Ejb endpoint
👉Fst we have to know what is endpoint here ?very simple
So in between consumer and provider without provider there is no meaning of develope consumer . coz consumer always consume/require data. .when can he get data ? If someone provide then only he consume na so ultimately we can say provider is endpoint here. And consumer always depends on provider
Now consumer send Http-request to provider(endpoint) but provider don't understand http formated request so there is also one third person in between consumer and provider for understanding request and delivery it to provider which is called as Http processor and that processor may be servlet or Ejb endpoint. .
👉Which one we use and why ?
Max case as per industry standard always servlet endpoint is preferable coz it's cost nd mentainance is too less and it is open source and by using this we can easily achive interprorable nature means eventhough both consumer and provider are developed in different languages we can make communication between them
But in case of Ejb the fst problem is to deploy a simple webservices operate request we have to by Ejb container and installation charge is also expensive. And one more reason is Ejb developer is countable means in industry there r less no of developer who know the use of Ejb technology which is very very rare.
@Message Exchanging Pattern :-MEP
= = = = = = = = = = = = = = = = = = = .
1.Synchronous Request/reply
2 .Asynchronous Req/reply (dealay response)
3.one-way-invoke (Fire and Forgot)
Now we have to understand what is Message exchanging pattern?
MEP indicate how consumer and provider communicate with each other
👉1.Synchronous Req/reply
Means consumer send the request to provider until provider gives any response to consumer it can't do any business operation. Here both r tightly coupled with each other
👉2.Asynchronous req/reply
Means here consumer send request to provider but he never wait to response. Even though response will not come instantly by provider it will not stop performing his business operation
👉3.one-way invoke
One way invoke it's name indicate about the functionality means way of communication should be in one way. Consumer never bother abt response.
Note:-
1.In jax-rpc asynchronous request /replay is not supported rest r supported
2.in jax-ws all are supported
@Message Exchanging Format :-MEF
= = = = = = = = = = = = = = = = = = = =
1.rpc-encoded
2.rpc-literal
3.Document literal
Message exchanging format talks about which type of msg format they use to communicate with each other ...
Always consumer send request to provider to get business functionality so. If provider get proper data then only he give business functionality to consumer na. .
👉Ex:-
Means u go to one book shop when ever u nt specifiy which book u want to buy. .. saler will know and. How he will give book to u. .similar case in above. ..
So in webservices case to avoid this type of data misinterpreted. Always provider mention in WSDL documents. That I have so on so data if you require this data then give me proper input then only I am able to understand what you want. Which is completely documented in WSDL documentation by developer. .
So normally in jax-rpc the defult message format is rpc-encoded....
But in jax-ws Document - literal is default message format. .....
These all r the basic we need to know when we develop provider by using jax-rpc based webservices😃😃😃😃😃

Comments

Popular posts from this blog

Mockito interview Questions

1.       Question 1. What Is Mockito? Answer : Mockito allows creation of mock object for the purpose of Test Driven Development and Behavior Driven development. Unlike creating actual object, Mockito allows creation of fake object (external dependencies) which allows it to give consistent results to a given invocation. 2.       Question 2. Why Do We Need Mockito? What Are The Advantages? Answer : Mockito differentiates itself from the other testing framework by removing the expectation beforehand. So, by doing this, it reduces the coupling. Most of the testing framework works on the "expect-run-verify". Mockito allows it to make it "run-verify" framework. Mockito also provides annotation which allows to reduce the boilerplate code. 3.       Question 3. Can You Explain A Mockito Framework? Answer : In Mockito, you always check a particular class. The dependency in that class is injected using m...

JAVA Expert Interview Questions Answers 2017

Java Basics ::  Interview Questions and Answers Home  »  Interview Questions  »  Technical Interview  »  Java Basics  » Interview Questions 1.     What is the difference between a constructor and a method? A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator. A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator. 2.     What is the purpose of garbage collection in Java, and when is it used? The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used. 3.  ...

Java Example Program to Convert List to Set

import java.util.ArrayList; import java.util.HashSet; import java.util.Set; public class ListToSet {  /**   * @author Amarjit Kumar   * @category interview questions   *   * Description: Convert List to set in java with example program   *   */  public static void main(String[] args) {   ArrayList<String> arrList= new ArrayList<>();   arrList.add("Java");   arrList.add("Java");   arrList.add("List to String");   arrList.add("Example Program");   Set<String> strSet = new HashSet<String>(arrList);   System.out.println(strSet);   System.out.println(arrList);  } } /*  * Java program to convert list to set. Convert ArrayList of string to HashSet  * in java example program How to convert List to Set in java Set<String> strSet  * = new HashSet<String>(arrList); HashSet having a constructor which will take  * list as an ar...