If you are using AS2 protocol than there is no straight forward way to address this.
You can follow the below approach.
1-> get the stream mime header
2-> convert it to string
3-> update the entry you are looking for ( “name” in your case)
4->After making the changes, convert the string to stream.
In EDIINT:Send, you can call the service which you created ( which handles the above mentioned points) with mimedata as input.
#edi#webMethods#Integration-Server-and-ESB