Hola a todos...
Tengo inconvenientes para consumir un WebService, actualmente estoy usando AXIS y no logro generar el XML que necesita el WebService...
Así deberia quedar el XML listo para ser enviado al WebService:
Código XML:
Ver original<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<soapenv:Body>
<doPayment xmlns='Direccion del WebService/'>
<paymentRequest xmlns=''>
<arg1>10</arg1>
<arg2>1</arg2>
<arg3>true</arg3>
<arg4>1111</arg4>
</paymentRequest>
</doPayment>
</soapenv:Body>
</soapenv:Envelope>
Así me esta quedando el XML generado por el Cliente AXIS
Código XML:
Ver original<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<doPayment soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
// AQUI DEBO GENERAR OTRO NODO llamado <paymentRequest> y no se como generarlo
<arg1>10</arg1>
<arg2>1</arg2>
<arg3>true</arg3>
<arg4>1111</arg4>
// AQUI DEBERIA TERMINAR EL NODO </paymentRequest>
</doPayment>
</soapenv:Body>
</soapenv:Envelope>
Código Java:
Ver originaltry {
String endpoint
= "http://127.0.0.1/"; // WebService Service serv = new Service();
Call req = (Call) serv.createCall();
req.setProperty(req.SEND_TYPE_ATTR,false);
req.
setTargetEndpointAddress(new java.
net.
URL(endpoint
)); req.setOperationName("doPayment");
req.addParameter("arg1",XMLType.XSD_STRING, ParameterMode.IN);
req.addParameter("arg2",XMLType.XSD_STRING, ParameterMode.IN);
req.addParameter("arg3",XMLType.XSD_STRING, ParameterMode.IN);
req.addParameter("arg4",XMLType.XSD_STRING, ParameterMode.IN);
req.setReturnType(org.apache.axis.Constants.XSD_STRING);
/* LLAMADA */
System.
out.
println("DEMONIOS ME ESTOY VOLVIENDO LOCO"); System.
err.
println(e.
toString()); }
En
AXIS realmente hay tanta info pero en ninguna he visto que dentro de una Operacion alla otro nodo y que contengan parametros, realmente no se si soy yo que tome una mala decision en usar
AXIS ó los que desarrollaron el WebService no lo hicieron siguiendo los Estandares...
PD: Realmente desconozco el tema, si me pueden orientar les estaria agradecido, pero realmente lo que necesito es agregar el NODO <paymentRequest> y terminar con este proyecto que me tiene
|@#~€|#~¬~€€¬
Gracias
Saludos...