function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sandy_salesfdc1sandy_salesfdc1 

exposing a inbound webservice with input xml having xml attribute

In an inbound webservice if want to provide a structure like
<foo bar="baz">bar</foo>
----------------

webservice string foo;

will create a tag like <foo></foo>
how will i introduce an attribute for this tag -bar = "baz"

Is this capability available in sfdc.
please advice

 

_Prasu__Prasu_

Try using DomXML classes for generating the XML. It will provide you option for setting attributes and namespaces and even to parse xml.

sandy_salesfdc1sandy_salesfdc1

Hi Prasanna,

 

Thanks for the response . But DomXML classes will help me create a request message for webservice or parse a xml response.

How can i generate the argument/metadata class which will support attribute for a tag ?.

i want to generate wsdl from this class.

so when the end system hits my service it will be able to pass xml attribute in the req message

 

please advice.

 

Regards,

Sandy

_Prasu__Prasu_

If you have written a webservice in Apex, you should be able to generate the WSDL for that.

 

Check if this helps: http://wiki.developerforce.com/page/Exposing_Service_and_Support_Data_using_Apex_Web_Services

sandy_salesfdc1sandy_salesfdc1

i am femiliar with exposing apex class as webservice.

but i need a way in which the wsdl will have the capability of holding attribute values .