call web service from server side javascript.

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

call web service from server side javascript.

#1

Postby xren » Fri Sep 26, 2014 2:42 pm

Hi,

I would like to know if there is any sample code to call a web service from server side javascript: send soap and receive xml, then pass xml to get response.

Thanks,
Xiaoli
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Sep 29, 2014 12:16 pm

Xiaoli,

I'm not too sure what you're asking here. You can call a web service from the server using a Web Service Resource, the response will be an XML document, and you can use the resource to retrieve the parts of the response you need. You can only use a Web Services Resource to call a web service with a published WSDL and this doesn't include restful web services.

There's an example here http://forum.ebasetech.com/forum/viewtopic.php?t=523 of calling a restful web service from the server.

Regards
Jon
Last edited by Jon on Tue Sep 30, 2014 6:42 am, edited 1 time in total.
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Mon Sep 29, 2014 6:15 pm

I have created a web service resource:
and imported the wsdl.
The problem is that the request for default adapter generated missing something important:
<met>

What I need is <met>

I am not sure how to change the wsdl (or the xsd) to make this happen).

Thanks,
Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#4

Postby Steve » Tue Sep 30, 2014 8:22 am

Hi Xiaoli,

Could you send me the WSDL you are trying to import and I will take a look. If wsdl is a link, could you load this in a browser and save the WSDL and all the associated XSDs and package together.

Can you attach the file(s) and send to support@ebasetech.com and I will take a look.

Kind regards

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#5

Postby xren » Tue Sep 30, 2014 2:51 pm

Hi Steve,

I send you the wsdl and the xsd files.

Thank you,
Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#6

Postby Steve » Wed Oct 01, 2014 7:30 am

I have not received anything yet. Have you sent it?

Kinds regards

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#7

Postby Steve » Thu Oct 02, 2014 10:07 am

Hi Xiaoli,

I am really struggling with the WSDL and XSD you gave sent me. I cannot appear to get them to import at all. Were you successful trying to import these without errors?
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#8

Postby xren » Thu Oct 02, 2014 12:57 pm

I had some error before. But I did import them successfully later.
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#9

Postby Steve » Thu Oct 02, 2014 4:17 pm

Do you have a URL to the WSDL I can try?

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#10

Postby xren » Fri Oct 03, 2014 1:40 pm

The URL doesn't work. I use is

file:///c:/your path to the wsdl.
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#11

Postby Steve » Fri Oct 03, 2014 1:59 pm

Hi Xiaoli,

I could not get those files to import. I got various errors.

You have mentioned in your previous post that you successfully imported the files.

Could you send me the files you successfully imported?

Kind regards

Steve
0 x


Who is online

Users browsing this forum: No registered users and 7 guests