Re: Create function for soap call to godaddy ote using given libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 January 2011 17:26, Richard Quadling <rquadling@gmail.com> wrote:
> On 27 January 2011 17:02, ribe <ribeski.goce@gmail.com> wrote:
>>
>> Anather codde I tryed, but responca is again the same:
>
> Take a look at the following code ...
>
> 1 - http://pastebin.com/VfgrhzKy
>
> WAPI.php
>
> This is the script produced by wsdl2php which takes a wsdl file and
> turns it into a bunch of PHP classes, wrapping PHP's native SoapClient
> technology.
>
> 2 - http://pastebin.com/f8CBcLHc
>
> My code based upon a simple test bed allowing me to test soap services.
>
> If I don't enter the credentials, the script outputs (I'm using the
> command line) ...
>
> SimpleXMLElement Object
> (
> Â Â[@attributes] => Array
> Â Â Â Â(
> Â Â Â Â Â Â[clTRID] =>
> Â Â Â Â)
> Â Â[result] => SimpleXMLElement Object
> Â Â Â Â(
> Â Â Â Â Â Â[@attributes] => Array
> Â Â Â Â Â Â Â Â(
> Â Â Â Â Â Â Â Â Â Â[code] => 1001
> Â Â Â Â Â Â Â Â)
> Â Â Â Â Â Â[msg] => Server=P3OWCORPAPI001; Source=WsWWDAPI;
> Description=sCLTRID is a required parameter.
> Â Â Â Â)
> )
>
> If I enter just a sCLTRID, I get ...
>
> SimpleXMLElement Object
> (
> Â Â[@attributes] => Array
> Â Â Â Â(
> Â Â Â Â Â Â[clTRID] => abc123
> Â Â Â Â)
> Â Â[result] => SimpleXMLElement Object
> Â Â Â Â(
> Â Â Â Â Â Â[@attributes] => Array
> Â Â Â Â Â Â Â Â(
> Â Â Â Â Â Â Â Â Â Â[code] => 1001
> Â Â Â Â Â Â Â Â)
> Â Â Â Â Â Â[msg] => Login credentials failed.
> Â Â Â Â)
> )
>
>
> So, the code is working as best it can. If you can enter your
> credentials into the code and run it (don't need to edit anything else
> for the time being), then at least we can see what output we get.
>
> Obviously, if you are using ...
>
> Â Â Â Â$o_Describe->sCLTRID Â Â Â Â Â Â Â= '123213';
> Â Â Â Â$o_Describe->credential->account Â= 'acacac';
> Â Â Â Â$o_Describe->credential->password = 'pspsps';
>
> then I guess that these are NOT the real credentials.
>
> The code will use PHP5's SoapClient. I've no idea about nusoap. I
> think that it is a PHP4 class. PHP5 has native support for SoapClient.
>
> Richard.
>
> Richar
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>

If you use the code I've supplied, and copy the show trace code to the
main body of the script, you can see the request/response,
headers/body ...

Request Headers
---------------
POST /wswwdapi/wapi.asmx HTTP/1.1
Host: api.ote.wildwestdomains.com
Connection: Keep-Alive
User-Agent: PHP
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://wildwestdomains.com/webservices/Describe";
Content-Length: 300


Request
-------
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
                   xmlns:ns1="http://wildwestdomains.com/webservices/";>
  <SOAP-ENV:Body>
    <ns1:Describe>
      <ns1:sCLTRID>123213</ns1:sCLTRID>
      <ns1:credential />
    </ns1:Describe>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response Headers
----------------
HTTP/1.1 200 OK
Date: Thu, 27 Jan 2011 17:28:38 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 518

Response
--------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
               xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <soap:Body>
    <DescribeResponse xmlns="http://wildwestdomains.com/webservices/";>
      <DescribeResult>&lt;response clTRID="123213"&gt; &lt;result
code="1001"&gt; &lt;msg&gt;Login credentials failed.&lt;/msg&gt;
&lt;/result&gt; &lt;/response&gt;</DescribeResult>
    </DescribeResponse>
  </soap:Body>
</soap:Envelope>


Response interpreted
--------------------
SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [clTRID] => 123213
        )
    [result] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [code] => 1001
                )
            [msg] => Login credentials failed.
        )
)

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux