> StringTokenizer st = new StringTokenizer(urlPattern, "/");
> if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot + "/"))
Yes, this is the part which does the damage.
The contextRoot, in the case I am investigating, is the same as the first part of the urlPattern. This means that the generated WSDL contains the wrong endpoint location, as does the JBossWS console, yet the webservice is still deployed at the right location.
So the webservice is actually deployed at /a/a/b but WSDL and WS console report it at /a/b.