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
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
= = = = = = = = = = = = = =
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
= = = = = = = = = = = = = = = = = = = =
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
= = = = = = = = = = = = =
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
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)
= = = = = = = = = = = = = = = = = = = .
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
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
= = = = = = = = = = = = = = = = = = = =
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. ..
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. .....
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
Post a Comment