Hi everybody
i'm trying to use a WebService in my xdp but I have found some problems with that. I have to try two ways.
first of them works fine. I have created a data connection and if I draw and drop the parameters and the button, it works fine. But I don't want to do it in this way.
In the another way I have done, i have created two fields, one of them with this code in exit event
var myProxy = SOAP.connect("http://host/AxisWSTest/services/Converter?wsdl");
var result = myProxy.prueba("test message");
xfa.host.messageBox("" + result);
subformulario.CampoTexto2.rawValue = result;
Prueba method should to send this message "Ha enviado el texto test message" but it sends "null" instead of "test message"
With the first way, it works fine and I receive the right message "Ha enviado el texto test message"
What do I do wrong? any idea for that? Any suggestion is very appreciatted
Thanks in advance.
Dani
var valor = this.rawValue;
var echoStringRequest = {
prueba:{value:valor}
};
var mySOAPAction = "http://host/AxisWSTest/services/Converter?wsdl";
var response = SOAP.request ({
cURL: "http://host/AxisWSTest/services/Converter?wsdl",
oRequest: echoStringRequest,
cAction: mySOAPAction
});
And the WS receive the value correctly. Would it be the right way? Is there another better solution?
With that new code, i have a new problem. How can I get the response?
I have tried with this
var responseString = "http://host/AxisWSTest/services/Converter?wsdl:prueba";
var result = response[responseString]["return"];
subformulario.CampoTexto2.rawValue = result;
but I have this error
TypeError: response[responseString] has no properties
28:XFA:Formulario1[0]:subformulario[0]:CampoTexto1[0]:exit
Any idea?