For more details on what's happening, I hope I don't confuse the
situation with too much data here:
I have a delegate that has a method called GetData and GetData2:
public function GetData():void
{
var token:AsyncToken = ws.GetData();
token.addResponder(this.responder);
}
public function GetData(nodeId:Object = null):void
{
var token:AsyncToken = ws.GetData(nodeId);
token.addResponder(this.responder);
}
I've declared a WebService in Both MXML and in Actionscript:
WebServiceRPC
WebServiceMXML
I then call every combination of the two methods:
WebServiceRPC->GetData (Doesn't even call to the server, doesn't fail.
I suspect something is happening in the SOAPEncoder, though it's not
throwing errors, just silently dying. I'm hoping to figure out
why/how to get it to throw errors. Its silence is disturbing.)
WebServiceMXML->GetData works just fine.
WebServiceRPC->GetData2(null) - SoapFault is raised because the server
doesn't recognize the request.
WebServiceRPC->GetData2(1) - Returns expected Soap Envelope from the
Server
WebServiceMXML->GetData2(null) - Returns proper SoapFault, just like
with WebServiceRPC call above.
WebServiceRPC->GetData2(1) - Returns expected Soap Envelope from the
Server , just like WebServiceRPC call above
I'm trying to figure out how to call the WebServiceRPC->GetData so it
doesn't break (it's not throwing a fault), like it doesn't with the
WebServiceMXML. I guess I'm looking for a strategy for passing
optional parameters from Flex up to WebServices declared in
Actionscript code (RPC).
Here's the WSDL defenition of GetData, as you can see it has both min
and maxOccurs set:
<element name="GetData">
<annotation>
<documentation>
Blah
</documentation>
</annotation>
<complexType>
<sequence>
<element maxOccurs="1" minOccurs="0"
name="nodeId" type="long">
</element>
</sequence>
</complexType>
</element>