Forums / Extensions / ggwebservices - call to external server from template
Anaya P
Wednesday 15 December 2010 10:23:18 am
Hi there,
I have installed ggwebservices extension to consume external webservice in Exponential 4.3.
In debugger section, how can I check that I am able to connect to external server and get the methods of web service?Under Remote Servers section (in left column), remote server name is grayed out, it is not a link.
Below are the settings I have for remote server in wsproviders.ini.append.php
[trx] providerType=PhpSOAP providerUri=https://services.resx.com/xapi/v9.0/xapi.asmx providerUsername=username provided by webservice providerproviderPassword=password provided by webservice provider
ProxyServer=proxyname:port
Location of wsproviders.ini.append.php file - settings/override
I do not understand what I am missing here?
Can you please advise?
Thanks
Anaya
Because of soapui I definitely know that SOAP request/response is sent ok.
Gaetano Giunta
Wednesday 15 December 2010 12:49:31 pm
I am sorry, but the debugger is currently (version 0.5) limited to debugging xmlrpc and jsonrpc services. That's why you see the name of your target server grayed out in the right column.
The next version, due for release before the end of the week, will support debugging ezjscore webservices too.
For soap debugging, you will most likely have to wait until version 0.7 or maybe even later...
Principal Consultant International Business Member of the Community Project Board
Wednesday 15 December 2010 1:28:37 pm
Thanks for your quick reply.
But if I am not wrong I can call external soap web service in a template using this extension, right?
So i tried below fetch function to fetch one of the webservice methods -
{def $ws = fetch('wsdl path', 'method name', 'paramaters')}
{$ws.responseParameter}
in wsproviders.ini.append.php file
No wsdl specified in the wsproviders.ini.append.php
But this function is not returning anything?
Please let me know if I have missed anything here?
Thursday 16 December 2010 2:00:31 am
Yes, you can do what you want with this extension.
I think you have it slightly wrong: you should put the path to the wsdl in the ini file and the name of the operation in the template call.
[trx] providerType=PhpSOAP providerUri= WSDL=https://services.resx.com/xapi/v9.0/xapi.asmx?WSDL providerUsername=username provided by webservice provider providerPassword=password provided by webservice provider
then
{def $ws = fetch('webservices', 'send', hash('server', 'trx', 'method', $method_name', 'paramaters', $params))}