- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Imported WSDL but cannot set the text value of
"simpleContent" XML Elements. See WSDL element definition and
sample code below:
// WSDL Element Definition
/*
<xsd:element maxOccurs="1" minOccurs="0"
name="OpportunityName" type="xsdLocal2:queryType"/>
…
<xsd:complexType name="queryType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="sortorder" type="xsd:string"/>
<xsd:attribute name="sortsequence" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
*/
// Instantiate object
var opptyQuery:OpportunityQuery = new OpportunityQuery();
// Instantiate type
opptyQuery.OpportunityName = new QueryType();
// Set attribute values
opptyQuery.OpportunityName.sortorder = "ASC";
opptyQuery.OpportunityName.sortsequence = "1";
Resulting XML output
<xsdLocal2:OpportunityName xsi:nil="true" sortorder="ASC"
sortsequence="1"/>
Desired XML output:
<xsdLocal2:OpportunityName sortorder="ASC"
sortsequence="1">Acme Inc*</xsdLocal2:OpportunityName>
What is the ActionScript code required to generate the
desired XML output?
Thanks!
"simpleContent" XML Elements. See WSDL element definition and
sample code below:
// WSDL Element Definition
/*
<xsd:element maxOccurs="1" minOccurs="0"
name="OpportunityName" type="xsdLocal2:queryType"/>
…
<xsd:complexType name="queryType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="sortorder" type="xsd:string"/>
<xsd:attribute name="sortsequence" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
*/
// Instantiate object
var opptyQuery:OpportunityQuery = new OpportunityQuery();
// Instantiate type
opptyQuery.OpportunityName = new QueryType();
// Set attribute values
opptyQuery.OpportunityName.sortorder = "ASC";
opptyQuery.OpportunityName.sortsequence = "1";
Resulting XML output
<xsdLocal2:OpportunityName xsi:nil="true" sortorder="ASC"
sortsequence="1"/>
Desired XML output:
<xsdLocal2:OpportunityName sortorder="ASC"
sortsequence="1">Acme Inc*</xsdLocal2:OpportunityName>
What is the ActionScript code required to generate the
desired XML output?
Thanks!
Views
Replies
0 Likes
Total Likes