0
votes

I am trying to use this wsdl (http://multiplayerrobot.com/Diplomacy.svc), with as3-jaws. I get the error TypeError: Error #1080: Illegal value for namespace:

var wsdl:Namespace = _rawWSDL.namespace("wsdl");
var s:Namespace = _rawWSDL.namespace("s");

var types:XMLList = _rawWSDL.wsdl::types;
var schema:XMLList = types.s::schema; //error on this line

The wsdl doesn't seem to have anything relating to "s", and I tried "xsd" instead (resolves to http://www.w3.org/2001/XMLSchema), but that gives Error: Method not found as XMLList = schema.s::element; is empty.

1

1 Answers

0
votes

Well, you could replace one prefix with another one - I'd actually go as far as removing all namespaces from XML, because it's just sloppy and useless. But then I would also try to avoid using XML at all... But if your final goal is to use the service as is, then either replace the prefix with the one you need, or find out why do you really need it.

Here I put together a quick example of how you can replace targeted namespace in the entire document: http://pastebin.com/5spKs654 . But I'd rather reconsider using the libraries that you use for processing XMLs, as the requirement they put forward is bizarre (I'd suspect the rest of the code could be just as bizarre).