1
2
3
4
5
6 package net.kwfgrid.gwui.servicestubs;
7
8 import net.kwfgrid.gwui.graphviz.GraphViz;
9 import net.kwfgrid.gwui.graphviz.GraphVizException;
10
11 import java.rmi.RemoteException;
12
13 import org.apache.log4j.Logger;
14
15 import com.wingfoot.soap.*;
16 import com.wingfoot.soap.transport.*;
17 import com.wingfoot.soap.encoding.*;
18
19 /***
20 The stub of the GraphViz WebService.
21 */
22 public class GraphVizWS extends WSClient implements GraphViz {
23 public GraphVizWS(String url) {
24 super(url);
25 }
26
27 public byte[] dot(String params, String input) throws GraphVizException {
28 try {
29 Envelope response = makeRPC("dot", new Object[][] { { "params", params } , { "input", input } });
30 Object o = response.getParameter(0);
31 byte[] result = ((Base64)o).getBytes();
32 return result;
33 } catch (RemoteException x) {
34 GraphVizException lx = new GraphVizException("Could not invoke GraphViz WebService.");
35 lx.initCause(x);
36 throw lx;
37 }
38 }
39 }