1 Replies - 7738 Views - Last Post: 08 July 2008 - 08:39 PM

#1 Jonson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 17-April 08

How to parse soap in flash as3?

Post icon  Posted 07 July 2008 - 07:41 PM

package alducente.services{
	
	import alducente.services.WSProxy;

	public dynamic class WSMethod {
		
		private var __action:String;
		private var __servicePath:String;
		private var __methodName:String;
		private var __params:Array;
		private var __targetNamespace:String;
		private var __proxy:WSProxy;
		
		public function WSMethod(){
			__proxy = WSProxy.getInstance();
		};
		
		private function myMethod(loaded:Function, ...args):void{
			var params:String = new String();
			var a:Number;
			for(a=0;a<__params.length;a++){
				var argument:String = "";
				if(args[a] != undefined){
					argument = args[a];
				}
				params += '<' + __params[a] + '>' + argument + '</' + __params[a] + '>';
			}
	  
			var soapRequest:String = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
			soapRequest += '<soap:Body>';
			soapRequest += '<' + __methodName + ' xmlns="' + __targetNamespace + '">';
			soapRequest += params;
			soapRequest += '</' + __methodName + '>';
			soapRequest += '</soap:Body>';
			soapRequest += '</soap:Envelope>';
			
			var request:XML = new XML(soapRequest);
			
			[b]/**
			 * PUT SENDING ACTION HERE
			 */[/b]
			 
			 
			__proxy.callMethod(loaded, request, __servicePath, __action);
		}
		
		public function createMethod(name:String, param:Array, ns:String, service:String, action:String):Function{
			__servicePath = service;
			__methodName = name;
			__params = param;
			__targetNamespace = ns;
			__action = action;
			return myMethod;
		}
		
	}
	
}






What should put in the comment : PUT UR SENDING ACTION HERE. ? I want to parse my SOAP RESPONSE. any help here?

Is This A Good Question/Topic? 0
  • +

Replies To: How to parse soap in flash as3?

#2 Jonson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 17-April 08

Re: How to parse soap in flash as3?

Posted 08 July 2008 - 08:39 PM

Someone please reply..i am very stressed in this project..dam stress.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1