Expand my Community achievements bar.

SOAP Javascript request

Avatar

Former Community Member
Hi



Struggling with a SOAP service which we cant get to work. I'm not so sure that anyone here can help me out since it is some special circumstances, but it's always worth a try. Some background first:



We need to have secure communication with the web service, so no direct communication with the wsdl from Internet. Yet, the pdf form should be able to talk to the webservice at any time. Our first intention was to do this by running server side javascript, which obviously isnt possible since SOAP isnt supported server side. Then, we were trying to run it client-side with a call to our form server environment and catching the SOAP call there. But, then we realized that the SOAP.address gets the one that is inside the wsdl, which isnt possible since we want to tunnel it through our server to get secure communication. So, we cant use service = SOAP.connect and later service.getData() (fictional name) although that worked like a charm if we didnt have the security issues. With SOAP.connect and service.getData() as described above, everything worked just fine except for the fact that it would require an open connection through the firewall.



Now, we are stuck with trying something else. What I am trying for the moment is a SOAP.request but for some reason, it wont work and Im getting pretty frustrated. I really cant tell whats wrong although Ive been trying various different things. Following your javascript manuals doesnt help much, no working result at all. And maybe the strangest thing has been the log that has been telling me that the call to our server has always been lacking the service call and parameters no matter how much Ive been inserting them as the manual tells me to do.



Is there anybody with knowledge about the subject that can share that with me and tell me how to really make it work? The code below is just one of many examples that Ive tried, so I dont expect it to be correct for the moment in any way you know, after a couple of hours of frustration you get pretty delirious and hardly separates sunshine from rain anymore so if you can tell me what is supposed to work I would be very grateful.



var datum = new Date();

var data = SOAP.request({cURL: "http://computername:9991/BoU/path/wsdl", oRequest:{"http://computername:9991/BoU/path/:GetData":{"Date":datum}}});
0 Replies