Re: Interoperability - PEAR::SOAP server, MS Soap toolkit 3 client

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

 



Hi Richard,

Have you found out solution? I am facing the same problem as you had before.
Thank you.



"Richard Green" <r1chardgreen@yahoo.com.au> wrote in message
20030813135501.10818.qmail@pb1.pair.com">news:20030813135501.10818.qmail@pb1.pair.com...
> Attempting to set up PEAR::SOAP server to be accessed using Microsoft Soap
> Toolkit 3 extensions - I'm testing by writing VBScript in ASP pages...
>
> Using the example server for the PEAR::SOAP (I have not included code
> framents from these, let me know if they are needed, I assume if you know
> PHP::SOAP you have access to these), I am able to access the server using
> the example PHP client, but, in some cases, have had problems when using
> the MSSOAP toolkit client.
>
> For instance, for the 'divide' method of the example PHP server works when
,
> when accessed by the PHP client, but with the MSSOAP client, complains it
> exected type 'int' for the input parameters, rather than type 'string'.
For
> the examples where the expected type is string, it is possible to
> exchange data without problems.
>
> Within the SOAP_Example_Server class definition, the input parameters are
> indeed set as 'int' for the 'divide' function.
>
> A quick comparison of the XML message send by the PHP client and MSSOAP
> client showed that the PHP client did indeed specify the type, whereas the
> MSSOAPclient did not.
>
> While it seems to be possible to use the lower level API in MSSOAP to
> consruct the message manually, that is not desirable as it removes me from
> the simplicty that is what writing a SOAP client is supposed to be about.
> I'm a systems administrator, so the simpler the better ;)
>
> Is there a way, at the server end, that it is possible to force the
> interpretation on a message part to be a particular type, as from my
> experience above, it seems the server is assuming the type to be a string
> unless it is expicitly set by the client?
>
> PHP client code fragment
> ------------------------
>
> $ret = $soapclient->call("divide",
>                          $params = array("dividend"=>22,"divisor"=>7),
>                          $options);
>
>
>
> PHP client SOAP request message fragment
> ----------------------------------------
>
> SOAPAction: "urn:SOAP_Example_Server#soap_example_server#divide"
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>  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/";
>  xmlns:ns4="urn:SOAP_Example_Server"
>  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> <SOAP-ENV:Body>
>
> <ns4:divide>
> <dividend xsi:type="xsd:int">22</dividend>
> <divisor xsi:type="xsd:int">7</divisor></ns4:divide>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> MSSOAP toolkit 3 request message fragment
> -----------------------------------------
>
> SOAPAction: "urn:SOAP_Example_Server#soap_example_server#divide"
> Content-Type: text/xml; charset="UTF-8"
> User-Agent: SOAP Toolkit 3.0
> Host: mailer.swishzone.com
> Content-Length: 537
> Connection: Keep-Alive
> Cache-Control: no-cache
> Pragma: no-cache
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope
> xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema";
> xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
> <SOAP-ENV:Body
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> <SOAPSDK4:divide xmlns:SOAPSDK4="urn:SOAP_Example_Server">
> <dividend>22</dividend>
> <divisor>7</divisor>
> </SOAPSDK4:divide>
> </SOAP-ENV:Body></SOAP-ENV:Envelope>
>
> MSSOAP toolkit 3 response message fragment
> ------------------------------------------
>
> <SOAP-ENV:Body>
>
> <SOAP-ENV:Fault>
> <faultcode xsi:type="xsd:QName">SOAP-ENV:Client</faultcode>
> <faultstring xsi:type="xsd:string">soap request contained mismatching
> parameters of name dividend had type [string], which did not match
> signature's type: [int], matched? -10</faultstring>
> <faultactor xsi:type="xsd:anyURI"></faultactor>
> <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[6]"
> SOAP-ENC:offset="[0]">
> <item>
> <file xsi:type="xsd:string">/usr/local/lib/php/SOAP/Fault.php</file>
> <line xsi:type="xsd:int">49</line>
> <function xsi:type="xsd:string">pear_error</function>
> <class xsi:type="xsd:string">pear_error</class>
> <type xsi:type="xsd:string">::</type>
> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[5]"
> SOAP-ENC:offset="[0]">
> <item xsi:type="xsd:string">soap request contained mismatching parameters
of
> name dividend had type [string], which did not match signature's type:
> [int], matched? -10</item>
> <item xsi:type="xsd:string">Client</item>
> .
> .
> .
> etc

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