Servoy Interoperability

How to expose your Servoy solution as a Web Services:

This describes how to expose any Servoy solution as a web service. By implementing this other systems (like Java, Dot Net, Oracle, BMC, etc) can interface with Servoy without having to care about the technology used for both ends.

The following file will be needed if you want to test it:
http://www.nothom.com/servoy/sws.zip

Servoy Webservices.pdf (24.8 KB)

I have not done too much reading but.

You make use of the headless client here?
What is the advantage of the way you use the HC over using Servoys webclient technologie?

Hi Marcel,

I did read the PDF and it seems what Mohamad has done is that he created a servlet that understands the SOAP protocol. So he made a Computer Interface.
WebClient is a User Interface.
Of course you want it to talk to HC because only then Servoy will know records were added/edited etc.

I have to dig a little deeper into this but it’s looking good Mohamad. Thanks!

Yep, I realized that when I saw ‘interoperability’ in the message header :oops:

That could be nice!

The soap plug-in for soap ‘pull’ and the solution of Mohammed for ‘push’…

I have some sheets from Servoy World 2006, that this would be available also in the next release of Servoy! (3.5)

Anyone saw this allready?

Hi guys,

This is a Servlet that uses JAX-WS to wrap the SHC.

The main deference between this and SHC is that Systems which wants to connect to servoy via SHC should be Java based, or having an external java process, while in this solution, Servoy become more SOA, I guess 8)

However, Have anyone had a chance to test it ??

I want to make sure that I did not miss anything.

Hi,

I used this example to test if I could get a servoy webservice up and running. This succeeded.

But when I am trying to invoke this webservice in servoy with the following code:

function ServoyWebservice()
{
	
	var params = new Array;	

	params[0] = 'http://localhost:8080/NewWebService?wsdl'; 
	params[1] = 'AllMethods'; 
	params[2] = 10*1000;
	
	params[3] ='headless_client_demo';
	params[4] ='products';
	params[5] = null;
	params[6] = null;
	
	var output = plugins.Kydome_WebServices.DynInvokeServerside(params);
	plugins.dialogs.showInfoDialog('Result',output,'OK');

}

I get the following error in the developer: ```
java.lang.RuntimeException: Current script terminated


And the following shows up in the log file:

ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.lang.RuntimeException: Current script terminated
at org.eclipse.dltk.rhino.dbgp.DBGPStackManager.changeLine(DBGPStackManager.java:84)
at org.eclipse.dltk.rhino.dbgp.DBGPDebugFrame.onLineChange(DBGPDebugFrame.java:83)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:4138)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3125)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:37)
at com.servoy.j2db.scripting.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:18)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:64)
at com.servoy.j2db.FormController.Za(FormController.java:68)
at com.servoy.j2db.FormController.executeFunction(FormController.java:309)
at com.servoy.j2db.FormController.actionPerformed(FormController.java:688)
at com.servoy.j2db.Zhb.actionPerformed(Zhb.java:7)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Anyone who has also encountered this or sees what I did wrong??

Thanks,
Jos