Ok so checking this project I have some useless libs:

ยป ls target/tomeeNetbeansWS-1.0-SNAPSHOT/WEB-INF/lib/
javax.annotation-api-1.2-b03.jar  webservices-api-2.3.jar
 webservices-rt-2.3.jar

So here what I did:

1. remove webservices-rt from pom.xml
2. removed sun-*xml
3. changed web.xml to (mapps the pojo webservices instead of using
metro/glassfish descriptors):

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd";>
    <servlet>
        <servlet-name>NewWebService</servlet-name>
        <servlet-class>com.ex.webservices.NewWebService</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>NewWebService</servlet-name>
        <url-pattern>/NewWebService</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
</web-app>

4. added a beans.xml in WEB-INF (can be empty or just <beans/>): this is
cause without CDI 7.0.0 has a bug leading to a NPE, it is fixed for the
7.0.2

Here is a complete diff:
https://gist.github.com/rmannibucau/722a9157fec6eb7606fff206358d604a



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-06-26 17:56 GMT+02:00 Rourke <[email protected]>:

> Thanks.  I have created this:
> https://github.com/Rourke101/tomEEexample.git
>
> Which is the simplest thing I could do:
> - Create project on Github
> - Clone in Netbeans and open as a Maven project - Web Application
> - Use TomEE 7 (plume) and JEE 7
> - New - Web Services
> - Click "yes" to the non-jsr109 message asking to create web.xml and
> sun-javaws.xml
>
> This does not have any JSF stuff but it gave me errors nonetheless. If I
> try
> a couple of times to run it, I succeed (with errors in the logs).
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-and-Web-Services-tp4679025p4679067.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to