Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    New Coder
    Join Date
    Feb 2008
    Posts
    57
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    (Image is blocked by the work firewall from the looks of it)
    Mkay, lets try a manual setting of the soap action:
    PHP Code:
    $result $client->__soapCall('GetJobs', array(), array('soapaction' => 'http://tempuri.org/GetJobs')); 
    That work? Looks to me like its the WSDL file causing the problems with incorrect targets.
    YES! That worked!!! No errors!!!!

    Wow, So now it has successfully connected and I should be able to print out the data from it? like the 'Description' or 'RequestNo' for example?

    or am I getting ahead of myself?

  2. #17
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Yeah, use a var_dump($result); to see the structure.

    Ok, the problem here is the WSDL file. I seem to recall that asp is quite smart in how it does this though, so check and see if a valid wsdl file is located here:
    Code:
    http://refrigerantcompliance/RefrigerantComplianceService/Service1.asmx?WSDL
    Type that in, see if you get a WSDL, and if you do, scroll down towards the bottom and check that these:
    Code:
    - <wsdl:service name="Service1">
    - <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
      <soap:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx" /> 
      </wsdl:port>
    - <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
      <soap12:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx" /> 
      </wsdl:port>
    Are pointing to the correct location (as this one above is the incorrect location).
    Otherwise, you'll need to pass that soapaction all the time. Which sucks. If the wsdl is correct, you can just retarget it and put the client into wsdl mode again.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  3. Users who have thanked Fou-Lu for this post:

    Ty44ler (01-21-2010)

  4. #18
    New Coder
    Join Date
    Feb 2008
    Posts
    57
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Yep, I typed that in the browser and the correct WSDL showed up and the url's at the bottom match correctly.

    So, to put it back into WSDL mode I would do this:
    PHP Code:
    $client = new SoapClient("http://refrigerantcompliance/RefrigerantComplianceService/Service1.asmx?wsdl");
    $result $client->__soapCall('GetJobs', array(), array('soapaction' => 'http://tempuri.org/GetJobs')); 
    Correct? that worked for me when I tested it out, just wanted to see if there was anything I didn't need.

    THANK YOU SO MUCH BY THE WAY!!!

  5. #19
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Yep, if the WSDL mode is correct, it should provide you with the proper soapaction from this point. You shouldn't need to have the soapaction provided in the __soapCall anymore, so you can now call you're methods with:
    PHP Code:
    $result $client->__soapCall('methodname', array('anyargs1''anyargs2', [...])); 
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


 
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •