Re: WSDK synchronous proxying (was Re: SOAP problem with array encoding)

"Hiran Chaudhuri" <hiran.chaudhuri@_at_web_dot.de>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Global Access Telecommunications, Inc.
Message-ID <[email protected]>
"Martin Honnen" <[email protected]> schrieb im Newsbeitrag news:[email protected]...
> var webServiceProxyFactory = new WebServiceProxyFactory();
> webServiceProxyFactory.createProxyAsync(
>    'http://www.xmethods.net/sd/2001/BabelFishService.wsdl',
>    'BabelFishPort',
>    '',
>    false,
>    { onLoad: function (webServiceProxy) {
>        var translation = webServiceProxy.BabelFish('en_pt', 'Do you have 
> the key?');
>        alert('typeof translation: ' + (typeof translation) + '; 
> translation: ' + translation);
>      },
>      onError: function (error) {
>        alert('Error: ' + error);
>      }
>    }
> );
> 
> I get an alert showing the return value of the web service method call 
> (e.g. webServiceProxy.BabelFish(...)) as a string but the string is empty.

Same with me. I can create the asynchronous proxy and it works as described. However the synchronisation I need to implement in JavaScript will end in a busy wait, so I want the synchronous proxy.

For synchronous proxies, the callbacks are not used (why actually? such events might still be interesting to some applications...). But the result seems not to be returned at all.

The only thing I can imagine is that the return value does not have the type "String". It might be an object that is converted to the empty string when we try to display it. Therefore it might be possible there is a special way to get the translation from that return value. The problem: How do you find out?

Hiran
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.