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

Exposing variables as attributes in a web service instead of elements

when we use


webservice <datatype> <variablename>


it gets exposed as a element in the WSDL. However I need to expose it as a attribute.


Any idea how can I do that?






There's no options to control the serialization, it will always use elements.

Thanks Simon.




i think i have query that is similar to this post.

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 now ..
please advice