Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

ColdFusion web service: semantic error(s) in generated XML content

$
0
0

I have created a component with properties called employee.cfc

<cfcomponent><cfproperty name="FirstName" type="string"><cfproperty name="LastName" type="string"></cfcomponent>

 

I have a web service that receives an array of employees to update: the saveEmployees() function has this argument:

 

<cfargument name="employees" type="employee[]" required="true">

 

the getSOAPRequest() method call renders a SOAP envelope with the following inner structure for the employees:

 

<employees soapenc:arrayType="ns2:employee[2]" xmlns:ns2="http://soap.mynamespace.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:Array"><employees xsi:type="ns2:employee"><firstName xsi:type="xsd:string">
Mark</firstName><lastName xsi:type="xsd:string">
Smith</lastName></employees><employees xsi:type="ns2:employee"><firstName xsi:type="xsd:string">
John</firstName><lastName xsi:type="xsd:string">
Doe</lastName></employees></employees>

 

Maybe this is just semantics, but why doesn't it create the inner elements of the

<employees>

tag as

<employee>

(singular)

as specified in type of my argument?

Any way to achieve this so that the rendered requests and other service methods will return XML that is as self-describing as possible?


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>