Hi Mark,
JSR181 has been updated to detail the use of targetNameSpace attribute.
Please refer to
http://jcp.org/aboutJava/communityprocess/maintenance/jsr181/181ChangeLog.html, item 19. This change was implemented in Glassfish late last week.
So in your sample case, since there is no targetNameSpace attribute in
@WebService of endpoint impl class, we have to derive the
targetNameSpace from its package and use that for the wsdl:service
element while using the targetNameSpace attribute in SEI for the
wsdl:portType.
Hope this helps
Vijay
On Tue, 2006-02-14 at 11:51, mark_at_javector.com wrote:
> I rebuilt glassfish last night (Feb 13th) and some of my sample apps are no
> longer working. It seems as if the way that the container interprets the
> @WebService annotation has changed.
>
> I have the following service implementation bean:
>
> @WebService(
> endpointInterface="com.example.req.RequestOrderPort",
> wsdlLocation="WEB-INF/wsdl/RequestOrder.wsdl")
> public class RequestOrder implements RequestOrderPort {
>
> With the following service endpoint interface (SEI):
>
> @WebService(
> name = "RequestOrderPort",
> targetNamespace = "http://www.example.com/req",
> wsdlLocation = "WEB-INF/wsdl/RequestOrder.wsdl")
> public interface RequestOrderPort {
>
> This used to work OK. Glassfish, when deploying the service implementation bean
> would look to the annotations on the SEI (e.g., for targetNamespace) as the
> basis for deployment. So, in this case, my web service would be deployed in
> the namespace http://www.example.com/req.
>
> However, with the build of Glassfish from Feb 13th, this same sample app is now
> getting deployed in teh namespace http://samples. That is the default for the
> service implementation bean - which has a package of simply 'samples'. So,
> Glassfish is no longer reading the targetNamespace from the SEI annotations.
>
> According to my reading of JSR-181, the current Glassfish implementation of
> @WebService for a service implementation bean is wrong. I think that the
> targetNamespace should be taken from the annotations on the SEI.
>
> Per JSR-181 pg 16 (Sec 4.1.1) ...
> "[The endpointInterface attribute provides] the complete name of the service
> endpoint interface defining the service's abstract Web Service contract. The
> annotatnion allows the developer to sparate the interface contract from the
> implementaion. If this annotatnion is present, the service endpoint interface
> is used to determine the abstract WSDL contract (portType and bindigns). ...."
>
> Of course, I could be wrong about this. It wouldn't be the first time that I've
> misread the specs :-)
>
> Can anyone shed some light on this issue?
>
> -- Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>