0% found this document useful (0 votes)
12 views

Proxies and Skeltons

Uploaded by

Jei Raghav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Proxies and Skeltons

Uploaded by

Jei Raghav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

| SOA 22 December 2015 | 5:38:10 PM |

PROXY AND SKELTON

PROXY

 Reference to the remote object (server object)

 Visible only to client side

 Send the client request to server

 Looks like a class file but contains no application code

 It runs only on client machine

 It forward a client remote calling to skeletons, which forward them on to the suitable server
objects

SKELETON

 Skeletons return the results of server method invocation to client via stubs

 Responsible for sending the server response to client

 Visible only to server side

PROXY TYPES

1. Stub Proxy (Client Proxy)

2. Skeleton Proxy (Server Proxy)

1. Stub Proxy

 It is a client side proxy

 The purpose of the stub is to convert the java code into network oriented stream (Marshaling)

2. Skeleton Proxy

 It is a server side proxy

1
| SOA 22 December 2015 | 5:38:10 PM |

Purpose:

 Converting the network oriented stream into java program (Demarshaling)

STUB vs SKELETON IN DISTRIBUTE APPLICATIONS

Client Execute Server


Call
Method
Method
Client Server
Application Application

Stub Proxy Skeleton Proxy

Network

Create, Locate, Delete, Invoke

2
| SOA 22 December 2015 | 5:38:10 PM |

GENERATING PROXIES AND STUBS FROM SERVICE CONTRACTS

Advantages of Service Contracts

 Service contract is a tool that is used to generate service proxies and service skeletons
based on the WSDL

 Service proxies are programming language used to define the new services

 Service skeletons are programming language classes that give the framework for
implementing new services

GENERATING JAVA CLASSES FROM SERVICE CONTRACTS

1. Java Service Proxy Class

(calc.java)

interface calc extends java.rmi.Remote


{
int add(int x, int y);
int mul(int a, int b);
}

 The code calc.java is a java service proxy class that models the CalcService and gives
methods that model the operations of the CalcService
2. Java Service Skeleton Class

(calcImp.java)
public class calcImp
{
public int add(int x, int y)
{
return(x+y);
3
| SOA 22 December 2015 | 5:38:10 PM |

}
public int mul(int x, int y)
{
return(x*y);
}
}

calcImp.java
 It gives the framework for implementing the CalcService

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy