Work with server by XMLRPC – library in Java For students Author: Dudnik Oxana.

Презентация:



Advertisements
Похожие презентации
Java Collections Framework (JCF) in Java Tutorial for students of universities Author: Oxana Dudnik.
Advertisements

Work with databases in Java. JDBC Tutorial for students of universities Author: Dudnik Oxana.
Hibernate&EJB3 Studybook For students of university Author Sr.Java developer Dudnik Oxana.
Java Server Pages(JSP). JavaServer Pages (JSP) позволяют вам отделить динамическую часть ваших страниц от статического HTML. Вы, как обычно, пишете обычный.
Copyright 2003 CCNA 4 Chapter 11 Scaling IP Addresses By Your Name.
WEB SERVICES Mr. P. VASANTH SENA. W EB SERVICES The world before Situation Problems Solutions Motiv. for Web Services Probs. with Curr. sols. Web Services.
English… Today English becomes an integral part of peoples life. This is Global language.
2005 Pearson Education, Inc. All rights reserved. 1 Object-Oriented Programming: Interface.
Saint Petersburg, 2011 Java Lecture Generics. Quiz ArrayList lst = new ArrayList(); Collection c = lst; lst.add("one"); lst.add(two"); lst.add(three");
Eclipse Web Tools Platform Project © 2005 IBM Corporation Developing Web Services with Eclipse – Programming Examples Arthur Ryman IBM Rational
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Building a Simple Serial Network Understanding the OSI Model.
© 2006 Cisco Systems, Inc. All rights reserved.ONT v Implement the DiffServ QoS Model Implementing QoS Preclassify.
CSTA is a kind of standard communication protocol used between PBX and computer that is famous in Europe. What is CSTA ? Control Requests Event Notifications.
1 © Luxoft Training 2012 Inner and anonymous classes.
Inner Classes. 2 Simple Uses of Inner Classes Inner classes are classes defined within other classes The class that includes the inner class is called.
Исключения в Java Макаревич Л. Г.. Исключения – это механизм взаимодействия между кодом, приведшим к ошибке, и кодом, обрабатывающим ошибку Исключение.
Why do students use the Internet? by Nickolay Dolgun.
Work with database Oracle in Java Author: Dudnik Oxana.
© 2006 Avaya Inc. All rights reserved. ATA01225IEN IP Office Technical Implementation Workshop Course Impression and Objectives ATA01225IEN IP Office Technical.
MSC.Patran 2005 R2 Support of ABAQUS ODB Results on HPIPF January, 2004.
Транксрипт:

Work with server by XMLRPC – library in Java For students Author: Dudnik Oxana

XML-RPC (сокр. от англ. Extensible Markup Language Remote Procedure Call XML- вызов удалённых процедур) стандарт/протокол вызова удалённых процедур, использующий XML для кодирования своих сообщений и HTTP в качестве транспортного механизма.англ.протокол вызова удалённых процедурXMLHTTP XML-RPC, как и любой другой интерфейс Remote Procedure Call (RPC), определяет набор стандартных типов данных и команд, которые программист может использовать для доступа к функциональности другой программы, находящейся на другом компьютере в сети. компьютере сети

XML-RPC is a remote procedure callremote procedure call (RPC) protocol (Удалённый вызов процедур с сервера)protocol which uses XML to encode its calls and HTTP as a transport mechanism.XML HTTP "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol. Протокол XML-RPC был изначально разработан Дэйвом Винером из компании «UserLand Software» в сотрудничестве с Майкрософт, в 1998 году. Майкрософт 1998 году

XML-RPC Client Let us write an XML-RPC client. We use for this library by Vjekoslav Nesek : import com.nmote.xr.XR; import ua.com.bpgroup.model.Terminal; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Vector;

public class WorkWithServer { private String URLstring; public static ServerMethods serverMethods; public ArrayList result; public WorkWithServer(String url, Vector params) throws Throwable { this.URLstring = url + "server/server.php"; ServerMethods serverMethods = XR.proxy(new URI(this.URLstring), ServerMethods.class); result = serverMethods.calcQuery ( (String) params.get(0), (String) params.get(1) ); } }

import java.util.ArrayList; import com.nmote.xr.XRMethod; public interface ServerMethods { //this is method which implemented on public ArrayList calcQuery ( Object id_terminal, Object login ); }

Usage : private Object[] serverResponse; Vector param = new Vector(); param.addElement(1); param.addElement(userLogin); WorkWithServer workWithServer=new WorkWithServer(URL = " param); if(workWithServer.result!=null) { i = 0; serverResponse = new String[workWithServer.result.size()]; while (i < workWithServer.result.size()) { serverResponse[i] = workWithServer.result.get(i); i++; } }else{ serverResponse = null; }

XML-RPC uses the HTTP protocol to pass information from a client computer to a server computer.