Jump to content

SOAP problem

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Hamed

Hamed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 276 posts
Hello
I get this error
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /home/hamedali/domains/ghasemzadeh.ir/public_html/SOAP/action.php:38 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://127.0.0....', 'urn:BankSOAPAct...', 1, 0) #1 /home/hamedali/domains/ghasemzadeh.ir/public_html/SOAP/action.php(38): SoapClient->__soapCall('getTran', Array) #2 {main} thrown in /home/hamedali/domains/ghasemzadeh.ir/public_html/SOAP/action.php on line 38

this is URL of my page
????? ???? ?? ??? SOAP and
WSDL file is:
http://ghasemzadeh.i...P/bank/bank.xml

#2
SoN9ne

SoN9ne

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
try using try/catch
Something like:
 try {

 	// Your code goes here

 } catch (SoapFault $e) {

 	die($e->getMessage());

 }
Use die for debugging and for local development.
Make sure you change it once you go live.
"Life would be so much easier if we only had the source code."

#3
Hamed

Hamed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 276 posts
Now just I get "Not Found"
What is the problem

#4
bleastan

bleastan

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts

Hamed said:

Now just I get "Not Found"
What is the problem

What php code do u use to connect to your soap server? if its 'not found' mayb your reference to the WSDL is wrong (I cant see your code so i can only speculate :))

#5
Hamed

Hamed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 276 posts
I attached ZIP file which contain all codes.

Attached Files



#6
bleastan

bleastan

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
Ive been looking a bit at your code and what i think is, is that you put your reference to the xml wrong.
I saved your files in the following folder:
c:/xampp/htdocs/tmp/

after i changed your xml reference to the following:
$client = new SoapClient("http://localhost/tmp/bank/bank.xml", $option);
after this i dont get the error anymore that the xml isnt found.

What i saw is that in your db.php u have the following for $gURL = "http://127.0.0.1/";
Isnt there a map AFTER http://127.0.0.1/ where u have put the files in?
like under xampp (if u use it) u have c:/xampp/htdocs/SOAPPROG/action.php
if thats the case then gURL variable must be
$gURL = "http://127.0.0.1/SOAPPROG/";

So my advice is 'check the reference to ur bank.xml (which is ur wsdl file)' and make sure that is correct. After i did that everything seemed to work here :)

#7
Hamed

Hamed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 276 posts
I check all of them and I change them to http://ghasemzadeh.ir/SOAP/
yet I have problem

#8
bleastan

bleastan

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
Replace ur old files with the ones in the zip. Works perfectly here[ATTACH]4463[/ATTACH]

It works perfectly here when i call action.php now.

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users