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
OlTuOlTu 

webservice with order of parameters

Hi,
I have implemented a webservice in Salesforce with the following parameters
webservice static void startSearch(  Organization Organization,
                                            Company Company,                                                             
                                            String Phone,
                                            String Email) {

The consumer got the corresponding WSDL containing the following information:
<xsd:sequence>
      <xsd:element name="Organization" type="tns:Organization" nillable="true"/>
      <xsd:element name="Company" type="tns:Company" nillable="true"/>
      <xsd:element name="Phone" type="xsd:string" nillable="true"/>
      <xsd:element name="Email" type="xsd:string" nillable="true"/>
 </xsd:sequence>
The consumer would like to have a possibility to send parameters in a various order.
Like:
<xsd:sequence>
      <xsd:element name="Phone" type="xsd:string" nillable="true"/>
      <xsd:element name="Email" type="xsd:string" nillable="true"/>
      <xsd:element name="Organization" type="tns:Organization" nillable="true"/>
      <xsd:element name="Company" type="tns:Company" nillable="true"/>
 </xsd:sequence>
OR
<xsd:sequence>
      <xsd:element name="Company" type="tns:Company" nillable="true"/>
      <xsd:element name="Phone" type="xsd:string" nillable="true"/>
      <xsd:element name="Organization" type="tns:Organization" nillable="true"/>
 </xsd:sequence>

Is it possible to modify the apex code in order to meet the requirement?

Thanks!