[weld-issues] [JBoss JIRA] Commented: (CDITCK-201) InjectionIntoWebServiceEndPointTest bundles incorrect artifacts

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Wed Jan 5 07:30:18 EST 2011


    [ https://issues.jboss.org/browse/CDITCK-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573437#comment-12573437 ] 

Jozef Hartinger commented on CDITCK-201:
----------------------------------------

I got stuck with this issue. I managed to fix the original problem by isolating the ws client from the application server. However, there is a couple of constraints that when combined make it hard to implement the test correctly without larger infrastructure changes.

- Firstly, the TCK currently distinguishes web profile / non web profile tests based on the packaging (only wars are run in web profile environment, while both ear and war tests are run in full config). As a result, the test must be implemented as an EAR.
- The test harness does not let one control which classes go into a war inside the ear. There are actually only two options: either all of the classes in the current package or none are bundled with the ejb jar. (Even @Classes does not let you choose which classes)
- The WS spec recognizes two kinds of web services - annotated POJOs that are registered as servlets and thus allowed to be placed in the web archive only and EJBs, which can be inside the web archive as well as the ejb jar. As a result of poor control of deployment and WS spec restriction, we can only test an EJB WS which makes the entire test weaker.
- While the "servlet" web services can be mapped to a particular URL, the spec does not specify where the WS end point should be available for an EJB web service (and the location really differs between JBoss AS and GF). As a result, the client breaks.

To sum it up, I cannot see a way of implementing the test correctly atm. Changing the deployment packaging to WAR would solve the problem, however, we would need to make infrastructure changes to explicitly exclude the test from the web profile suite somehow.


> InjectionIntoWebServiceEndPointTest bundles incorrect artifacts
> ---------------------------------------------------------------
>
>                 Key: CDITCK-201
>                 URL: https://issues.jboss.org/browse/CDITCK-201
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tests
>    Affects Versions: 1.0.4.CR1
>            Reporter: Jozef Hartinger
>            Assignee: Jozef Hartinger
>             Fix For: 1.0.4.CR2
>
>
> This is a problem with TCK not bundling correct web service artifacts which causes mismatch between client and server. Service has:
>  
> @WebService(name="SheepWS")
> public class SheepWSEndPoint
> {
> ...
>   @WebMethod
>   public boolean testSheepInjected() {
>      return (sheep != null) && initializerCalled;
>   }
> }
> WSDL is created by the runtime/tools  using testSheepInjected() method. So without customizations, wsimport generates the following artifacts from that wsdl:
> WEB-INF/classes/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/TestSheepInjected.class
> WEB-INF/classes/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/TestSheepInjectedResponse.class
> But, the bundled artifacts in the war are :
> WEB-INF/classes/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/IsSheepInjected.class
> WEB-INF/classes/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/IsSheepInjectedResponse.class
> and the annotations in these classes don't reflect what WSDL has(or what service is expecting)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list