Discussion:
SDO_Model_ReflectionDataObject
Silvano Girardi Jr
2008-01-09 16:52:35 UTC
Permalink
Hi guys,
I am experiencing problems with the SDO_Model_ReflectionDataObject.

What I am trying to do is to get the instance properties.
When I call the method getInstanceProperties() it returns null, although the
method ::export() shows me the SDO.

<code>
$obj_customer = SCA::createDataObject("http://example.org", "Customers");
$obj_reflection = new SDO_Model_ReflectionDataObject($obj_customer);
var_dump($obj_customer); // returns null
var_dump($obj_customer->getInstanceProperties()); // returns null
SDO_Model_ReflectionDataObject::export($obj_customer); // see next lines
</code>
object(SDO_Model_ReflectionDataObject)#54 {
- ROOT OBJECT
- Type <dataObject> http://example.org#CustomerPlans
- Instance Properties[1] {
http://example.org#SinglePlan $Plans[] {
commonj.sdo#Integer $plan_id;
commonj.sdo#String $name;
}
}
}

XSD is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="
http://example.org" xmlns:tns="http://example.org">
<xs:complexType name="SinglePlan">
<xs:sequence>
<xs:element name="plan_id" type="xs:integer" />
<xs:element name="name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="CustomerPlans">
<xs:complexType>
<xs:sequence>
<xs:element name="Plans" type="tns:SinglePlan" maxOccurs="unbounded"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


I see that if I use the SDO_Model_ReflectionDataObject's
getInstanceProperties method for an argument of type SDO_DataObject it works
fine.

What am I doing wrong? :)

Thanks,
Silvano

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Silvano Girardi Jr
2008-01-09 18:10:56 UTC
Permalink
Nevermind this one. It works fine. I was actually using the var_dump inside
the error_log() :P print_r() showed them fine.

Sorry.
Silvano
Post by Silvano Girardi Jr
Hi guys,
I am experiencing problems with the SDO_Model_ReflectionDataObject.
What I am trying to do is to get the instance properties.
When I call the method getInstanceProperties() it returns null, although
the method ::export() shows me the SDO.
<code>
$obj_customer = SCA::createDataObject(" http://example.org",
"Customers");
$obj_reflection = new SDO_Model_ReflectionDataObject($obj_customer);
var_dump($obj_customer); // returns null
var_dump($obj_customer->getInstanceProperties()); // returns null
SDO_Model_ReflectionDataObject::export($obj_customer); // see next lines
</code>
object(SDO_Model_ReflectionDataObject)#54 {
- ROOT OBJECT
- Type <dataObject> http://example.org#CustomerPlans
- Instance Properties[1] {
http://example.org#SinglePlan $Plans[] {
commonj.sdo#Integer $plan_id;
commonj.sdo#String $name;
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema" targetNamespace="
http://example.org" xmlns:tns="http://example.org ">
<xs:complexType name="SinglePlan">
<xs:sequence>
<xs:element name="plan_id" type="xs:integer" />
<xs:element name="name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="CustomerPlans">
<xs:complexType>
<xs:sequence>
<xs:element name="Plans" type="tns:SinglePlan"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I see that if I use the SDO_Model_ReflectionDataObject's
getInstanceProperties method for an argument of type SDO_DataObject it works
fine.
What am I doing wrong? :)
Thanks,
Silvano
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...