Hi,
I'm having a problem sending xml-data to a soap-webservice.
When I use a Dataconnection to the service and use the regular invoke-button to submit the form everything works fine. But when I try the same with javascript it just won't work.
The reason why I can't use the Dataconnection is because the webservice requires authentication and I cannot find a way to 'embed' the user name and password into the dataconnection, the username and password for the webservice is always asked with a pop-up to the pdf-form user and we don't want that.
In attachment there are three sreenshots. xmlOnSAP_OK shows how the reaches the webservice when I use the Dataconnection, the data is ok in this case.
The xmlOnSAP_NOK shows how it reaches the webservice with javascript. The problem here is that the entire xml-data is interpreted as a flat string instead of xml-data.
The Capture.jpg shows how the data bindings for the Dataconnection look like in Designer.
Below is the script that I use to invoke the webservice:
SOAP.wireDump = false;
var vWSDLFile = "http://localhost:9090/XISOAPAdapter/MessageServlet?channel=:Z_CM_Admission:Z_CM_Admission&version=3.0&Sender.Service=Z_CM_Admission&Interface=http%3A%2F%2Fwebservice.kuleuven.be%2FToelatingStudenten%5EToelatingStudenten_OUT";
var tmpRequest = webservices.cleanXML("" + xfa.datasets.data.saveXML());
var vRequest = {ToelatingStudenten_MT: tmpRequest};
var vNamespace = "http://webservice.kuleuven.be/ToelatingStudenten";
var vAuthentication =
{
Username: "xxx",
Password: "xxx"
};
var vResponse = SOAP.request (
{
cURL: vWSDLFile ,
oRequest: vRequest,
bEncoded: false,
oAuthenticate: vAuthentication
});
Does anybody have an idea what I'm doing wrong?
Thanks in advance and kind regards.
RonnyR
Views
Replies
Total Likes