You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by slawek <s....@gmail.com> on 2012/03/01 04:36:34 UTC

Re: simple-webservice on eclise

I use URL like http://localhost:8080/app-name/ClassName?wsdl

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4433942.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: simple-webservice on eclise

Posted by Romain Manni-Bucau <rm...@gmail.com>.
np,

not sure what is your issue exactly but personaly when i was using eclipse
(i now use Idea) i was using m2eclipse integration with WTP and it was
building my war as expected.

Maybe just an eclipse config mistake?

- Romain


2012/3/2 slawek <s....@gmail.com>

> Hello,
>
> The problem was solved! Follow your advice I deploy simple-webservice
> directly copy jar to tomee - and it works. But I was stil confused becouse
> i
> can't develop and deploy application in easy way using Dynamic Web Project.
> Finnaly I discover that when i drop all libraries from WEB-INF\lib (my
> classes are in WEB-INF\class) it works.
> Next step is to set up connection to db and return data from db via web
> service. I hope that will take me less time that webservices:)
>
> Thanks Romain for you help!
>
> Best Regards
> sw
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4436858.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: simple-webservice on eclise

Posted by slawek <s....@gmail.com>.
Hello,

The problem was solved! Follow your advice I deploy simple-webservice
directly copy jar to tomee - and it works. But I was stil confused becouse i
can't develop and deploy application in easy way using Dynamic Web Project.
Finnaly I discover that when i drop all libraries from WEB-INF\lib (my
classes are in WEB-INF\class) it works. 
Next step is to set up connection to db and return data from db via web
service. I hope that will take me less time that webservices:)

Thanks Romain for you help!

Best Regards
sw



--
View this message in context: http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4436858.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: simple-webservice on eclise

Posted by Romain Manni-Bucau <rm...@gmail.com>.
To run it i did it:

Create an dir test, create test/WEB-INF, create WEB-INF/classes, create
test/WEB-INF/lib copy simple-webservices.jar in lib.

Start tomee.

No need to play with cxf, it iq done for you.

Le 1 mars 2012 20:06, "slawek" <s....@gmail.com> a écrit :

> So, i haven't idea what i do wrong. Mayby i write it steb by step.
> - create new Dynamic Web Project in Eclipse Java EE IDE for Web Developers
> -
> indigo
> - modify configuration, add cxf 2
> - create package org.superbiz.calculator.ws
> - create in above package session bean named Calculator and paste sample
> code
> - create in above package interface CalculatorWs and paste sample code
> - add require libraries to project (openejb)
> - run as tommee server (first i did modyfication follow page:
> http://lorands.com/2010/11/debuging-openejbs-tomee-with-eclipse-wtp/)
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4435844.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: simple-webservice on eclise

Posted by slawek <s....@gmail.com>.
So, i haven't idea what i do wrong. Mayby i write it steb by step.
- create new Dynamic Web Project in Eclipse Java EE IDE for Web Developers -
indigo
- modify configuration, add cxf 2
- create package org.superbiz.calculator.ws
- create in above package session bean named Calculator and paste sample
code
- create in above package interface CalculatorWs and paste sample code
- add require libraries to project (openejb)
- run as tommee server (first i did modyfication follow page:
http://lorands.com/2010/11/debuging-openejbs-tomee-with-eclipse-wtp/)

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4435844.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: simple-webservice on eclise

Posted by Romain Manni-Bucau <rm...@gmail.com>.
using http://localhost:8080/test/webservices/Calculator?wsdl (my webapp is
called test) works.

here is my code:

@Test
    public void test() throws Exception {
        Service calculatorService = Service.create(
                new URL("
http://localhost:8080/test/webservices/Calculator?wsdl"),
                new QName("http://superbiz.org/wsdl", "CalculatorService"));

        assertNotNull(calculatorService);

        CalculatorWs calculator =
calculatorService.getPort(CalculatorWs.class);
        assertEquals(10, calculator.sum(4, 6));
        assertEquals(12, calculator.multiply(3, 4));
    }

- Romain


2012/3/1 slawek <s....@gmail.com>

> Hello,
>
> Unfortunetly bellow links are incorrect. I think problem is connected with
> information:
>
> ...
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> Failed to create service.
> ...
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> ...
>
> This message was generated by junit test. But when I try to see wsdl file
> via browser, errors aren't generate.
>
> Thank for help.
>
> Best Regards
> sw
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4434759.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: simple-webservice on eclise

Posted by slawek <s....@gmail.com>.
Hello,

Unfortunetly bellow links are incorrect. I think problem is connected with
information:

... 
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service. 
... 
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog 
... 

This message was generated by junit test. But when I try to see wsdl file
via browser, errors aren't generate. 

Thank for help.

Best Regards
sw


--
View this message in context: http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4434759.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: simple-webservice on eclise

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you check the logs?

if you are using a version a bit old it is
http://localhost:8080/ClassName?wsdl<http://localhost:8080/app-name/ClassName?wsdl>
otherwise
it is http://localhost:8080/app-name/webservices/ClassName?wsdl<http://localhost:8080/app-name/ClassName?wsdl>

- Romain


2012/3/1 slawek <s....@gmail.com>

> I use URL like http://localhost:8080/app-name/ClassName?wsdl
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/simple-webservice-on-eclise-tp4432643p4433942.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>