Professional Documents
Culture Documents
BO CO MN HC H PHN TN
XY DNG NG DNG JAVA WEB SERVICE TRN GRID COMPUTING
TI:
Sinh vin thc hin : Nguyn Ngc Sang 08T2 Nguyn Trng Thut 08T2 Dng Vn Sn 08T2 Nguyn nh Dng 08T2 Cn b hng dn : TS. Nguyn Tn Khi
Nng 12/2012
MC LC
CHNG I. C S L THUYT...............................................................4
I.1. Gii thiu chung..............................................................................................5 I.2. Service Oriented Architecture.........................................................................5 I.2.1. Service...................................................................................................5 I.2.2. Cc c im chnh ca service.............................................................6 I.2.3. Service Oriented Architecture................................................................6 I.2.4. Cc actor trong SOA...................................................................7 I.2.5. ch li khi s dng SOA...............................................................8 I.2.6. Thng ip (message) trong SOA.................................................8 I.3. Web Service....................................................................................................9 I.3.1. Cu trc Web service.............................................................................9 I.3.2. Simple Object Access Protocol SOAP..............................................11 I.3.3. Cc c im ca SOAP............................................................11 I.3.4. SOAP Message Structures.........................................................11 I.3.5. Web Service Description Language WSDL......................................14 I.4. Grid Service..................................................................................................15 Cc c im ca Grid service......................................................................16 I.5. Open Grid Service Architecture (OGSA)......................................................16 I.5.1. OGSA l g?.........................................................................................16 I.5.2. Open Grid Services Infrastructure........................................................18 I.5.3. Cc c tnh ca OGSI..............................................................18 I.5.4. Cc Core Service ca OGSI......................................................20 I.5.5. Data and Information Services..................................................21 I.5.6. Resource and Service Management...........................................21 I.5.7. Hin thc OGSA - Globus Toolkit 3...................................................21 I.6. Web Service Resource Framework...............................................................22 I.6.1. Tng quan v WSRF............................................................................22 I.6.2. Hin thc WSRF..................................................................................25
Bo co mn hc h phn tn
M U
Ngy nay cng ngh thng tin ng vai tr cc k quan trng v tr thnh mt phn khng th thiu trong i sng. Vic ng dng mt cch rng ri vo mi lnh vc em li hiu qu, nng sut cng vic cao. iu cng t ra cho ngnh cng ngh thng tin nhiu bi ton kh cn c gii quyt nhanh chng. V Grid Computing l mt trong nhng cng ngh gii quyt iu . N cho php tn dng nng lc x l, lu tr cng cc ti nguyn nhn ri khc cung cp mt mi trng tnh ton c nng lc x l ln, kh nng lu tr di do gii quyt cc bi ton phc tp - kh c th gii quyt c vi cc cng ngh hin hnh hoc gii quyt c nhng vi chi ph rt cao. V Globus Toolkit l b cng c gip xy dng h thng trn.
Globus Toolkit l b cng c gip xy dng cc ng dng chy trn Grid Computing. tm hiu v b cng c ny nhm chng em chn ti v Xy dng ng dng Java Web Service trn Grid Computing nghin cu v hiu thm v n. Trong qu trnh thc hin, mc d c nhiu c gng song khng trnh khi nhng thiu st, chng em rt mong nhn c s ch dn, ng gp ca qu thy c ti ca chng em ngy cng hon thin hn. ng thi, nhm chng em cng gi li cm n chn thnh n thy Nguyn Tn Khi gip chng em hon thnh ti ny. Nhm sinh vin thc hin Nguyn Trng Thut 08T2 Dng Vn Sn 08T2 Nguyn Ngc Sang 08T2 Nguyn nh Dng 08T2
CHNG I. C S L THUYT.
4
Bo co mn hc h phn tn
c kt dnh thp. Cc service trong h thng giao tip vi nhau thng qua vic gi nhn cc thng ip (message).
Bo co mn hc h phn tn
Hnh I.2.4.1.1 : SOA actors. Service Provider s ng k thng tin v service m mnh c th cung cp (cc chc nng c th cung cp, kh nng ca h thng (resource, performance), gi c dch v, ...) vo Service Registry. Service Consumer khi c nhu cu v mt service no s tm kim thng tin trn Service Registry. Ngoi chc nng h tr tm kim, Service Registry cn c th xp hng cc Service Provider da trn cc tiu ch v cht lng dch v, bu chn t cc khch hng s dng service, ... Nhng thng tin ny s h tr thm cho qu trnh tm kim ca Service Consumer. Khi xc nh c Service Provider mong mun, Service Consumer thit lp
knh giao tip trc tip vi Service Provider nhm s dng service hoc tin hnh thng lng thm (v mt gi c, resource s dng, ...)
Bo co mn hc h phn tn
Asynchronous communications: hot ng gi nhn thng ip c thc hin theo c ch Fire-and-Forget. Sender v Receiver khng cn phi ch thng ip tr li sau khi gi i mt thng ip. iu ny gip cho Sender v Receiver tip tc x l cng vic sau khi gi thng ip m khng cn dng thc thi ch thng ip tr li. Reliable communication: cc thng ip t Sender c th c gi n mt service trung gian c nhim v lu tr (store) cc thng ip. Service trung gian s gi (forward) thng ip cho Receiver khi Receiver c th x l yu cu tip theo. C ch Store-and-Forward ny m bo cc thng ip s khng b tht lc trong trng hp Receiver b qu ti v khng th nhn thm yu cu mi. Thread management: Vic trao i thng ip theo c ch bt ng b gip ng dng khng cn ngng thc thi ch mt tc v kt thc m c th to ra cc thread x l cc cng vic khc nhau. Remote communication: Cc thng ip lu tr thng tin v cc i tng d liu di dng c t hnh thc thay th vic phi serialization and deserialization cc i tng d liu truyn qua mng khi ng dng thc hin remote call mt ng dng khc. End-to-end security: Thng ip c th lu tr thng tin v security context ca knh giao tip. iu ny cung cp kh nng iu khin lin quan n security nh authentication and authorization.
Hnh I.3.1.1.1 : Web service protocol stack Tng t vi SOA, c 3 actor chnh tham gia vo Web service. Service Provider: Dng Web Services Description Language (WSDL) m t dch v m mnh c th cung cp cho Service Broker (tng t vi Service Registry trong SOA). Service Broker: Lu tr thng tin v cc service c cung cp bi cc Service Provider. Cung cp chc nng tm kim h tr Service Requester (Service Consumer trong SOA) trong vic xc nh Service Provider ph hp. Thnh phn chnh ca Service Broker l Universal Discovery, Description, and Integration (UDDI) repositories. Service Requester: Dng WSDL c t nhu cu s dng (loi service, thi gian s dng, resource cn thit, mc gi ...) v gi cho Service Broker. Bng vic s dng UDDI v chc nng tm kim ca Service Broker, Service Requester c th tm thy Service Provider thch hp. Ngay sau , gia Service Requester v Service Provider thit lp knh giao tip s dng SOAP thng lng gi c v cc yu t khc trong vic s dng service.
10
Bo co mn hc h phn tn
I.3.3. Cc c im ca SOAP
Kh nng m rng (Extensible): Cung cp kh nng m rng phc v cho nhu cu c th ca ng dng v nh cung cp. Cc chc nng v bo mt, tng tin cy c th a vo phn m rng ca SOAP. Cc nh cung cp dch v khc nhau, ty vo c im h thng ca mnh c th nh ngha thm cc chc nng m rng nhm tng thm li th cnh tranh cng nh cung cp thm tin ch cho ngi s dng. C th hot ng trn cc network protocol c chun ha (HTTP, SMTP, FTP, TCP, ...) c lp vi platform, ngn ng lp trnh hay programming model c s dng.
t yu cu trong SOAP message v thng qua network protocol gi n cho web service. Web service s nhn v phn tch yu cu sau tr v kt qu thch hp.
Hnh I.3.4.1.1 : Messaging using SOAP Hnh I.3.2.2.1 M t cu trc mt thng ip SOAP. Mt thng ip SOAP bao gm cc thnh phn sau: Protocol Header: Cho bit thng tin v cc chun giao thc c s dng. SOAP Envelop: Thng tin chnh ca message bao gm: o SOAP Header: Cha cc SOAP header. o SOAP body: Thng tin v name v data c c t di dng XML. Ngoi ra cn c trng li c dng gi cc web service exception.
12
Bo co mn hc h phn tn
Hnh I.3.4.1.2 : SOAP message structure. Sau y l v d v SOAP message, trong message request c s dng yu cu web service thc hin method int doubleAnInteger(int numberToDouble) nhm nhn i mt s nguyn. Messge request s truyn i s 123(s nguyn cn nhn i) trong phn SOAP body: Request <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/ xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doubleAnInteger xmlns:ns1="urn:MySoapServices"> <param1 xsi:type="xsd:int">123</param1> </ns1:doubleAnInteger> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Response
13
<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doubleAnIntegerResponse xmlns:ns1="urn:MySoapServices" SOAP-ENV: encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="xsd:int">246</return> </ns1:doubleAnIntegerResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Message response mang thng tin kt qu tr v trong phn body. Kt qu ca php nhn i s nguyn 123 (c truyn bi message request) l 246.
14
Bo co mn hc h phn tn
Hnh I.3.5.1.1 : Overview of WSDL Port Types: nh ngha mt web service, cc tc v m service cung cp v nh dng cc thng ip c s dng khi ng cc tc v ny. Operations: Mi operation c th c xem nh mt method hay mt li gi hm trong cc ngn ng lp trnh c in. Binding: ch nh port type, cc operation, SOAP binding stype (RPC/Document), SOAP protocol c dng. Message: Mi message tng ng vi mt operation v cha cc thng tin cn thit thc thi operation . Mi message c mt name duy nht v mt hay nhiu logical part. Cc logical part c phn bit vi nhau qua name v c th lu tr cc tham s cn cho operation. Element: c nh ngha trong Types. Mi element c mt name duy nht v kiu d liu. Element c dng c t d liu dng trong message. Element c th c t cc d liu n gin (string, integer) hay phc tp hn nh array, struct, ... XSD file: Cc element thng c nh ngha trong cc XML Schema Definition (XSD) file. XSD file c th trong cng file WSDL hoc file ring bit.
15
Cc c im ca Grid service
Transient in Nature (Lifetime, Migration): i vi mi trng grid, khi c mt yu cu c gi n, mt service s c to ra p ng yu cu . Khi service p ng xong yu cu, service s b hy. i vi web service, khi nhn c mt yu cu mi, service s to ra mt thread x l yu cu . Stateful Service: Grid service l stateful, grid service cn lu tr thng tin v mi session gia consumer v provider. So vi Web Service, Grid Service s dng Service Data nhm lu tr thng tin v trang thi hin ti ca service (state information) (kt qu cui cng hay kt qu trung gian ca cc operation, thng tin v runtime ca h thng, ...) hoc thng tin v chnh service (service metadata) (system data, cc interface c h tr, gi s dng service, ...) Grid service interface c c t thng qua GWSDL (Grid WSDL). Cung cp c ch qun l thi gian sng (lifecycle management). Grid Service cung cp c ch nh ngha cc portType m rng. Mi grid service u phi tha k t portType chun GridService. Ngoi ra, mi grid service c th tha k (extend) cc portType ca h thng cung cp sn nhm tng thm tnh nng ca service.
Bo co mn hc h phn tn
Hnh I.5.1.1.1M hnh OGSA OGSA gm 3 thnh phn chnh: Open Grid Services Infrastructure, OGSA services OGSA schemas OGSA c xy dng da trn Web services. OGSA c th c trin khai trn nhiu mi trng khc nhau, giao tip vi nhau thng qua cc giao thc (protocol). Ta s tm hiu chi tit hn cc thnh phn ny trong cc phn tip theo. Web services l cng c c s dng kh ph bin tuy nhin bn thn Web services vn cn mt s nhng hn ch nh: Khi to webservice Thi gian sng ca webservice Qun l li OGSA gii quyt cc vn trn v c hin thc lp c s hng tng (OGSI). Web services tun theo cc chun OGSI c gi l Grid Service. OGSI nh ngha cc chun ca giao tip v cc hnh vi phc v cho vic m t v tm kim dch v, khi tao instance, qun l thi gian sng, nhm service
17
18
Bo co mn hc h phn tn
OGSI a ra c ch t tn hai mc. Mi grid instance s c gn mt Grid Service Handle(GSH) v c qun l bi HandleResolver. GSH l ton cc v duy nht tn ti trong sut thi gian sng ca instance. Client th giao tip vi service instance cng nh cc service instance vi nhau thng qua Grid Service Reference(GSR). Khng ging vi GSH, GSR c to ra, thay i, hy trong sut thi gian sng ca service instance. Hnh di minh ha c ch hot ng ca naming.
Hnh I.5.3.1.1 : C ch phn gii tn Service life cycle Mt trong nhng im khc bit chnh gia grid service v Web service l Grid service c th transient(to v hy). OGSI cung cp c ch cho php cc instance khi to, hy cng nh qun l thi gian sng ca cc instance ny. Service instance c th quy nh thi gian sng bng cc phng thc sau: Khi to ban u: khi c yu cu khi to mi mt grid service, client gi km khong thi gian sng c th ca service instance. Kt thc tng minh(Explicit termination): client ch ng gi yu cu hy grid service instance. Yu cu iu chnh thi gian sng: client c th yu cu iu chnh thi gian sng ca service instance bng cch gi thng ip keepalive n server.
19
Fault type OGSI nh ngha chun cc kiu chun cho tt c cc thng ip li c tr v bi Grid service. Service groups OGSI cung cp c ch t chc service instance theo nhm. OGSI nh ngha cc interface (WSDL portTypes). Mi loi portType a ra tp cc tc v v OGSI quy nh hnh vi c th cho cc tc v ny. Bng di lit k mt s cc portType PortType GridService HandleResolver NotificationSource NotificationSubscription NotificationSink M t Cung cp cc hnh vi chnh bao gm phn d liu v qun l thi gian sng ca service. nh x t GSH sang GSR Cho php client ng k cc thng ip notification Qun l thi gian sng v cc thuc tnh ca cc subscription. nh ngha tc v cho vic phn phi cc thng ip notification n service instance. Tc v chun to grid service instance Qun l nhm cc service instance Cho php thm hoc xa Grid service ra khi ServiceGroup
Bo co mn hc h phn tn
Bo co mn hc h phn tn
Gii quyt qu nhiu vn trong cng mt bn c t. GWSDL khng theo chun ca Web service khin cc cng c c sn trong Web service khng s dng c. S nhp nhng gia Web service khng trng thi (stateless) v Web service c trng thi (stateful). WSRF trn c s nhm li cc tc v ca OGSI ng thi s dng cc chun mi hnh thnh ca kin trc Web services nh WS-Addressing, WS-Notification gii quyt cc nhc im ca OGSI. WSRF cha tt c cc chc nng ca OGSI v ci tin OGSI ba bc sau: Gii thiu khi nim WS-Resource Tch bit gia chc nng dch v v vic kch hot dch v Dch v notification theo chun WS-Notification ca Web services. WSRF nhm li cc chc nng ca OGSI thnh nm nhm chnh sau: WS-ResourceProperties: c t cc d liu ca ti nguyn, tng t nh Grid Data Elements ca OGSI, v cc c ch cho php truy cp, xa hoc thay i cc thng tin ny. WS-ResourceLifetime: c ch kt thc mt WS-Resource; cc c t v thng tin trao i gia ngi yu cu dch v v WS-Resource nhm kt thc dch v ngay lp tc hoc l mt thi im nh sn. WS-RenewableReferences: da trn chun WS-Addressing ca Web service cp nht cc thng tin mi v a ch dch v (endpoint references) khi cc thng tin hin ti tr thnh khng hp l. WS-ServiceGroup: c t giao tip cho php mt ti nguyn tham gia vo nhm; c t cc tc v cho php ly thng tin ti nguyn ca mt thnh vin ca nhm cng nh thng tin v cc nhm. Mt nhm l mt tp cc Web services v WS-Resources ca mt lnh vc c th (domain specific). WS-BaseFault: nh ngha cc kiu chun ca li v cch s dng chng trong WSDL. WSRF tch bit gia Web services (khng trng thi) v Resource (c trng thi) v nh ra mt c ch cho vic kt hp gia hai thnh phn ny li vi nhau.
23
Hnh I.6.1.1.1 a ra mt v d v hai thnh phn can bn nht ca WSRF: Web Service cung cp mt giao tip cho php truy cp vo cc ti nguyn (resources) c trng thi (cc file).
Hnh I.6.1.1.1 : Mt Web service i din cho nhiu resources, mi resource l mt file WSRF s quy nh cch thc kt hp ngi dng t xa, thng qua giao tip Web service c th truy cp vo ti nguyn yu cu. Vic kt hp ny c m t trong Hnh 12.
24
Bo co mn hc h phn tn
25
Bo co mn hc h phn tn
Build script Namespace mappings file Cc tp tin WSDL Th mc $EXAMPLES_DIR/schema/examples/ cha 1 th mc con cho mi giao din dch v khc nhau .Cc tp tin con cha cc tp tin WDSL v cc tp tin h tr XML Schema. Cc tp tin thc thi Cc lp thc thi dch org.globus.examples.services v c t trong gi :
Cc lp thc hin dch v c t trong gi : org.globus.examples.services.core.first Th mc t tt c cc tp tin ca dch v : Base package directory | |-- server-deploy.wsdd -----> Deployment descriptor file | |-- impl/ -----> Implementation classes | |-- config/ -----> Security configuration files Cc lp client c t trong : $EXAMPLES_DIR/org/globus/examples/clients/
27
28
Bo co mn hc h phn tn
<!-=========================================================== = TYPES ========================================================== ==--> <types> <xsd:schema targetNamespace="http://www.globus.org/namespaces/examples/MathService_ins tance" xmlns:tns="http://www.globus.org/namespaces/examples/MathService_instance " xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- REQUESTS AND RESPONSES --> <xsd:element name="add" type="xsd:float"/> <xsd:element name="addResponse"> <xsd:complexType/> </xsd:element> <xsd:element name="multi" type="xsd:float"/> <xsd:element name="multiResponse"> <xsd:complexType/> </xsd:element> <xsd:element name="divide" type="xsd:float"/> <xsd:element name="divideResponse"> <xsd:complexType/> </xsd:element> <xsd:element name="subtract" type="xsd:float"/> <xsd:element name="subtractResponse"> <xsd:complexType/> </xsd:element> <xsd:element name="getValueRP"> <xsd:complexType/> </xsd:element> <xsd:element name="getValueRPResponse" type="xsd:float"/> <!-- RESOURCE PROPERTIES -->
29
<xsd:element name="Value" type="xsd:float"/> <xsd:element name="LastOp" type="xsd:string"/> <xsd:element name="MathResourceProperties"> <xsd:complexType> <xsd:sequence> <xsd:element ref="tns:Value" maxOccurs="1"/> <xsd:element ref="tns:LastOp" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </types> <!-=========================================================== = MESSAGES ========================================================== ==--> <message name="AddInputMessage"> <part name="parameters" element="tns:add"/> </message> <message name="AddOutputMessage"> <part name="parameters" element="tns:addResponse"/> </message> <message name="MultiInputMessage"> <part name="parameters" element="tns:multi"/> </message> <message name="MultiOutputMessage"> <part name="parameters" element="tns:multiResponse"/> </message> <message name="DivideInputMessage"> <part name="parameters" element="tns:divide"/> </message> <message name="DivideOutputMessage"> <part name="parameters" element="tns:divideResponse"/> </message>
30
minOccurs="1" minOccurs="1"
Bo co mn hc h phn tn
<message name="SubtractInputMessage"> <part name="parameters" element="tns:subtract"/> </message> <message name="SubtractOutputMessage"> <part name="parameters" element="tns:subtractResponse"/> </message> <message name="GetValueRPInputMessage"> <part name="parameters" element="tns:getValueRP"/> </message> <message name="GetValueRPOutputMessage"> <part name="parameters" element="tns:getValueRPResponse"/> </message>
<!-=========================================================== = PORTTYPE ========================================================== ==--> <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> <operation name="add"> <input message="tns:AddInputMessage"/> <output message="tns:AddOutputMessage"/> </operation> <operation name="multi"> <input message="tns:MultiInputMessage"/> <output message="tns:MultiOutputMessage"/> </operation> <operation name="divide"> <input message="tns:DivideInputMessage"/> <output message="tns:DivideOutputMessage"/> </operation> <operation name="subtract"> <input message="tns:SubtractInputMessage"/> <output message="tns:SubtractOutputMessage"/> </operation>
31
<operation name="getValueRP"> <input message="tns:GetValueRPInputMessage"/> <output message="tns:GetValueRPOutputMessage"/> </operation> </portType> </definitions> File m t giao din dch v Web/Grip wsdl c cc thnh phn sau : Phn HEADER : y l phn nh ngha tn, ng dn v khng gian tn ca dch v Phn TYPES : phn ny nh ngha cc bin, kiu v thuc tnh ti nguyn Phn MESSAGES : phn nh ngha cc thng ip m ngi dng v dch v tng tc vi nhau Phn PORTTYPE : l phn nh ngha cc php ton m ngi dng v dch v tng tc vi nhau
32
Bo co mn hc h phn tn
public synchronized void setValue(float value) { this.value = value; } public String getLastOp() { return lastOp; } public synchronized void setLastOp(String lastOp) { this.lastOp = lastOp; } /* Remotely-accessible operations */ public synchronized AddResponse add(float a) throws RemoteException { value += a; lastOp = "ADDITION"; return new AddResponse(); } public synchronized MultiResponse multi(float a) throws RemoteException { value *= a; lastOp = "MULTIPLY"; return new MultiResponse(); } public synchronized DivideResponse divide(float a) throws RemoteException { value /= a; lastOp = "DIVIDE"; return new DivideResponse(); } public synchronized SubtractResponse RemoteException { value -= a; lastOp = "SUBTRACTION"; return new SubtractResponse(); } subtract(float a) throws
(WSDD). N cho bit dch v s c trin khai nh th no v c nh ngha trong tp deploy-server.wsdl <?xml version="1.0" encoding="UTF-8"?> <deployment name="defaultServerConfig" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <service name="examples/core/first/MathService" provider="Handler" use="literal" style="document"> <parameter name="className" value="org.globus.examples.services.core.first.impl.MathService"/> <wsdlFile>share/schema/examples/MathService_instance/Math_service.wsdl </wsdlFile> <parameter name="allowedMethods" value="*"/> <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/> <parameter name="scope" value="Application"/> <parameter name="loadOnStartup" value="true"/> </service> </deployment> Cc thnh phn nh ngha bao gm :
Service name: Xc nh a ch URI ca dch v trong Grip container http://localhost:8080/wsrf/services/examples/core/first/MathService <service name="examples/core/first/MathService" provider="Handler" use="literal" style="document"> class name : xc nh lp thc thi giao din dch v <parameter name="className" value="org.globus.examples.services.core.first.impl.Math Service"/> Tp WSDL : xc nh tp nh ngha giao din dch v wsdl <wsdlFile>share/schema/examples/MathService_instance/ Math_service.wsdl</wsdlFile>
34
Bo co mn hc h phn tn
Lin kt cc tp WSDL Khi to v bin dch cc lp t cc thnh phn trong tp wsdl Bin dch cc tp thc thi Java T ch cc tp li vi nhau trong 1 cu trc ng dn xc nh
Hnh III.5.2.1.1 : ngha ca chng trnh ant to tp GAR ./globus-build-service.sh -d org/globus/examples/services/core/first/ -s schema/examples/MathService_instance/Math.wsdl
globus-deploy-gar /usr/local/globus/dev/org_globus_examples_services_core_first.gar
35
Sau khi trin khai dch v Math Service vo Grid container, khi ng Grid container bng lnh: globus-start-container -nosec, dch v s bt u hot ng. Nhn bit dch v hot ng bng a ch URI ca dch v:
http://192.168.1.10:8080/wsrf/services/examples/core/first/MathService
36
Bo co mn hc h phn tn
java -classpath ./build/stubs/classes/:$CLASSPATH org/globus/examples/clients/MathService_instance/Client b3 : Dan ng dn sau vo chng trnh client http://192.168.1.10:8080/wsrf/services/examples/core/first/MathService
Kt qu chy trn Debian
37
38
Bo co mn hc h phn tn
V.2. Nhng vn tn ti
Cha th t vit c mt chng trnh web service chy trn mi trng
globus toolkit.
Cc cng c h tr xy vit chng trnh trn globus cn t.
40
Bo co mn hc h phn tn
[1] Ti liu Globus Toolkit - TS. Nguyn Tn Khi. [2] http://www.toantin.org/forums/index.php/topic/1367-l%E1%BA%ADp-trinhtren-globus-toolkit/ [3] http://www.globus.org/faq.php#windows [4] http://www.wikipedia.org [5] http://wwwunix.globus.org/toolkit/docs/3.2/installation/install_config_req.html [6] http://www.ibm.com/developerworks/forums/thread.jspa? messageID=13857777 [7] Cc ngun ti liu khc.
41