You cannot change the default target namespace of a schema generated by native SAP adapter. Otherwise, an ‘Invalid IDoc’ error is returned.
Sometimes, we have to call RFCs with the same name through multiple SAP clients. In this case, we cannot use the same generated schema by SAP adapter because the flat file returned from the SAP clients are usually in different formats. You must generate different schemas and specify a new target namespace for the new schemas to be successfully deployed.
However, after changing target namespace, you may find the SAP adapter reports the following error when processing the RFC request.
This is because SAP Adapter checks if Target Namespace contains string: “schemas.microsoft.com” to identify if the request message is a RFC request. If not, it processes the request as IDoc.
The work around is only change the part of Target Namespace after string “schemas.microsoft.com”. For exmaple: