ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Consuming a web service

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Re: Consuming a web service

    OK - got it into SoapUI - that thing is ubber fussy!

    Also ran the following code on it
    PHP Code:
    <html>
    <body>
    <h2>Testing web service </h2>                                                   
    <?php
    error_reporting
    (E_ALL);
    $soapClient = new SoapClient("wsdls/GetAccountInfo.wsdl");
    echo 
    "Dump of object<br>";
    $array $soapClient->__getFunctions();
    foreach (
    $array as $element) {
       
    var_dump($element);
       echo 
    "<br>";
    }
     
    ?>
    </body>
    </html>
    Among other methods it lists this:

    string(66) "coxAccountModel GetAccountByAcctNbr(string $GetAccountAcctNbrPart)"

    which is the closest thing I can find to the method names you were trying to use. If this is indeed the method you want then I think it simply needs to be fed the account number directly as the parm is identified as a string.

    I tried this:
    PHP Code:
    $account "1234567890";
    $response $soapClient->GetAccountByAcctNbr($account); 
    And it does not throw an exception - well it does eventually because I cannot connect to your https server - but it is obviously the right type of parm. The response is described as being a "coxAccountModel" which is described in the wsdl as a compound structure. I'm afraid I don't have the time to work out exactly what it looks like and since I can't connect I can't var_dump() it to see the structure.


    Hopefully you can figure it out from here 'cos I'm afraid I'm out of time.

    Jon P.

    Comment


    • #32
      Re: Consuming a web service

      OK. I really appreciate the time you have spent. I had to quit on it for yesterday, but I am trying to get back on this today, and I will certainly try your suggestions. If you are ever down in Atlanta, Georgia, I will buy you a beer (or two, or three,...)
      Thanks again!

      Comment


      • #33
        Re: Consuming a web service

        We haven't been in Atlanta since early this year. Usually visit at least twice a year - Susan is from there. We also usually speak at the Atlanta User Group at least once a year. Are you a member? You should be - nice bunch of folks.


        Jon P.

        Comment


        • #34
          Re: Consuming a web service

          I used to be a member a long time ago.

          Comment

          Working...
          X