Hi Simon,

Thanks for the detailed response.  I'm slowly working through the
intricacies of SDO.  With your pointers, I was able to make good
progress, but I'm stuck on one point -- populating SDO so that my result
set gets properly translated to the SOAP client caller.

On the associate array issue, I've reworked my thinking.  I've worked
out the following schema that accommodates my structure:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
targetNamespace="http://restorations";>
    <xs:element name="restorations">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="restoration" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="id" type="xs:integer" />

                            <xs:element name="description"
type="xs:string" />
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema


So, what I am looking for is a result set of 1 or more "restoration,"
with each restoration being composed of an "id" and "description."  I
created my class service that builds out a dummy result set:

<?php

Zend_Loader::loadClass('Labnet_API_LabnetOnline_001_Adapter');

/**
 * @service
 * @binding.soap
 * @types http://restorations ../../restorations.xsd
*/
class Labnet_API_LabnetOnline_001
{
    /**
     * Retrieves a list of restoration procedures available to the
dental practice
     *
     * @param integer $lab_id Lab Identifier
     * @param string $practice_id Practice account code
     * @param string $practice_password Practice account password
     * @return restorations http://restorations
     */
    public function getRestorations($lab_id, $practice_id,
$practice_password)
    {
        $restorations = SCA::createDataObject('http://restorations',
'restorations');
        $restorations->restoration[0]['id'] = 1;
        $restorations->restoration[0]['description'] = 'test';
        $restorations->restoration[1]['id'] = 201;
        $restorations->restoration[1]['description'] = 'test 2';
        return $restorations;
    }
}

?>


Using PHP SOAP, I built out a client that successfully calls the
service, and dumps out the result.  And this is where I have my problem:
the resultant is empty:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
        <SOAP-ENV:Body>
                <tns:getRestorationsResponse 
                        xmlns="http://Labnet_API_LabnetOnline_001"; 
                        xmlns:tns="http://Labnet_API_LabnetOnline_001"; 
                        xmlns:tns2="http://restorations"; 
        
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                        xsi:type="getRestorationsResponse">

                        <getRestorationsReturn/>

                </tns:getRestorationsResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I'm not sure why SCA is not able to build the XML from the populated
SDO.  I'm probably missing something totally obvious here.  Any ideas?
(I pasted my WSDL below should that help).


Thanks again for helping me through the learning curve!


Best,

Mike



<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/";
xmlns:tns2="http://Labnet_API_LabnetOnline_001";
xmlns:tns="http://schemas.xmlsoap.org/wsdl/";
xmlns:tns3="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
targetNamespace="http://Labnet_API_LabnetOnline_001";>
  <types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
      xmlns:ns0="http://restorations";
      targetNamespace="http://Labnet_API_LabnetOnline_001";
      elementFormDefault="qualified">
      <xs:import schemaLocation="./restorations.xsd"
namespace="http://restorations"/>
      <xs:element name="getRestorations">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="lab_id" type="xs:integer"
nillable="true"/>
            <xs:element name="practice_id" type="xs:string"
nillable="true"/>

            <xs:element name="practice_password" type="xs:string"
nillable="true"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="getRestorationsResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="getRestorationsReturn"
type="ns0:restorations" nillable="true"/>
          </xs:sequence>

        </xs:complexType>
      </xs:element>
    </xs:schema>
  </types>

  <message name="getRestorationsRequest">
    <part name="getRestorationsRequest" element="tns2:getRestorations"/>
  </message>
  <message name="getRestorationsResponse">

    <part name="return" element="tns2:getRestorationsResponse"/>
  </message>
  <portType name="Labnet_API_LabnetOnline_001PortType">
    <operation name="getRestorations">
      <input message="tns2:getRestorationsRequest"/>
      <output message="tns2:getRestorationsResponse"/>
    </operation>
  </portType>
  <binding name="Labnet_API_LabnetOnline_001Binding"
type="tns2:Labnet_API_LabnetOnline_001PortType">

    <operation name="getRestorations">
      <input>
        <tns3:body xsi:type="tns3:tBody" use="literal"/>
      </input>
      <output>
        <tns3:body xsi:type="tns3:tBody" use="literal"/>
      </output>
      <tns3:operation xsi:type="tns3:tOperation" soapAction=""/>
    </operation>

    <tns3:binding xsi:type="tns3:tBinding"
transport="http://schemas.xmlsoap.org/soap/http"; style="document"/>
  </binding>
  <service name="Labnet_API_LabnetOnline_001Service">
    <port name="Labnet_API_LabnetOnline_001Port"
binding="tns2:Labnet_API_LabnetOnline_001Binding">
      <tns3:address xsi:type="tns3:tAddress"
location="http://sandbox.int.labnet.net/michael/labnet_online/api/public
_html/online001/index.php"/>
    </port>
  </service>
</definitions>

<!-- this line identifies this file as WSDL generated by SCA for PHP. Do
not remove -->

E-mail messages may contain viruses, worms, or other malicious code. By reading 
the message and opening any attachments, the recipient accepts full 
responsibility for taking protective action against such code. Henry Schein is 
not liable for any loss or damage arising from this message.

The information in this email is confidential and may be legally privileged. It 
is intended solely for the addressee(s). Access to this e-mail by anyone else 
is unauthorized.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to