Re: PHP Soap Client with .Net

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

 



Hi David,
   
I have done this on my code:
$weather=$client1->GetDelayedSpots(new SoapParam('ibm','Symbol'));
 
by the way, I have used non-wsdl mode to try too.
$client1 = new SoapClient(null, array('soap_version'  => SOAP_1_1,
'location' => "http://www.xignite.com/xFutures.asmx";,
                                     'uri'      =>
"http://www.xignite.com/services/";,
"style"    => SOAP_LITERAL,
      "use"      => SOAP_ENCODED));
$weather=$client1->__call('GetDelayedSpots',array( new
SoapParam('ibm','Symbol')),array(
      /* SOAP Method Namespace */
      "uri"        => "http://www.xignite.com/services/GetDelayedSpot";,
      /* SOAPAction HTTP Header for SOAP Method */
    "SOAPAction" => "http://www.xignite.com/services/GetDelayedSpot";));


Request like this:
POST /xFutures.asmx HTTP/1.1
Host: www.xignite.com
Connection: Keep-Alive
User-Agent: PHP SOAP 0.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.xignite.com/services/GetDelayedSpot";
Content-Length: 524

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://www.xignite.com/services/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";><SOAP-ENV:Body><ns1:GetDelayedSpots><Symbol
xsi:type="xsd:string">ibm</Symbol></ns1:GetDelayedSpots></SOAP-ENV:Body></SOAP-ENV:Envelope>

HTTP/1.0 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 18 Jan 2005 02:47:49 GMT
X-Powered-By: ASP.NET
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 748
X-Cache: MISS from bri-pow-pr2.tpgi.com.au
Connection: keep-alive

<?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><GetDelayedSpotResponse
xmlns="http://www.xignite.com/services/";><GetDelayedSpotResult><Outcome>RequestError</Outcome><Message>Sybmol
not prvoided</Message><Identity>IP</Identity><Delay>0</Delay><Open>0</Open><High>0</High><Low>0</Low><Last>0</Last><Volume>0</Volume><OpenInterest>0</OpenInterest><PreviousClose>0</PreviousClose><Change>0</Change><PercentChange>0</PercentChange></GetDelayedSpotResult></GetDelayedSpotResponse></soap:Body></soap:Envelope>

It can't read the parameters. Moreover, the request is different from
suggest request header from .Net.
Suggested Header
POST http://www.xignite.com/xFutures.asmx HTTP/1.1
Host: www.xignite.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.xignite.com/services/GetDelayedSpot";

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <Header xmlns="http://www.xignite.com/services/";>
      <Username>string</Username>
      <Password>string</Password>
      <Tracer>string</Tracer>
    </Header>
  </soap:Header>
  <soap:Body>
    <GetDelayedSpot xmlns="http://www.xignite.com/services/";>
      <Symbol>string</Symbol>
    </GetDelayedSpot>
  </soap:Body>
</soap:Envelope>

How to convert the PHP Soap style from 
this :
<ns1:GetDelayedSpots><Symbol
xsi:type="xsd:string">ibm</Symbol></ns1:GetDelayedSpots>

TO:

    <GetDelayedSpot xmlns="http://www.xignite.com/services/";>
      <Symbol>string</Symbol>
    </GetDelayedSpot>

????

yours,
Michael

-- 
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