Reputation: 10943
I have a set of SOAP services that I call, let's call them the originalApplicationInterfaces that talk to originalApplicationEndpoints. I've been asked to change the SOAP packets to a different format (let's call that sillyInterface) and send it to sillyEndpoints in a different SOAP packet format. The application implementing sillyInterface takes some metadata out converts sillyInterface back to originalApplicationInterface format and sends it to originalEndpoint. The reply travels back through the system.
I have highlighted the fact that we should change sillyInterface to be originalApplicationInterfaces and use soap headers to carry the metadata but it was designed by someone working in the sillyApplication team who knows nothing about programming and only uses SOAP UI. I could tell he was really pleased with his sillyInterface and so is being really awkward about throwing away sillyInterface and implementing originalApplicationInterface like all the enterprise pattern design books advise.
I am reluctant to change every outgoing call to originalApplicationInterface and rejiggle the packet changing it to sillyInterface. There are lots of originalApplicationInterfaces and that will be a lot of work.
I have looked at creating some kind of MessageHandler and hacking the endpoints to sillyEndpoint but this seems like a massive hack that will require constant updates as the interface changes over time or they realise that originalApplicationInterface was a much better way to go. They might even realise that there are about 5 other applications that need to be modified to use sillyInterface in the same way mine has and the disruption it will cause is going to be huge. I just thought if I wrote a originalApplicationInterfaces to sillyInterface converter then we could all use it. Also this will highlight the ridiculousness of sillyInterface and maybe they will give sillyMan a bit more training.
I have decided to create a proxy which implements originalApplicationInterfaces on one side, reads the SOAP message from it's endpoint, rejiggles the packet from the soap headers into the SOAP format for sillyInterface, sends it on to sillyApplication, reads the reply and sends it back to my application.
It's been a while since I've used Spring Integration (XML) and so I thought I'd give Spring Boot Integration a go but I'm struggling with which classes and annotations to use as most of the documentation seems to focus on xml configuration.
Also I want to avoid, if possible, compiling up originalApplicationInterfaces and sillyInterface because I think I can reorganize the packet using soap methods to read the header and xml methods for rejiggling the format and send it straight through.
Any help with this would be greatly appreciated.
Upvotes: 1
Views: 336