Hi,
Im working on phpCallback <http://code.google.com/p/gwt-phpcallback/>, It
will be finished soon. using is much easier.
first we made object to send
public class TestObject extends PhpRpcObject {
public String[] aaa = {"ss","dd"};
public int[] bbb = new int[2];
}
then made service
public class TestService implements PhpRpcService{
public void getTestObject(TestObject objTest,
PhpRpcCallback<TestObject> p_callBack){};
}
and last we call it
PhpRpcCallback<TestObject> callback = new PhpRpcCallback<TestObject>() {
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}
public void onSuccess(TestObject result) {
Window.alert(result.iii);
}
public void onThrowable(PhpRpcException rpcException) {
Window.alert(rpcException.getExceptionJs().getMessage());
}
};
service.getTestObject("string", 15, obj, callback);
in php is generated service implementation, we add only a body in methods
class TestServiceImpl{
public $ARGUMENTS_getTestObject="objects/TestObject";
public function getTestObject( TestObject $objTest){
// if (objTest==null) throw new RpcException("Undefied object");
// $objTest->iii = "Generated inside PHP";
// return ($objTest);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.