I can successfully connect to soap server v 6.x-1.2-beta1 with PHP but im having a hell of a time getting connected via flash builder / flex 3

Does anyone have any suggestions. So far i have the following code:
Basically i keep running into errors passing arguments to the soap server and i think its not sending the right response back. Im just trying to get a single node via node.get, once i get one result working i can work out the rest of the methods.

<?xml version="1.0" encoding="utf-8"?>
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">


import mx.controls.Alert;
import mx.rpc.AbstractOperation;
import mx.rpc.AsyncToken;
import mx.rpc.Fault;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;

private function getinfo_clickHandler(event:MouseEvent):void
{
var oRequest:XML = 4 ;
infoarea.text = 'Parameters: ' + oRequest.toXMLString() + '\r';
var oInfo: AsyncToken;
oInfo = drupalServices.getOperation('node.get').send(oRequest);
}
private function onResult(event:ResultEvent):void
{
infoarea.text = 'Success';
}
private function onFault(event:FaultEvent):void
{
infoarea.text = infoarea.text + 'Error: ' + event.fault.faultString + '\r';
}
]]>


makeObjectsBindable="true"
showBusyCursor="true"
fault="onFault(event)"
result="onResult(event)">







Comments

dajuice’s picture

sorry the code didnt post correctly

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

	<fx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.rpc.AbstractOperation;
			import mx.rpc.AsyncToken;
			import mx.rpc.Fault;
			import mx.rpc.events.FaultEvent;
			import mx.rpc.events.ResultEvent;
			import mx.rpc.soap.WebService;
			
						
			private function getinfo_clickHandler(event:MouseEvent):void
			{
				var oRequest:XML = <nid> 4 </nid>;
				infoarea.text = 'Parameters: ' + oRequest.toXMLString() + '\r';
				var oInfo: AsyncToken;
                                oInfo = drupalServices.getOperation('node.get').send(oRequest);
			}
			private function onResult(event:ResultEvent):void
			{
				infoarea.text = 'Success';
			}
			private function onFault(event:FaultEvent):void
			{
				infoarea.text = infoarea.text +  'Error: ' + event.fault.faultString + '\r'; 
			}
		]]>
	</fx:Script>

	<fx:Declarations>
		<s:WebService id="drupalServices" wsdl="http://localhost/mysite/services/soap?wsdl"
					  makeObjectsBindable="true"
					  showBusyCursor="true"
					  fault="onFault(event)"						
					  result="onResult(event)">
			
		</s:WebService>
		
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
	<s:Panel x="30" y="24" width="483" height="319">
		<s:TextArea x="48" y="27" id="infoarea" width="386" visible="true" height="248"/>
		<s:Button x="323" y="-29" label="Get Info" width="111" id="getinfo" click="getinfo_clickHandler(event)"/>
		<s:Label x="48" y="-20" text="My Drupal Test&#xd;"/>
	</s:Panel>
</s:Application>