This behavior (empty SOAP request sent to server) stemmed somehow from
my wsdl file. I'm uncertain what the specific problem was, but when I
rebuilt the wsdl from scratch using a different model, the SOAP
request from Flex was properly formed.

--- In flexcoders@yahoogroups.com, "awilber" <[EMAIL PROTECTED]> wrote:
>
> I've created a PHP5 SOAP webservice and am trying to call a method from
> flex. I get a fault from the Flex app that says
> 
> faultString="HTTP request error" faultCode="Server.Error.Request"
> 
> The SOAP request received by the server is as follows (which I think
> explains why the server responded with an error):
> 
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> <SOAP-ENV:Body/>
> </SOAP-ENV:Envelope>
> 
> It is missing an open Body tag, as well as all the body parameters. What
> could cause such a drasticly malformed request?
> 
> 
> The relevant AS:
> public var _webServiceLoaded:Boolean = false; // flag noting when wsdl
> has been loaded
> public var _myService:WebService = new WebService();
> 
> public function initWS():void {
> _myService.wsdl = "http://foreignserver.com/seminar_service.wsdl";;
> _myService.loadWSDL();
> _myService.echoArgs.addEventListener("result", echoResultHandler);
> _myService.addEventListener("fault", faultHandler);
> _myService.addEventListener('load',WSLoad);
> }
> 
> public function send_attendee_email():void {
> _myService.echoo("qwerty"); // should just return the same string we
> send; echoo spelled with extra o
> }
> 
> And my wsdl:
> <?xml version="1.0"?>
> <definitions
> xmlns="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="http://foreignserver.com/seminar_service.php";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> targetNamespace="http://foreignserver.com/seminar_service.php";>
> <message name="echooInput">
> <part name="echo" type="xsd:string"/>
> </message>
> <message name="send_attendee_emailInput">
> <part name="sem_date" type="xsd:string"/>
> <part name="sem_first" type="xsd:string"/>
> <part name="sem_last" type="xsd:string"/>
> <part name="sem_title" type="xsd:string"/>
> <part name="sem_company" type="xsd:string"/>
> <part name="sem_phone" type="xsd:string"/>
> <part name="sem_email" type="xsd:string"/>
> <part name="pdf_filename" type="xsd:string"/>
> </message>
> <message name="echooOutput">
> <part name="return" type="xsd:string"/>
> </message>
> <message name="send_attendee_emailOutput">
> <part name="return" type="xsd:string"/>
> </message>
> <portType name="seminarPortType">
> <operation name="echoo">
> <input message="tns:echooInput"/>
> <output message="tns:echooOutput"/>
> </operation>
> <operation name="send_attendee_email">
> <input message="tns:send_attendee_emailInput"/>
> <output message="tns:send_attendee_emailOutput"/>
> </operation>
> </portType>
> <binding name="seminarBinding" type="tns:seminarPortType">
> <soap:binding xmlns="http://schemas.xmlsoap.org/wsdl/soap/"; style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";
> name="echoo">
> <input xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";>
> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/"; use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";>
> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/"; use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> </operation>
> <operation xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";
> name="send_attendee_email">
> <input xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";>
> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/"; use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";>
> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/"; use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> </operation>
> </binding>
> <service name="seminarService">
> <port xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/";
> name="seminarPort" binding="tns:seminarBinding">
> <soap:address xmlns="http://schemas.xmlsoap.org/wsdl/soap/";
> location="http://foreignserver.com/seminar_service.php"/>
> </port>
> </service>
> </definitions>
>


Reply via email to