Alternative declaration for EJB-webservices annotations in XML file descriptors in EAP 5.

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Issue

  • Can the EJB-WEBSERVICES annotation @WebContext(urlPattern="/abcd", authMethod="BASIC") be specified in xml file descriptors like ejb-jar.xml or jboss.xml ?
  • This is required when the user is not willing to do a code change to add such annotations in EJB3-WebServices.

Resolution

  • Refering to the AnonSvn link for JAXWSServerMetaDataBuilder.java, at the method processWebContext, this is where JBossWS processes the @WebContext metadata.
  • Unfortunately it does not read anything from any XML document.
  • Contrast to this, is the other method in that class like processEndpointConfig, where it does read from XML files in addition to annotations.
  • This confirms that there is no way for EJB-WEBSERVICES annotation @WebContext(urlPattern="/abcd", authMethod="BASIC") be specified in xml file descriptors like ejb-jar.xml or jboss.xml in EAP 5.
  • This can be done via. jboss-webservices.xml in EAP 6, however, currently there are no plans to backport this functionality to EAP 5.

Root Cause

  • Method processWebContext in JAXWSServerMetaDataBuilder.java does not read anything from any XML document.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.