try to use action name to control which method is executed.
On 4/9/07, Callum Haig <[EMAIL PROTECTED]> wrote:
I'm experimenting with splitting my application functionality between an ESB and a web application client, communicating using SOAP. I wish to host the service layer as a service assembly running in Service Mix (which uses Xfire internally). The client uses Spring and is currently running in Jetty. Since I'm a web services novice, and I have control over both the service assembly and client, I'm using annotated Java rather than the WSDL first approach. I was hoping that I could use the same classes developed for the service assembly, for the client. While I can do this, a limitation has me wondering if the broad approach is correct. Here is the interface used within the service assembly: @WebService(name = "Echo", targetNamespace = "http://mycompany.com.au") @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE) public interface EchoService { @WebMethod(operationName = "echo", action = "") @WebResult(name = "EchoResponse", targetNamespace = "http:// mycompany.com.au/types") public String echo( @WebParam(name = "EchoRequest", targetNamespace = "http:// mycompany.com.au/types") String msg); } and the implementation: @WebService(serviceName = "EchoService", targetNamespace = "http:// mycompany.com.au", endpointInterface = "au.com.mycompany.EchoService") public class EchoServiceImpl implements EchoService { private static final Log logger = LogFactory.getLog (EchoServiceImpl.class); public String echo(String in) { logger.debug("EchoServiceImpl.echo() called with arg : "+in); return in; } } Note that the operationName of the @WebMethod annotation is the same as the echo method name. My client code uses the same interface and the XFireClientFactoryBean with the Spring remoting approach documented on the Xfire website. As long as the operationName coincides with the method name (as noted above), the client works, otherwise an exception is thrown complaining of an unknown operation. While this isn't a big limitation, I would like to know if there is a way to control the operation name and other WSDL parameters such as port type used by the client. Alternatively, perhaps someone could suggest a more appropriate approach to use in this situation. Regards, Callum --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
-- ----- When one of our products stops working, we'll blame another vendor within 24 hours. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
