Israel Railways Gadget Connection

How do we connect the web service?

The normal way to connect the railway web-service is to send SOAP messages from the gadget to it.
However, due to the railway decision, they let us to connect from only one static IP address (security considerations, according to them). Therefore, we had to implement a prograom between the gadget and the server- a proxy. This proxy runs on the static IP form which RJPA is accessible.

when a gadget's user sends a request to RJPA, he actually send the request to the proxy, and the proxy sends and recives a request to the server. Afterwards the proxy returns the result to the gadget.

Let us explain the way in which the mechanism is implemented.

When the gadget sends a message, it creates an HTTP GET request and delivers it to the proxy.
The proxy is actually a java servlet- a java program that can run on a java web-applications container. The web container is apache Tomcat. The proxy listens to the gadget's request. When it gets an HTTP GET request from the gadget, it takes the parameters and create with them a SOAP message to the service.

The proxy connects to the web-service according to theh WSDL specification. When we created the proxy, we implemented it as a web-service client. Namely, we used an automatic tool and gave him the location of the WSDL specification. The tool generated java classes, that represent the web service as java objects. Using this object, the proxy sends a SOAP message to the service and then get an SOAP message response. Then it parses the response and send the response to the gadget (this is the answer to the initial HTTP GET request of the gadget).

The Java technology which we used is jax-rpc, which is java-xml remote procedure calls.
This technology gave us a convenient API for XML in Java, and also for sending and recieving SOAP messages. The automatic tool code generator we used is part of NETbeans, Sun's open source Java developer environment.

Back to Development Information

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License