problem of web service js client using WebServiceProxyFactory

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

problem of web service js client using WebServiceProxyFactory

Jackie juju
Hi All,

I am programing on using the java script ot access web service.
I follow the example of
have problem on interface which return ComplexType - the call back function
cannot be called.
I compare the wsdl of Amazon sample and mine, found in the part of defining
complex type, amazon sample uses the
<xsd:all> to enclose the element, but mine use the <sequence> tag. (My wsdl
was generated by Apache Axis automatically from java class.)
Then I changed my wsdl, replace the sequence with the xsd:all. And the
callback can be called. But problem is the return value has
error(ns_error_failure). Even when I call a interface which only return int,
the return value is always 0. ( I check the log of server, the server call
was made, but return value was wrong)

I tested this problem for nearly one week, but can not solve it. Can anyone
kindly help me?
Thanks in advance.

My js code is here:
function getAMark ()  // test by the way amazon uses

//var aValue = "chinese";
     if (!proxy) {
        var listener = {

          // gets called once the proxy has been instantiated
          onLoad: function (aProxy)
            proxy = aProxy;

          // gets called if an error occurs
          onError: function (aError)

          // callback function is hardcoded to {methodname}Callback in
          testCallback : function (aresult)
          alert("enter callback, result="+aresult);
          alert("a="+aresult.a+", b="+aresult.b);
      else {
   function createProxy(aCreationListener)
      try {
        var factory = new WebServiceProxyFactory();
"Test2", "", true, aCreationListener);
      catch (ex) {
        alert("test "+ ex);

   function requestBookmarks(vp)
      if (proxy) {"UniversalBrowserRead");


       alert("call complete!");
      else {
        alert("Error: Proxy set up not complete!");

Jackie Ju

dev-tech-xml mailing list
[hidden email]