The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Don Stadler (74) [Avatar] Offline

I have run into a problem with the WSAddressingTransformer class. The problem is that it will not compile in any of the Mule targets unless a fix is applied. The compile fails with a message that the method getOriginalPayload() is not found. This is found in the following line.

MessageImpl msg = (MessageImpl) ((CxfMessageAdapter)adapter).getOriginalPayload();

There is a class named CxfMessageAdapter in the src-override area of the workspace which is apparently meant to be compiled and inserted somewhere, but this is not occuring.

I applied a fix to the class by creating an alternate class of CxfMessageAdapter in the esb.chapter7 package named CxfAltMessageAdapter and invoked that, which passes the compile.

MessageImpl msg = (MessageImpl) ((CxfAltMessageAdapter)adapter).getOriginalPayload();

But the alternate class fails in the test client with the following message:

<soap:Envelope xmlns:soap=""><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>org.mule.transport.cxf.CxfMessageAdapter cannot be cast to esb.chapter7.CxfAltMessageAdapter</faultstring></soap:Fault></soap:Body></soap:Envelope>

I have to leave the fix in place to allow the other chapter 7 targets to compile, but the override obviously needs to be inserted into a jar or the wsa example cannot work.

Message was edited by:
Don Stadler
ds5555 (4) [Avatar] Offline
Re: Chapter 7 WS-Addressing example for Mule

This continues to be a problem. I created the hack workaround which makes most of the Mule examples work, but WS-Addressing will not work because of the casting problem