Invoking Web Services

WSURL = 'http://62.212.78.36/cgi-bin/WagAddressServerSingle.exe/wsdl/IWagAddressServerSingle';

var methods = plugins.Kydome_WebServices.getWSInfo(WSURL, null);


var methodsArray = methods.split('\n');
var noneSelected = 0;
if (methodsArray.length != 1.0)
	{
	var selectedMethod = plugins.dialogs.showSelectDialog('Available Methods','Select one of the Methods:',methodsArray);
	if ( selectedMethod == '' )
		{
		noneSelected = 1;
		}
	}

In the above code, methods is comming null.
That mean, i think, the getWSInfo() is not working properly.

Thanks,
Acer

That is exactly why I said you have to do some interpretation.

What does that method look like in the statusbar when you select it?

Method signature is as follows.

status.png

Acer:
ConversionError: The undefined value has no properties calling getWSInfo. (webServices; line 7) book_text.webServices

Means you don’t have the plugin installed at all.

The plugin works fine we use it in the same build, every day.

jaleman:
Means you don’t have the plugin installed at all.

Thanks Jan,

But, i am able to see the Kydome_WebServices plugin in the editor. also can see the methods that the plugin have.

Thanks,
Acer

Is there any wrong in the settings.

I have downloaded the file from the below location.

http://downloads.servoy.com/thirdparty/ … rvices.zip

Unzipped the file in the \Plugins Folder.

The Unzipped file contains :

  1. Axis Folder.
  2. Kydome_WebServices.jar
  3. Kydome_WebServices.jar.jnlp

Thanks,
Acer

Anyone have any suggestion regarding the Settings.

Thanks,
Acer

Please check this thread:

The url you’re using to test this seems to not be valid anymore…

Try opening it in the browser…

Paul

Hi Mohamad,

MSibai:
Please check this thread:

Web Services with Servoy - Classic Servoy - Servoy Community

In your post in the defined thread of forum.

Hi AK,

When you are talking about “Using Web Services” there are two ways to use:

  1. Servoy Consumes an External Web Service, by using the Kydome_WebServices Plug-in, see the following sample:

Code:
var pamameters = new Array();
//Should be the file path of the WSDL file
pamameters[0] = ‘/data/webservices/test/sendRequest.wsdl’;

//The Service Name as extracted from the WSDL file
//To get all services from WSDL file, use plugins.PBS_DynamicWSClient.getWSInfo(WSURL,null);
pamameters[1] = ‘sendRequest’;

//Number of Seconds to time out
pamameters[2] = 10*1000;

//First Argument to be passed to the service in pamameters[1]
pamameters[3] = forms.tasks.name;

var xx = plugins.Kydome_WebServices.DynInvokeServerside(pamameters);
plugins.dialogs.showInfoDialog( “”, xx, ‘ok’);

  1. External Systems to consume Servoy’s web service, and I really don’t know how to do so, I guess it is possible and Servoy automatically populates the WSDL files for each form including all possible functions/services.

I hope if the Servoy Gurus can help in point number 2.

Can you please explain about the PBS_DynamicWSClient Plugin?

Beacause, at my end i am able to see the Kydome_WebServices plugin but unable to find the PBS_DynamicWSClient Plugin in the navigation window of method editor.

Thanks,
Acer

In the past “PBS_DynamicWSClient” has been renamed to “Kydome_WebServices”.

Apparently, the sampelcode was not update accordingly.

Paul

Hi Acer,

based on Paul’s reply, I want to know does Kydome_WebServices plugin works for you now or still not yet ?

Thanks Paul and Mohamad,

That Wsdl Url is not working.
I have tested a different web service.
But still It is throwing a null pointer exception

WSURL = 'http:\\www.webservicex.net\CreditCard.asmx?WSDL';

var methods = plugins.Kydome_WebServices.getWSInfo(WSURL, null);

Variable methods contains null after the execution. That mean the getWSInfo() is not working properly.

Thanks,
Acer

Try to save that WSDL file in a .wsdl file in your file system.
and point the WSURL variable into that file…

and by the way, you have a problem with your URL

You are using backslashes
URL should be

Home - WebserviceX.net
Not
“http:\www.webservicex.net\CreditCard.asmx?WSDL”

MSibai:
Try to save that WSDL file in a .wsdl file in your file system.
and point the WSURL variable into that file…

Hi Mohamad,

Can you please explain on the above.

Thanks,
Acer

Open the URL in your web browser:

Choose File → Save Page As
And name it “something.wsdl” in c: for example

then put your variable WSURL = ‘c:\something.wsdl’

and give it a try

MSibai:
and by the way, you have a problem with your URL

You are using backslashes
URL should be

Home - WebserviceX.net
Not
“http:\www.webservicex.net\CreditCard.asmx?WSDL”

I have Changed the code

var WSURL = 'http:/' + '/www.webservicex.net/CreditCard.asmx?WSDL';


var methods = plugins.Kydome_WebServices.getWSInfo(WSURL, null);

plugins.dialogs.showInfoDialog("","Result : " + methods ,"Ok");

Still the variable methods contain null

Thanks,
Acer

Maybe you are facing a proxy or some other error over the net, so please check that file save option.

Something else, go to Java control panel, and make sure that network settings is configured properly.

Must be something in your network, because when I run the following code, it works as planned:

var WSURL = 'http://www.webservicex.net/CreditCard.asmx?WSDL'; 


var methods = plugins.Kydome_WebServices.getWSInfo(WSURL, null); 

plugins.dialogs.showInfoDialog("","Result : " + methods ,"Ok");

Paul