Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:22
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Web Services: XML, Soap, WSDL, UDDI, and Flash Integration (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis)
| | |-+  WebService errors and me.
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 Print
Author Topic: WebService errors and me.  (Read 10242 times)
nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« on: 05/20/06, 08:31 »

Hello all,
i am trying to connect to the testing enviroment at SECpay.com, for their SOAP payment gateway. On my service call, i am getting this error...

Code:
myLogger-->>>5/20 22:29:2 [INFO] logger1: https://www.secpay.com/java-bin/services/SECCardService?wsdl.validateCardFull() returned {detail: {hostname: "mwww1.man.secpay.com"},
     faultcode: "soapenv:Server.userException",
     faultstring: "org.xml.sax.SAXParseException: Invalid encoding name "0"."}

im not really sure what it means, any input will be helpful, i will continue my testing and may contact SECpay soon. thank you.
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #1 on: 05/20/06, 10:24 »

is this because im calling it form my local machine and not an SSL connection??

so now, i am using this code....

Code:
.....
.....
var secPay:String = "https://www.secpay.com/java-bin/services/SECCardService?wsdl";
var secServ:WebService = new WebService(secPay);
var oCallBack:Object = secServ.validateCardFull(mid, vpn_pswd, trans_id, ip, name, card_number,amount,expiry_date, issue_number,start_date,order,shipping,billing,test_status);
oCallBack.onResult = function(o):Void
{
callBack_result(o);
}
oCallBack.onFault = function():Void
{
trace("error");
}
}
function callBack_result(o:Object):Void {
trace(o);
mcWait.wait_txt.text = "the result is : " + o;
}

and  on my local machine the result comes back and fils the text box, but when i call it from my hosted server and use Shared SSL to connect, nothing appears in the text box. as if there is no return? what causes this? do i need a crossdomain.xml policy file?
« Last Edit: 05/20/06, 23:39 by nothinggrinder » Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #2 on: 05/22/06, 20:14 »

whether i use NUSOAP or WebService Class, no return comes back when connecting through SSL, works just fine on my localmachine, tthe text in the text box changes to show the return from the service, but when i put it on the remote host and try to connect to the service it give no return, as if it has no trouble sending but the callback cant access the flash file or something, please help.
Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #3 on: 05/23/06, 08:56 »

Amfphp doesn't use only NuSOAP, but also SoapClient (PHP 5) and the PEAR distribution.
There was some discussion about how it works over SSL, but the issue seems to be solved. NuSOAP needs CURL to solve the SSL layer, http://dietrich.ganx4.com/nusoap/downloads/7469_Chap08.pdf , didn't try with Flash Webservice class.

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #4 on: 05/23/06, 09:46 »

so this is a setting that my Hosting provider would have ti install?
Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #5 on: 05/23/06, 10:40 »

upload a php file with this:

<?php
  phpinfo();
?>

And check if in the output there's some reference to CURL

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #6 on: 05/23/06, 17:13 »

CURL is enabled....

i tested from a non SSL webserver as well, and no return, so

this code...
Code:
<?php
import mx
.remoting.*;
//import mx.remoting.NetServices;
import mx.remoting.debug.NetDebug;
import mx.rpc.*;
import mx.services.Log
import mx.services.WebService;
//For data verification
import mx.controls.Alert;
var myLogger Log = new Log (Log.DEBUG"logger1" ); 
 
// override the default log handler 
myLogger.onLog = function (message String ) : Void 
    trace ("myLogger-->>>" message ); 


var card_number:String "4444333322221111";
var card_type:String "Visa";
var expiry_date:String ="11/09";
var issue_number:String "";
var ip:String "127.0.0.1";
var amount:String "50.00";
var start_date:String "";
var name:String "Aaron Franco";
var vpn_pswd:String "secpay";
var trans_id:String "TRAN0001";
var mid:String "secpay";
var test_status:String "test_status=true";
var secPay:String "https://www.secpay.com/java-bin/services/SECCardService?wsdl";
var secServ:WebService = new WebService(secPay);

var oCallBack:Object secServ.validateCardFull(mid,vpn_pswd,trans_id,ip,name,card_number,amount,expiry_date,issue_number,start_date,order,shipping,billing,test_status);
rawXML oCallBack.request;

oCallBack.onResult = function(o):Void
{
tText.text o;
this._parent._parent.mcWait.wait_txt.text "return is here";
trace(this.myCall);
trace("SOAPrequest =" this.request);
}
oCallBack.onFault = function():Void 
{
trace("error");
}
?>


works fine from the flash testing enviroment, but now when it goes Live...?
what could be the problem?
« Last Edit: 05/23/06, 18:43 by nothinggrinder » Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #7 on: 05/24/06, 01:07 »

If you're using the webservice class, should be a crossdomain file. Usually services offers examples in many languages (and probably someone in PHP), try to test it

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #8 on: 05/24/06, 01:28 »

ok,
so i would need that file on both domains?
Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #9 on: 05/24/06, 01:30 »

Nop, only where the webservice is

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #10 on: 05/24/06, 10:02 »

so i upload it to my Payment gateway provider?

do i need any extra coding in the Actionscript of my flash movie?
Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #11 on: 05/24/06, 10:32 »

You can use System.security.loadPolicy, but usually the Flash Player do it automatically

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #12 on: 05/24/06, 18:48 »

Jorge, so ive read the tutorial on Flash MX WebService classes and the WebService im using doesnt seem to return an Object, the return looks like this...

?valid=false&trans_id=TRAN0001&code=P:P&message=Duplicate+Transaction


is there a way to parse these as variables? Or is there something i can do to get this into an object?
Logged

Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #13 on: 05/25/06, 01:57 »

You can split using & and then using = on each part. Doesn't have your gateway some docs related to Flash? I usually use PayPal, and docs are extensive about using the service.

Jorge
Logged

nothingGrinder
Mods
Systems Administrator
*****
Posts: 823


Automatic websites with social media distribution


View Profile WWW
« Reply #14 on: 05/25/06, 02:17 »

im using SECpay. They have no ideas about Flash, just XMLRPC and SOAP. They dont even know what a crossdomain.xml policy file is. I didnt think you could use PayPal outside of the USA?
Logged

Pages: [1] 2 3 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything