A few questions about PHP's SOAP module

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

 



* I'm trying to better understand the 'classmap' option for the
SoapClient class.  Is it used to define the class of an instantiated
object which will be passed as an argument to the server's function
call?  So, as a very simplistic example, it might go something like
this:

<?php
  class MyClass
  {
    public $sStockSymbol ;
    public function __construct( $sStockSymbol )
    {
      $this->sStockSymbol = $sStockSymbol;
    }
  }

  $oObj = new MyClass( 'ibm' );
  $oClient = new SoapClient( $sWSDL_URI, array( 'classmap' => array(
'StockSymbol' => 'MyClass' )));

  $oClient->getStockValue( $oObj );
?>

Am I even close?  Now, what happens if one of the required arguments
to the server function is a variable that has a hyphen in it?  Is
there any way I can get around that since PHP doesn't allow you to
define variables with hyphens?

* Whether using class/objects to pass parameters to a server function
(assuming I have the above correct) or arrays, how can you define
further attributes for each parameter?  Is that even possible?  So
here is an example of a SOAP message that the server is expecting:

<?xml version="1.0"?>
<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>
    <ServerFuncName xmlns="urn:/joe/bob/briggs/types">
      <String1>Var1 Value</String1>
      <String2>live</String2>
      <Array1>
        <SubArray1 status="complete">
          <SubArray2 xmlns="" encoding="" node-type="">
            <SubArray3>
              <node name="attribute1">Node Value</node>
              <node name="attribute2">Node Value</node>
              <node name="attribute3">Node Value</node>
              <node name="attribute4">Node Value</node>
              <node name="attribute5">Node Value</node>
            </SubArray3>
          </SubArray2>
          <SubArray2 xmlns="" encoding="" node-type=""></SubArray2>
        </SubArray1>
      </Array1>
    </ServerFuncName>
  </soap:Body>
</soap:Envelope>

How can I set up the attributes illustrated above?  Encoding,
node-type, etc?  Is that possible?

* Finally, is there a really good and/or comprehensive tutorial and/or
write-up on PHPs SOAP module?  The documentation is pretty spartan and
what I have found doesn't really go in to much depth.

Any help would be greatly appreciated!

thnx,
Christoph

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux