Thanks for the advice Steve. So to do that I'm gonna need to 'hand-code' all the calls from Flex to php and then do the same with php, creating all the methods by hand from the wsdl? Isn't there a simpler way to do it using the Flex wsdl wizard and a php proxy that just passes through the soap request? And either way I do it I still want to know why the way I'm attempting to do it won't work. Why does going through php change my soap envelop and create a mismatch I guess is the big question??
--- In flexcoders@yahoogroups.com, "valdhor" <valdhorli...@...> wrote: > > I think you may be over thinking this. > > I have the same situation as you - a local PHP server and a remote Web > Service. > > I tried for a long time to get it working by proxying through PHP like what > you are trying. I could never get it to work. > > Instead, I created a SOAP Client in PHP that could talk to the Web Service. > Once this was working I used WebORB to create a service to talk to Flex. Then > I merged the code. Now I have Flex sending and receiving objects via WebORB > and PHP exchanging data via SOAP. The best of both worlds. > > > HTH > > > > > Steve > > --- In flexcoders@yahoogroups.com, "Joshua" <wolf@> wrote: > > > > I have a problem with soap and flex 3. I have created a webservice through > > the import webservice menu in Flex Builder. If I use the service as is I > > get a security error because the crossdomain policy on the remote server > > doesn't comply. So, instead I am using a php proxy to relay the webservice > > through my server and out to the webservice back to the server back to > > Flex. When I try to do this I get a SOAP mismatch error coming from the > > below code. > > > > else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI) > > { > > throw new Error("SOAP Response Version Mismatch"); > > } > > > > I went back in and checked the value of envNS.uri and > > SOAPConstants.SOAP_ENVELOPE_URI in both the previously described situations > > (php proxy and straight security riddled call). In the security riddled > > call the two variables match. In the proxy call I get back differing > > values of envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI. > > > > Can somebody tell me why the variables are not matching when put through > > the php proxy. The php is simple, just curl, so I've pasted it below. > > > > ///////START PHP SNIPPET > > > > $url = $_GET['url']; > > $headers = $_GET['headers']; > > $mimeType = $_GET['mimeType']; > > > > //Start the Curl session > > $session = curl_init(); > > > > // Don't return HTTP headers. Do return the contents of the call > > curl_setopt($session, CURLOPT_URL, $url); > > curl_setopt($session, CURLOPT_HEADER, ($headers == "true") ? true : false); > > curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); > > curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1); > > curl_setopt($session, CURLOPT_RETURNTRANSFER, 1); > > > > // Make the call > > $response = curl_exec($session); > > > > if ($mimeType != "") > > { > > // The web service returns XML. Set the Content-Type appropriately > > header("Content-Type: ".$mimeType); > > } > > > > echo $response; > > > > curl_close($session); > > > > //END PHP SNIPPET > > > > Any help would be great. Thanks, > > > > Josh > > >