[flexcoders] Re: Flex Soap Version Mismatch

2009-10-31 Thread Joshua
Well now it doesn't matter.  I got it running through a php proxy.  Here is 
what I ended up with.  Hope this saves somebody else 3 days.
 
?
$soapRequest = file_get_contents(php://input);
$soapAction = $_SERVER['HTTP_SOAPACTION'];
$url = 'https://secure.thedomain.com/ws/theservice.asmx?wsdl';
 
$header[] = POST /ws/theservice.asmx HTTP/1.1;
$header[] = Host: www.shipnotic.com;
$header[] = Content-Type: text/xml; charset=utf-8;
$header[] = Content-length: .strlen($soapRequest);
$header[] = SOAPAction: .$soapAction;
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $soapRequest);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 
$result = curl_exec($ch);
echo $result;
curl_close($ch);
?

--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 
 I'm still running naked, but am getting a better grip on this stuff.
 
 But here was my break, NOT!!
 
 The company was nice enough to put me on their crossdomain file.  So, I'm 
 thinking good, but I was wrong.  I still get a security violation
 
 
 FaultEvent fault=[RPC Fault faultString=Security error accessing url 
 faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
 messageId=null type=fault bubbles=true cancelable=true eventPhase=2
 
 
 What is up with that.  I thought that the cross-domain file would handle 
 that.  Here is the cross domain file on the root of the wsdl service
 
 
 ?xml version=1.0 encoding=UTF-8?
 !-- the purpose of this document is to allow FLASH web applications to 
 access the  APIs. --
 !DOCTYPE cross-domain-policy SYSTEM 
 http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
 cross-domain-policy
 allow-access-from domain=*.shipnotic.com/
 /cross-domain-policy
 
 
 I am at https://www.shipnotic.com and am accessing a wsdl at https:// at well.
 
 
 anybody know why this is still happening with crossdomain support?
 
 
 Thns,
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I would love to know too but after running around naked and sacrificing 
  some chickens I could not get it to work.
  
  All I know is that you will actually save time by doing the hand coding. 
  Maybe some day we'll have an answer but that day is not today.
  
  
  HTH.
  
  
  
  
  Steve
  
  --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
  
   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 valdhorlists@ 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 

[flexcoders] Re: Flex Soap Version Mismatch

2009-10-30 Thread Joshua

I'm still running naked, but am getting a better grip on this stuff.

But here was my break, NOT!!

The company was nice enough to put me on their crossdomain file.  So, I'm 
thinking good, but I was wrong.  I still get a security violation


FaultEvent fault=[RPC Fault faultString=Security error accessing url 
faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
messageId=null type=fault bubbles=true cancelable=true eventPhase=2


What is up with that.  I thought that the cross-domain file would handle that.  
Here is the cross domain file on the root of the wsdl service


?xml version=1.0 encoding=UTF-8?
!-- the purpose of this document is to allow FLASH web applications to access 
the  APIs. --
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
allow-access-from domain=*.shipnotic.com/
/cross-domain-policy


I am at https://www.shipnotic.com and am accessing a wsdl at https:// at well.


anybody know why this is still happening with crossdomain support?


Thns,
--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I would love to know too but after running around naked and sacrificing some 
 chickens I could not get it to work.
 
 All I know is that you will actually save time by doing the hand coding. 
 Maybe some day we'll have an answer but that day is not today.
 
 
 HTH.
 
 
 
 
 Steve
 
 --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
 
  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 valdhorlists@ 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
   
  
 





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-28 Thread valdhor
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 w...@... 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





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-28 Thread Joshua
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
 





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-28 Thread valdhor
I would love to know too but after running around naked and sacrificing some 
chickens I could not get it to work.

All I know is that you will actually save time by doing the hand coding. Maybe 
some day we'll have an answer but that day is not today.


HTH.




Steve

--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 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 valdhorlists@ 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
  
 





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua
Some more info...


I'm running everything over https


When I create the wsdl code from flex builder wizard, I have to select an 
alternative port to connect with the soap1.1 version (on the same screen where 
you specify the services you want to connect to).  Is it possible that when I 
run the php proxy and curl that I somehow lose the correct port to connect to 
1.1 and get 1.2 response back.  If so, anybody know how I could correct that?  

--- In flexcoders@yahoogroups.com, Joshua w...@... 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





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua

I just don't get the overall picture here with this wsdl stuff with flex, so 
I've got some more questions and more info.  Firstly, I don't have a 
services-config.xml file... Do I need one?  If so how, where do I create it.  
I've seen a bunch of partial info on the subject but nothing really through.  
All my stuff is going from https to https, the site is hosted on https and the 
service is located on https.  Does that matter.  I have control over my server 
and can put cross-domain files on it.  I have a proxy written with curl trying 
to relay the call to the service.  Do I need to do anything special with that 
because I'm am going across https?  I guess the port deal selector on the flex 
wsdl creation wizard is really a namespace and not a more traditional 
communication port number.. Is that correct?  

Also, here is my crossdomain file on the root of my server

 

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
allow-http-request-headers-from domain=* headers=*/
allow-access-from domain=*/
/cross-domain-policy

 

Does this look good considering https?

-

This is what I get if I don't pass a rootUrl in to the AbstractWebService 
constructor (that's how I use the php proxy)

 

FaultEvent fault=[RPC Fault faultString=Security error accessing url 
faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
messageId=null type=fault bubbles=true cancelable=true eventPhase=2]

 

Which, by the way when I'm working in debug mode on my computer works just fine 
until I upload to server.
--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 Some more info...
 
 
 I'm running everything over https
 
 
 When I create the wsdl code from flex builder wizard, I have to select an 
 alternative port to connect with the soap1.1 version (on the same screen 
 where you specify the services you want to connect to).  Is it possible that 
 when I run the php proxy and curl that I somehow lose the correct port to 
 connect to 1.1 and get 1.2 response back.  If so, anybody know how I could 
 correct that?  
 
 --- 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
 





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua
When instantiating webservice (implements webservice) with this line (no 
proxy/destination url, but rootUrl)


this.myService = new ModpayWeb(null, 
https://www.mydomain.com/amfphp/services/mpNd.php?url=https%3A%2F%2Fsecure.modpay.com%2Fws%2Fmodpay.asmx%3Fwsdl;);


I get a soap envelop of


http://schemas.xmlsoap.org/wsdl/


which does not match my static const


public static const SOAP_ENVELOPE_URI:String = 
http://schemas.xmlsoap.org/soap/envelope/;;


and gives me a soap mismatch error


but when I go directly to the source and don't use the proxy I get back an 
envelop of


http://schemas.xmlsoap.org/soap/envelope/


which does match my predefined const


but I get a security error channel  DefaultHttps


??

--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 
 I just don't get the overall picture here with this wsdl stuff with flex, so 
 I've got some more questions and more info.  Firstly, I don't have a 
 services-config.xml file... Do I need one?  If so how, where do I create it.  
 I've seen a bunch of partial info on the subject but nothing really through.  
 All my stuff is going from https to https, the site is hosted on https and 
 the service is located on https.  Does that matter.  I have control over my 
 server and can put cross-domain files on it.  I have a proxy written with 
 curl trying to relay the call to the service.  Do I need to do anything 
 special with that because I'm am going across https?  I guess the port deal 
 selector on the flex wsdl creation wizard is really a namespace and not a 
 more traditional communication port number.. Is that correct?  
 
 Also, here is my crossdomain file on the root of my server
 
  
 
 ?xml version=1.0?
 !DOCTYPE cross-domain-policy SYSTEM 
 http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
 cross-domain-policy
 allow-http-request-headers-from domain=* headers=*/
 allow-access-from domain=*/
 /cross-domain-policy
 
  
 
 Does this look good considering https?
 
 -
 
 This is what I get if I don't pass a rootUrl in to the AbstractWebService 
 constructor (that's how I use the php proxy)
 
  
 
 FaultEvent fault=[RPC Fault faultString=Security error accessing url 
 faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
 messageId=null type=fault bubbles=true cancelable=true eventPhase=2]
 
  
 
 Which, by the way when I'm working in debug mode on my computer works just 
 fine until I upload to server.
 --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
 
  Some more info...
  
  
  I'm running everything over https
  
  
  When I create the wsdl code from flex builder wizard, I have to select an 
  alternative port to connect with the soap1.1 version (on the same screen 
  where you specify the services you want to connect to).  Is it possible 
  that when I run the php proxy and curl that I somehow lose the correct port 
  to connect to 1.1 and get 1.2 response back.  If so, anybody know how I 
  could correct that?  
  
  --- 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