Hi Liu, Find my response inline:
> -----Original Message----- > From: Liu, Jervis [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 19, 2007 8:35 PM > To: [email protected] > Subject: RE: Generic Provider<DOMSource> server and WSDL metadata > > Hi Dhiraj, it looks like sth wrong in your WSDL, most likely the service > name defined in your WSDL does not match with the service name specificed > in your spring cfg file. > [Bokde, Dhiraj] I added the metadata parameters to the @WebServiceProvider annotation and the application worked as I expected. In other words, when the WSDL information is compiled in the annotation, the published WSDL is the original WSDL being referenced and the JAX-WS properties WSDL_SERVICE, etc. point to the application's WSDL. When the annotation does not have the WSDL information, I see the exception I had attached before. If the JAX-WS 'endpoint' element does not have the service name and port name and the annotation is empty (@WebServiceProvider()), CXF looks for a Service named 'GenericMessageProviderService' with a WSDL operation 'invoke' in the WSDL provided in wsdlLocation in the 'endpoint' element. In other words, if the annotation does not have any WSDL meta-data, CXF assumes that the application is SEI and not Provider based (despite the fact that 'GenericMessageProvider' implements Provider). > BTW, I don't really get the reason why you want to access to the WSDL > metadata like wsdlLocation, serviceName, portName, operation name etc. > JAX-WS SEI is WSDL-centric, there is always a direct mapping between SEI's > java types/method and WSDL's types/operations, i.e., you look at the WSDL, > then you know what kind of request is a valid request that can be sent to > server. JAX-WS Provider/Dispatch interface however, is not WSDL-centric, > you do not need a wsdl at all to work with a Provider server. The only > thing a client who wants to invoke a Provider service need to know is the > service publishing address. Of course, you can still specify a WSDL > through @WebServiceProvider() or spring configuration, but your Provider > service is not bound by this WSDL. In another word, WSDL metadata info > like wsdlLocation, serviceName, portName, operation name for Provider are > no use and should not be used. > [Bokde, Dhiraj] This is needed in generic XML oriented frameworks where the user needs the ability to use the Provider interface to avoid having to generate Java code from WSDL, but still needs the ability to work with a WSDL. For example, it may need to verify compliance of messages with the underlying WSDL, basically use Service meta-data that can only come from a WSDL. I don't believe the use case is the real issue here. My questions are: Is the annotation supposed to be the only source of WSDL metadata for a JAX-WS Provider based server? Or, is the JAX-WS endpoint element in Spring XML configuration supposed to substitute/override the metadata in the annotation? If so, why isn't it working? If the JAX-WS 'endpoint' element in Spring XML configuration cannot provide/override the info in the annotation, @WebServiceProvider must be one of those poor 'compile time only' configuration mechanisms of the JAX-WS framework. Thanks, Dhiraj.
