Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Protocol
SOAP hace uso de la capa de aplicacin del modelo TPC/IP como protocolo de
transporte, por ende, SOAP es capaz de funcionar sobre cualquier protocolo de
Internet, aunque el ms popular es HTTP(S), y tambin el SMTP (invocacin de
procesos de forma asncrona ).
Definici
n
Definici
n
Definici
n
Estructura de un mensaje SOAP
El encabezado es opcional, proporciona un
mecanismo de control para el envo de
directrices o informacin contextual sobre el
procesamiento del mensaje
REST
Protocolos de HTTP para hacer aplicaciones
Peticiones de bajo nivel
Bastante bsico
JSON-RPC
Comunicacin bidireccional
El orden de respuesta puede no ser el mismo que el orden de llegada
CORBA Vs SOAP
SOAP el programador debe crear los mensajes (bajo nivel) en CORBA son
llamadas a objetos
struct EchoData {
long aLong;
boolean aBool;
string aString;
};
EchoData getData( in long l, in boolean b, in string s );
CORBA Vs SOAP
URL url = new URL("http://localhost:8080/apache-soap/servlet/rpcrouter");
Call call = new Call();
call.setTargetObjectURI("urn:Hello");
call.setMethodName("sayHelloTo");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter("name", String.class, "Mark", null));
call.setParams(params);
Response resp = null;
try {
resp = call.invoke(url, "");
if ( !resp.generatedFault() ) {
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value);
}
else {
Fault fault = resp.getFault();
System.err.println("Generated fault!");
}
}
catch (Exception e) {
}
CORBA Vs SOAP
try {
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);
org.omg.CORBA.Object rootObj = orb.resolve_initial_references("NameService");
NamingContextExt root = NamingContextExtHelper.narrow(rootObj);
org.omg.CORBA.Object object = root.resolve(root.to_name("AcmeMyService"));
MyService myService = MyServiceHelper.narrow(object);
int ret = myService.sayHelloTo("Mark");
} catch (MyServiceException e) {
System.err.println("Generated fault!");
} catch (Exception e) {
e.printStackTrace();
}
Pruebas
Lenguaje Python
CORBA omniORB
SOAP ZSI
XML-RPC XMLRPClib