Explanation: Some new fields have been added to the 3rd party system and we got a new WSDL file. Instead of generating a new wsdl2apex class, we needed to make changes to the same wsdl2apex class because it is already in use at multiple places. We generated a new wsdl2apex class and copied the extra code from it to the old wsdl2apex class.
Problem: While sending data from salesforce to the third party system, the old field values are received correctly but the new field values are not received. On debugging, I found out that all field values are populated in salesforce while sending.
Example: The third party system has 5 old fields and 2 new fields in WSDL. I generate a new wsdl2apex class and copy extra code to the old wsdl2apex class. I populate all the 7 fields and send them to the 3rd party system from salesforce. I debug and see that all field values are populated in salesforce and sent. In the 3rd party system, I receive values of only 5 old fields and not of the 2 new fields. The 3rd party system is SAP. I am not able to figure out why it's happening. Am I missing something? Please guide. Thankyou.
Things I tried:
- There is no problem with the target endpoint as the 5 old values are received by the 3rd party system.
- Generating new wsdl2apex class with the same name doesn't work
- Creating a different version of webservice doesn't work