<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt></tt>Jason T. Greene wrote:
<blockquote
 cite="midC2CDEFBECFC9A14892BCCFB4C95F48680B4BDBC1@EX-201.mail.navisite.com"
 type="cite">
  <pre wrap="">This relates one of the big complaints (which was ignored) I had with
the JAX-WS spec before it was released. (Bill raised it as part of the
Java EE spec and EJB3 specs). The behavior Heiko implemented is actually
inline with the rest of EJB3 (@Remote, @Local). 

The current spec behavior for @WebService is clumsy, and error prone.

The spec requires you to specify endpointInterface using a string! So a
simple refactor moving the interface would break the WS deployment.
  </pre>
</blockquote>
@WebService (endpointInterface = MySEI.class.getName())<br>
<blockquote
 cite="midC2CDEFBECFC9A14892BCCFB4C95F48680B4BDBC1@EX-201.mail.navisite.com"
 type="cite">
  <pre wrap="">Also, it's normal java practice to actually implement the interface. So
the information for which interface to use is right there, in the
implements line. Further, if someone doesn't specify endpointInterface
by accident, and yet they do implement the endpointInterface, then it
will be ignored but the deployment will still work (since the bean class
is used). However, this will be confusing to the user, because they will
potentially get different output since all of the specialized
annotations are on the interface.
  </pre>
</blockquote>
The deployment should fail because there is no @WebMethod on the bean<br>
<blockquote
 cite="midC2CDEFBECFC9A14892BCCFB4C95F48680B4BDBC1@EX-201.mail.navisite.com"
 type="cite">
  <pre wrap="">
So even though I agree that this is how it SHOULD have been implemented,
it's just not that way in the spec, so if we add the interface search,
we still have to keep the spec behavior. The combination of the two
creates situations (although odd ones) that would fail on our stack but
work on others.

For example:

@WebService
@HandlerChain(file = "server-handlers.xml")
public class FooImpl implements Foo {}

@WebService
@HandlerChain(file = "client-handlers.xml")
public class Foo
{}

In this peculiar case, we have 2 definitions, the server side, and the
client side. They must be different because they specify different
handlers, thus endpointInterface is not specified. However, to ensure
consistency the server side implements the client side. It can however
be fixed on our stack by removing the implements line.

So the question is it worth it to add this behavior, which would only
work on our stack? Perhaps the better solution is to push it on a
maintenance release of the spec.
  </pre>
</blockquote>
No, it should be added. We only look at the SEI when we see
@WebService((endpointInterface="")<br>
otherwise the deployment should fail. In that case there cannot be a
@MebMethod on the bean.<br>
<br>
@WebService, @WebMethod, @HandlerChain, etc go together. This is a
simple rule and simple is beautiful ;-)<br>
<blockquote
 cite="midC2CDEFBECFC9A14892BCCFB4C95F48680B4BDBC1@EX-201.mail.navisite.com"
 type="cite">
  <pre wrap="">
-Jason

  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: Thomas Diesler [<a class="moz-txt-link-freetext" href="mailto:thomas.diesler@redhat.com">mailto:thomas.diesler@redhat.com</a>]
Sent: Friday, November 17, 2006 2:17 AM
To: Jason T. Greene
Cc: Heiko Braun; <a class="moz-txt-link-abbreviated" href="mailto:jbossws-dev@lists.jboss.org">jbossws-dev@lists.jboss.org</a>
Subject: Re: [jbossws-dev] JSR181 Changes added in async changes


IMO this is fuzzy logic and should be avoided.
There should at least be a comment that states the compelling reason
    </pre>
  </blockquote>
  <pre wrap=""><!---->to
  </pre>
  <blockquote type="cite">
    <pre wrap="">do this guess-work.

Jason T. Greene wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Heiko,

I noticed the following change, which adds some non spec compliant
behavior. I am not against it, but we probably should all discuss
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->this
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">further before we decide to do it. Do you have anything right now
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->that
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">depends on it?

Also, it breaks the JSR181HandlerTestCase (although I will change
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->the
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">test in the mean time)

          if (anWebService.endpointInterface().length() &gt; 0)
          {
             seiName = anWebService.endpointInterface();
             seiClass = udi.classLoader.loadClass(seiName);
             anWebService =
(WebService)seiClass.getAnnotation(WebService.class);
+
             if (anWebService == null)
                throw new WSException("Interface does not have a
@WebService annotation: " + seiName);
          }
+         else
+         {

+            WebService seiAnnotation = null;
+
+            for(Class potentialSEI : sepClass.getInterfaces())
+            {
+
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->if(potentialSEI.isAnnotationPresent(WebService.class))
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">+               {
+                  seiClass = potentialSEI;
+                  seiName = seiClass.getName();
+                  seiAnnotation =
sepClass.getAnnotation(WebService.class);
+                  break;
+               }
+            }
+
+            if(seiAnnotation!=null)
+               anWebService = seiAnnotation;
+         }
+

xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jason T. Greene
Senior Software Engineer
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx


_______________________________________________
jbossws-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbossws-dev@lists.jboss.org">jbossws-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbossws-dev">https://lists.jboss.org/mailman/listinfo/jbossws-dev</a>

      </pre>
    </blockquote>
    <pre wrap="">--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
</pre>
</body>
</html>