Skip to main content
Inspiring
August 6, 2008
Answered

server-side error including webservice

  • August 6, 2008
  • 1 reply
  • 545 views
Hi,

I'm struggling with the webservice functionality on the server-side.
At the top of my main.asc-file I have this line:

load("webservices/WebServices.asc");

That puts the following in my administration console:

"WebServices Loaded successfully."

However, when someone connects to the media server and it tries to initialize and use this webservice using this code:

MyService = new WebService("uri.to.wsdl.file");

I get the following error in the administration console:

Sending error message: C:\Program Files\Adobe\Flash Media Server 3\scriptlib\webservices\XMLSchema.asc: line 110: ReferenceError: document is not defined
Failed to execute method (XML.onData).

I've tried googling it and that gave this result, but the solution suggested here didn't work:

Link to other forum

This is not caused by the webservice itself, since other flash and .Net applications can use it without any problems. Everything also works just fine when I run everything off my local workstation, but as soon as I put the stuff on the server the error message appears (and, yes, I've changed all references to the webservice to be the one on the server instead of the local workstation ;))

What is causing this? Why do I get an error from Adobe's own code?
    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer GTHvidsten
    Sorry... I take back what I said about it not being the webservice. It seemed it was the webservice after all... but not in the way you'd think.

    It seems that the webservice handling on server-side AS can't handle webmethods that return complex types. I had two methods that returned DataTable-objects (.Net-objects). As soon as I removed those the webservice calls worked just the way they should again. All the webmethods in the webservice now only return primitive types.

    This still seems like a bug in Adobe's webservice classes, though. A consumer of a webservice should be able to handle complex types.

    1 reply

    GTHvidstenAuthorCorrect answer
    Inspiring
    August 7, 2008
    Sorry... I take back what I said about it not being the webservice. It seemed it was the webservice after all... but not in the way you'd think.

    It seems that the webservice handling on server-side AS can't handle webmethods that return complex types. I had two methods that returned DataTable-objects (.Net-objects). As soon as I removed those the webservice calls worked just the way they should again. All the webmethods in the webservice now only return primitive types.

    This still seems like a bug in Adobe's webservice classes, though. A consumer of a webservice should be able to handle complex types.