You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@gmail.com> on 2012/02/19 03:50:43 UTC

WebService addresses for embedded EJB Container

I seem to recall we fixed our web service support in TomEE so that the services were "inside" the application rather than at the root.

Would be excellent if we could get the same support in plain OpenEJB.  For example:

    @BeforeClass
    public static void setUp() throws Exception {
        Properties properties = new Properties();
        properties.setProperty(EJBContainer.APP_NAME, "simple-webservice");
        properties.setProperty("openejb.embedded.remotable", "true");
        EJBContainer.createEJBContainer(properties);
    }

    @Test
    public void test() throws Exception {
        Service calculatorService = Service.create(
                new URL("http://127.0.0.1:4204/simple-webservice/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));
    }

Created a jira for it: https://issues.apache.org/jira/browse/OPENEJB-1780

Up for grabs if someone wants to tackle it.

Would be great to have an option to retain the current behavior of putting everything at the root, but nice to have this option so the addresses would match how they look in Tomcat/TomEE.


-David


Re: WebService addresses for embedded EJB Container

Posted by Romain Manni-Bucau <rm...@gmail.com>.
openejb.webservice.old-deployment

For the.failing test it is probably a typo in the context

Le 19 févr. 2012 23:18, "David Blevins" <da...@gmail.com> a écrit :
Excellent.  What property do we use to enable the backwards compatible way?

Also seems the webservice-ws-security is now broken.  Attempted to take a
couple quick guesses as to what could be wrong but am likely going to have
to stop and finish the failover stuff I've been doing.


-David


On Feb 19, 2012, at 10:46 AM, Romain Manni-Bucau wrote:

> almost done it,
>
> simply need to fix ...

Re: WebService addresses for embedded EJB Container

Posted by David Blevins <da...@gmail.com>.
Excellent.  What property do we use to enable the backwards compatible way?

Also seems the webservice-ws-security is now broken.  Attempted to take a couple quick guesses as to what could be wrong but am likely going to have to stop and finish the failover stuff I've been doing.


-David

On Feb 19, 2012, at 10:46 AM, Romain Manni-Bucau wrote:

> almost done it,
> 
> simply need to fix examples and maybe tests
> 
> - Romain
> 
> 
> 2012/2/19 David Blevins <da...@gmail.com>
> 
>> I seem to recall we fixed our web service support in TomEE so that the
>> services were "inside" the application rather than at the root.
>> 
>> Would be excellent if we could get the same support in plain OpenEJB.  For
>> example:
>> 
>>   @BeforeClass
>>   public static void setUp() throws Exception {
>>       Properties properties = new Properties();
>>       properties.setProperty(EJBContainer.APP_NAME, "simple-webservice");
>>       properties.setProperty("openejb.embedded.remotable", "true");
>>       EJBContainer.createEJBContainer(properties);
>>   }
>> 
>>   @Test
>>   public void test() throws Exception {
>>       Service calculatorService = Service.create(
>>               new URL("
>> http://127.0.0.1:4204/simple-webservice/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));
>>   }
>> 
>> Created a jira for it: https://issues.apache.org/jira/browse/OPENEJB-1780
>> 
>> Up for grabs if someone wants to tackle it.
>> 
>> Would be great to have an option to retain the current behavior of putting
>> everything at the root, but nice to have this option so the addresses would
>> match how they look in Tomcat/TomEE.
>> 
>> 
>> -David
>> 
>> 


Re: WebService addresses for embedded EJB Container

Posted by Romain Manni-Bucau <rm...@gmail.com>.
almost done it,

simply need to fix examples and maybe tests

- Romain


2012/2/19 David Blevins <da...@gmail.com>

> I seem to recall we fixed our web service support in TomEE so that the
> services were "inside" the application rather than at the root.
>
> Would be excellent if we could get the same support in plain OpenEJB.  For
> example:
>
>    @BeforeClass
>    public static void setUp() throws Exception {
>        Properties properties = new Properties();
>        properties.setProperty(EJBContainer.APP_NAME, "simple-webservice");
>        properties.setProperty("openejb.embedded.remotable", "true");
>        EJBContainer.createEJBContainer(properties);
>    }
>
>    @Test
>    public void test() throws Exception {
>        Service calculatorService = Service.create(
>                new URL("
> http://127.0.0.1:4204/simple-webservice/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));
>    }
>
> Created a jira for it: https://issues.apache.org/jira/browse/OPENEJB-1780
>
> Up for grabs if someone wants to tackle it.
>
> Would be great to have an option to retain the current behavior of putting
> everything at the root, but nice to have this option so the addresses would
> match how they look in Tomcat/TomEE.
>
>
> -David
>
>