You cannot change the default target namespace of a schema generated by native SAP adapter. Otherwise, an 'Invalid IDoc' error is returned.

You cannot change the default target namespace of a schema generated by native SAP adapter. Otherwise, an 'Invalid IDoc' error is returned.

Problem:

=======

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.

 

'Invalid IDoc'

 

Cause:

=======

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.

 

Solution:

=======

The work around is only change the part of Target Namespace after string "schemas.microsoft.com". For exmaple:

 

From:

https://schemas.microsoft.com/BizTalk/2003

To: 

https://schemas.microsoft.com/BizTalk/2006