No real choice. It's important to really understand the context in Europe right now. France is very keen to ditch the US "security umbrella" in Europe and push ahead with a EU defence alliance. Germany is more cautious, and wants the US to be there in the event that the Baltics or Ukraine go completely kablooey, at least until such time as more consensus has emerged about the shape and scope of a more structure EU defence alliance (some of this is in place such as the CEDP and numerous joint development projects such as the A400M, but it's not mature and Germany doesn't feel ready to rely on it just yet).
As such Germany really needs to keep the US engaged in Europe by demonstrating some degree of willingness to toe the line on Americas wider empire building ambitions in the western pacific, even though Germany herself has zero interest in them.
In that context, giving the Germans a welcome in Shanghai could be a good way demonstrating that China understands the German predicament, and is ready to engage with them once they feel able to drop the American "umbrella". Ideally make it part of a reciprocal visit. A PLAN ship passing through the Danish straits on a visit to Rostock could be a strong symbol of Sino-European friendship while demonstrating to the US that Europe is an independent security actor in her own right and has no need of an American "umbrella" anymore.