|
List Info
Thread: Representing Associative Arrays in SCA Result
|
|
| Representing Associative Arrays in SCA
Result |
  United States |
2007-05-04 13:10:39 |
Hi there,
Maybe this is off topic, and I apologize if it is. I'm
trying to get
my head around how to represent complex return types for a
SCA
service. The result type is to be a associative array. I
think I am
on the right track with trying to define an XML Schema doc
that
defines the structure, and then reference it with a types
annotation. Bit, I'm having problems figuring out how to
represent an
associative array as XML Schema. Any tips?
Thanks,
Mike
--~--~---------~--~----~------------~-------~--~----~
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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-07 05:04:10 |
On 4 May, 19:10, Michael Caplan <michael.cap... henryschein.com>
wrote:
> Hi there,
>
> Maybe this is off topic, and I apologize if it is. I'm
trying to get
> my head around how to represent complex return types
for a SCA
> service. The result type is to be a associative array.
I think I am
> on the right track with trying to define an XML Schema
doc that
> defines the structure, and then reference it with a
types
> annotation. Bit, I'm having problems figuring out how
to represent an
> associative array as XML Schema. Any tips?
>
> Thanks,
>
> Mike
Hi Mike
At the moment we are using the SDO technology included in
the SCA_SDO
package to represent complex types as they pass in and out
of SCA
services. So, for example, to define a complex type that a
service
might return you might do something like (this is code from
the SCA/
emailcontact example cut down a bit)...
/**
* service
* binding.jsonrpc
* types http://example.org/contac
ts contacts.xsd
*/
class ContactService {
/**
* Retrieve contact details
*
* param string $shortname The short name of the
contact
* return contact http://example.org/contac
ts The full contact
details
*/
public function retrieve($shortname) {
$contact = SCA::createDataObject('http://example.org/
contacts', 'contact');
$contact->shortname = "fred";
$contact->fullname = "Fred
Bloggs";
$contact->email = "fred.bloggs some.domain.com";
return $contact;
}
The points of interest here are that:
* types defines the schema that will be used
* return defines the type from the scehma that will
be returned
SCA::createDataObject('http://example.org/contac
ts', 'contact');
creates an SDO of the type requested
$contact->shortname etc. just fills in the data object
elements as
defined in the schema
The schema by the way is:
<schema xmlns=...>
<element name="contact">
<complexType>
<sequence>
<element name="shortname"
type="string" />
<element name="fullname"
type="string" nillable="true" />
<element name="email"
type="string" nillable="true" />
</sequence>
</complexType>
</element>
</schema>
Now to associative arrays. SDO itself acts a little like an
associative array in that you can set properties of the SDO
as though
they are associative array elements. I.e you should be able
to set
$contact["fullname"] = "Fred Bloggs";
However you are still bounded by the property names defined
in the
schema. If this doesn't provide enough flexibility SDO will
handle
"open" types in XML schema, for example, If we
extend the schema above
to
<schema xmlns=...>
<element name="contact">
<complexType>
<sequence>
<element name="shortname"
type="string" />
<element name="fullname"
type="string" nillable="true" />
<element name="email"
type="string" nillable="true" />
<any namespace="##any"
maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</schema>
Then SDO will allow us to adde new elements on the fly.
$contact["xyz"] = "Fred Bloggs";
We don't support creating SDOs statically using the normal
PHP array
syntax but there is a resonable amount of flexibility in the
SDO
interface. If you wanted to play with SDO outside of SCA
here is a
little test script that demonstrates the above....
$xmldas = SDO_DAS_XML::create();
$xmldas->addTypes("contacts.xsd");
$doc = $xmldas->createDocument();
$contact = $doc->getRootDataObject();
$contact["shortname"] = "fred";
$contact->fullname = "Fred Bloggs";
$contact->email = "fred.bloggs some.domain.com";
$contact["xyz"] = "Fred Bloggs";
print_r($contact);
Regards
Simon
--~--~---------~--~----~------------~-------~--~----~
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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-07 10:38:08 |
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 s=&qu
ot;http://www.w3.
org/2001/XMLSchema"
targetNamespace="http://restorations&quo
t;>
<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="h
ttp://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:getRestorationsResponse
xmlns="http://Labne
t_API_LabnetOnline_001"
xmlns:tns="http://Labne
t_API_LabnetOnline_001"
xmlns:tns2="http://restorations"
a>
xmlns si=&q
uot;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://Labne
t_API_LabnetOnline_001"
xmlns:tns="http://schemas
.xmlsoap.org/wsdl/"
xmlns:tns3="http://sc
hemas.xmlsoap.org/wsdl/soap/"
xmlns si=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
targetNamespace="http://L
abnet_API_LabnetOnline_001">
<types>
<xs:schema xmlns s=&qu
ot;http://www.w3.
org/2001/XMLSchema"
xmlns:ns0="http://restorations"
a>
targetNamespace="http://Labne
t_API_LabnetOnline_001"
elementFormDefault="qualified">
<xs:import
schemaLocation="./restorations.xsd"
namespace="http://restorations&qu
ot;/>
<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://sch
emas.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"&
gt;
<tns3:address xsi:type="tns3:tAddress"
location="http://sandbox.int.labnet.net/michael/labnet_onlin
e/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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-07 13:29:35 |
Hi Simon et al,
For what it is worth, I updated my schema (see below)
because it was
causing WSDL validation issues. But, I still can't figure
out why SCA is
not transmitting my result set, instead of an empty result
set.
Any tips greatly appreciated.
Thanks,
Mike
<?xml version="1.0"
encoding="UTF-8"?>
<xs:schema xmlns s=&qu
ot;http://www.w3.
org/2001/XMLSchema"
targetNamespace="http://restorations"
a> xmlns="http://restorations&quo
t;>
<xs:complexType name="restorations">
<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"
nillable="true" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
> -----Original Message-----
> From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> Behalf Of Caplan, Michael
> Sent: May 7, 2007 12:38 PM
> To: phpsoa googlegroups.com
> Subject: [phpsoa] Re: Representing Associative Arrays
in SCA Result
>
>
> 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 s=&qu
ot;http://www.w3.
org/2001/XMLSchema"
> targetNamespace="http://restorations&quo
t;>
> <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="h
ttp://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Body>
> <tns:getRestorationsResponse
> xmlns="http://Labne
t_API_LabnetOnline_001"
> xmlns:tns="http://Labne
t_API_LabnetOnline_001"
> xmlns:tns2="http://restorations"
a>
>
> xmlns si=&q
uot;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://Labne
t_API_LabnetOnline_001"
> xmlns:tns="http://schemas
.xmlsoap.org/wsdl/"
> xmlns:tns3="http://sc
hemas.xmlsoap.org/wsdl/soap/"
> xmlns si=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
> targetNamespace="http://L
abnet_API_LabnetOnline_001">
> <types>
> <xs:schema xmlns s=&qu
ot;http://www.w3.
org/2001/XMLSchema"
> xmlns:ns0="http://restorations"
a>
> targetNamespace="http://Labne
t_API_LabnetOnline_001"
> elementFormDefault="qualified">
> <xs:import
schemaLocation="./restorations.xsd"
> namespace="http://restorations&qu
ot;/>
> <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://sch
emas.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"&
gt;
> <tns3:address
xsi:type="tns3:tAddress"
>
location="http://sandbox.int.labnet.net/michael/labnet_online
/api/publi
> c
> _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.
>
> 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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-08 03:59:17 |
Hi Mike
It's possible that the way that the SDO is being populated
is causing
problems here. I tend to create each layer in the complex
type
hierarchy separately. So, for example, the code would look
something
like...
// create the top level object
$restorations = SCA::createDataObject('http://restorations',
'restorations');
// create the first child, automatically adding it
into
$restorations
$restoration =
$restorations->createDataObject('restoration');
$restoration['id'] = 1;
$restoration['description'] = 'test';
// create the first child, automatically adding it
into
$restorations
$restoration =
$restorations->createDataObject('restoration');
$restoration['id'] = 201;
$restoration['description'] = 'test 2';
return $restorations;
Having said this it's not clear why you result was
completely empty as
I maybe would have expected at least the top level object to
be
transmitted. Not sure, maybe an SDO error is preventing it.
When I get
a little time later I'll give this sample a spin and see if
it works
for me. Just though I would post this now in case it helps.
Regards
Simon
--~--~---------~--~----~------------~-------~--~----~
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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-08 06:33:38 |
Hi Simon,
Thanks for the reply. I tried populating as you recommended
with the
same result. Forgive my ignorance, is their an easy way to
dump the
contents of the SDO object to see it's contents?
Thanks,
Mike
> -----Original Message-----
> From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> Behalf Of simonslaws googlemail.com
> Sent: May 8, 2007 5:59 AM
> To: phpsoa
> Subject: [phpsoa] Re: Representing Associative Arrays
in SCA Result
>
>
>
> Hi Mike
>
> It's possible that the way that the SDO is being
populated is causing
> problems here. I tend to create each layer in the
complex type
> hierarchy separately. So, for example, the code would
look something
> like...
>
> // create the top level object
> $restorations = SCA::createDataObject('http://restorations',
> 'restorations');
>
> // create the first child, automatically adding
it into
> $restorations
> $restoration =
$restorations->createDataObject('restoration');
> $restoration['id'] = 1;
> $restoration['description'] = 'test';
>
> // create the first child, automatically adding
it into
> $restorations
> $restoration =
$restorations->createDataObject('restoration');
> $restoration['id'] = 201;
> $restoration['description'] = 'test 2';
>
> return $restorations;
>
> Having said this it's not clear why you result was
completely empty as
> I maybe would have expected at least the top level
object to be
> transmitted. Not sure, maybe an SDO error is preventing
it. When I get
> a little time later I'll give this sample a spin and
see if it works
> for me. Just though I would post this now in case it
helps.
>
> Regards
>
> Simon
>
>
> 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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-08 07:19:58 |
Hi Simon,
With infinite skill and knowledge, I figured out that you
can dump the
contents of the SDO_DataObject with print_r Turns out
the object is
being populated just fine using the new method you outlined.
The
breakdown appears to be somewhere around
SCA_Bindings_soap_ServiceRequestHandler::handle(). The
result set is
properly being cast to XML right before then.
For what it is worth, attached is the trace log. I'm going
to poke
around some more.
Mike
> -----Original Message-----
> From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> Behalf Of Caplan, Michael
> Sent: May 8, 2007 8:34 AM
> To: phpsoa googlegroups.com
> Subject: [phpsoa] Re: Representing Associative Arrays
in SCA Result
>
>
> Hi Simon,
>
> Thanks for the reply. I tried populating as you
recommended with the
> same result. Forgive my ignorance, is their an easy
way to dump the
> contents of the SDO object to see it's contents?
>
> Thanks,
>
> Mike
>
>
> > -----Original Message-----
> > From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> > Behalf Of simonslaws googlemail.com
> > Sent: May 8, 2007 5:59 AM
> > To: phpsoa
> > Subject: [phpsoa] Re: Representing Associative
Arrays in SCA Result
> >
> >
> >
> > Hi Mike
> >
> > It's possible that the way that the SDO is being
populated is
causing
> > problems here. I tend to create each layer in the
complex type
> > hierarchy separately. So, for example, the code
would look something
> > like...
> >
> > // create the top level object
> > $restorations = SCA::createDataObject('http://restorations',
> > 'restorations');
> >
> > // create the first child, automatically
adding it into
> > $restorations
> > $restoration = $restorations-
> >createDataObject('restoration');
> > $restoration['id'] = 1;
> > $restoration['description'] = 'test';
> >
> > // create the first child, automatically
adding it into
> > $restorations
> > $restoration = $restorations-
> >createDataObject('restoration');
> > $restoration['id'] = 201;
> > $restoration['description'] = 'test 2';
> >
> > return $restorations;
> >
> > Having said this it's not clear why you result was
completely empty
> as
> > I maybe would have expected at least the top level
object to be
> > transmitted. Not sure, maybe an SDO error is
preventing it. When I
> get
> > a little time later I'll give this sample a spin
and see if it works
> > for me. Just though I would post this now in case
it helps.
> >
> > Regards
> >
> > Simon
> >
> >
> > 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.
>
> 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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-08 08:37:33 |
Hi Simon,
FYI, the issue is now resolved. As far as I can tell, the
problem was
two fold.
1) The method I was using to populate the SDO_DataObject
was no working
2) After changing that, I also changed the data built out
in the data
object. Some of my data was not properly escaped
(ampersand), making
the XML invalid. An htmlspecialchars fixed that up, and now
I have data
being returned.
Thanks again Simon!
Best,
Mike
> -----Original Message-----
> From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> Behalf Of Caplan, Michael
> Sent: May 8, 2007 9:20 AM
> To: phpsoa googlegroups.com
> Subject: [phpsoa] Re: Representing Associative Arrays
in SCA Result
>
> Hi Simon,
>
> With infinite skill and knowledge, I figured out that
you can dump the
> contents of the SDO_DataObject with print_r Turns out
the object
> is being populated just fine using the new method you
outlined. The
> breakdown appears to be somewhere around
> SCA_Bindings_soap_ServiceRequestHandler::handle(). The
result set is
> properly being cast to XML right before then.
>
> For what it is worth, attached is the trace log. I'm
going to poke
> around some more.
>
> Mike
>
>
> > -----Original Message-----
> > From: phpsoa googlegroups.com [mailto:phpsoa googlegroups.com] On
> > Behalf Of Caplan, Michael
> > Sent: May 8, 2007 8:34 AM
> > To: phpsoa googlegroups.com
> > Subject: [phpsoa] Re: Representing Associative
Arrays in SCA Result
> >
> >
> > Hi Simon,
> >
> > Thanks for the reply. I tried populating as you
recommended with
the
> > same result. Forgive my ignorance, is their an
easy way to dump the
> > contents of the SDO object to see it's contents?
> >
> > Thanks,
> >
> > Mike
> >
> >
> > > -----Original Message-----
> > > From: phpsoa googlegroups.com
[mailto:phpsoa googlegroups.com] On
> > > Behalf Of simonslaws googlemail.com
> > > Sent: May 8, 2007 5:59 AM
> > > To: phpsoa
> > > Subject: [phpsoa] Re: Representing
Associative Arrays in SCA
Result
> > >
> > >
> > >
> > > Hi Mike
> > >
> > > It's possible that the way that the SDO is
being populated is
> causing
> > > problems here. I tend to create each layer in
the complex type
> > > hierarchy separately. So, for example, the
code would look
> something
> > > like...
> > >
> > > // create the top level object
> > > $restorations =
> SCA::createDataObject('http://restorations',
> > > 'restorations');
> > >
> > > // create the first child,
automatically adding it into
> > >$restorations
> > > $restoration = $restorations-
> > >createDataObject('restoration');
> > > $restoration['id'] = 1;
> > > $restoration['description'] =
'test';
> > >
> > > // create the first child,
automatically adding it into
> > >$restorations
> > > $restoration = $restorations-
> > >createDataObject('restoration');
> > > $restoration['id'] = 201;
> > > $restoration['description'] = 'test
2';
> > >
> > > return $restorations;
> > >
> > > Having said this it's not clear why you
result was completely
empty
> > as
> > > I maybe would have expected at least the top
level object to be
> > > transmitted. Not sure, maybe an SDO error is
preventing it. When I
> > get
> > > a little time later I'll give this sample a
spin and see if it
> works
> > > for me. Just though I would post this now in
case it helps.
> > >
> > > Regards
> > >
> > > Simon
> > >
> > >
> > > 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.
> >
> > 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.
>
> 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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Representing Associative Arrays in
SCA Result |
  United States |
2007-05-08 09:06:19 |
Hi Mike
Thanks for letting me know. Glad you were successful. It's
nice to
get feedback so keep asking the questions when you feel the
need
Regards
Simon
--~--~---------~--~----~------------~-------~--~----~
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
phpsoa-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
[1-9]
|
|