This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Can you confirm that the org.openuri.www.AttachmentsSoap class/interface implements/extends com.bt.btw.ripple.attachment.Attachments? This is the most obvious explanation, so it'd be good to rule it out before exploring complex possibilities. =)

Thanks.

Comment

Perhaps org.openuri.www.AttachmentsSoap is a concret class that got proxied? This type of exception usually indicates that. If its a concrete class, then perhaps you need to use cglib to proxy classes instead of using JDK proxies.

Comment

Can you confirm that the org.openuri.www.AttachmentsSoap class/interface implements/extends com.bt.btw.ripple.attachment.Attachments? This is the most obvious explanation, so it'd be good to rule it out before exploring complex possibilities. =)

Thanks.

AttachmentsSoap is an portName, it extends java.rmi.Remote as it is supposed to be. Attachments is a service name which contains methods to return Attachements soap.
If you would like me to post WSDL file, I would be happy to post it for you.

Comment

Perhaps org.openuri.www.AttachmentsSoap is a concret class that got proxied? This type of exception usually indicates that. If its a concrete class, then perhaps you need to use cglib to proxy classes instead of using JDK proxies.

How do we choose cglib instead of JDK proxy? I have included cglib in my classpath.

Comment

Well, this is pretty much what the error message is saying to you: "You want to inject a org.openuri.www.AttachmentsSoap instance to the 'service' property, but I only have a $Proxy0, which doesn't have a compatible interface."

The interface that the $Proxy0 implements is com.bt.btw.ripple.attachment.Attachments, as this is what's specified as the 'serviceInterface' property of the bean factory that produces it.

From this information, it seems to me that we can deduce that com.bt.btw.ripple.attachment.Attachments can't be cast to org.openuri.www.AttachmentsSoap - and this is the fundamental problem.

As far as I can tell, it's not possible to instruct the JaxRpcPortProxyFactoryBean to explicitly use a different proxy strategy... someone else probably knows better than me on this though.

I wish I had more experience playing around with SOAP stuff in Spring so I could actually help instead of guessing... I'll keep an eye on this thread though, since it's interesting to see what the fix is!