yes please

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-06-30 7:44 GMT+02:00 Xavier Dury <[email protected]>:
> Grrrr, that's the second time I forget I have to put every classes in 
> @Classes (even those that are already declared in the module).
>
> But I can confirm that MTOM is working with pojo endpoints but not with ejb 
> ones.
>
> I can make a simple testcase to demonstrate it.
>
> Regards,
>
> Xavier
>
> ----------------------------------------
>> From: [email protected]
>> Date: Fri, 27 Jun 2014 19:51:18 +0200
>> Subject: Re: Some questions about WebService and OpenEJB
>> To: [email protected]
>>
>> add your webservice in value ;)
>>
>> BTW
>> http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/applicationcomposer-jaxws-cdi/
>>
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-06-27 17:58 GMT+02:00 Xavier Dury <[email protected]>:
>>
>>> Hi,
>>>
>>> Thanks Romain,
>>>
>>> I was indeed not deploying the module as a webapp. Now, that it is done,
>>> it seems that no services are @Injected in my POJO endpoint.
>>>
>>> I declared my module as such:
>>>
>>> @Module
>>> @Classes(cdi = true, value = MyDependency.class)
>>> public WebApp module() {
>>> return new WebApp().addServlet("ws",
>>> MyPojoWebService.class.getName(), "/ws");
>>> }
>>>
>>> MyDependency is not @Injected in MyPojoWebService.
>>>
>>> Xavier
>>>
>>> ----------------------------------------
>>>> From: [email protected]
>>>> Date: Fri, 27 Jun 2014 17:11:54 +0200
>>>> Subject: Re: Some questions about WebService and OpenEJB
>>>> To: [email protected]
>>>>
>>>> Hi
>>>>
>>>> For pojo usage did you define a servlet in the WebApp object?
>>>>
>>>> MTOM should work. If not please share a sample reproducing the issue to
>>> let
>>>> us investigate it.
>>>>
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>>
>>>>
>>>> 2014-06-27 16:30 GMT+02:00 Xavier Dury <[email protected]>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've been developing a WebService and wanted to test it with
>>>>> ApplicationComposer.
>>>>>
>>>>> First, it seems that only EJB (@Stateless) endpoints can be injected
>>> into
>>>>> my test instance through @WebServiceRef. Is it correct?
>>>>>
>>>>> If I remove @Stateless from my service, then I get the following error:
>>>>>
>>>>> WARNING - Interceptor for {
>>>>>
>>> http://my.company.com/}DocumentGenerationService#{http://my.company.com/}generateDocument
>>>>> has thrown exception, unwinding now
>>>>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>>>> at
>>>>>
>>> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
>>>>> at
>>>>>
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>>>>> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
>>>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
>>>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
>>>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
>>>>> at
>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
>>>>> at
>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
>>>>> at com.sun.proxy.$Proxy76.generateDocument(Unknown Source)
>>>>> at com.company.my.WebServiceTest.simpleTest(WebServiceTest.java:74)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>>
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>> at
>>>>>
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>>> at
>>>>>
>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>>>>> at
>>>>>
>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>>>>> at
>>>>>
>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>>>>> at
>>>>>
>>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>>>>> at
>>>>>
>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>>>>> at
>>>>>
>>> org.apache.openejb.junit.DeployApplication$1.call(DeployApplication.java:44)
>>>>> at
>>>>>
>>> org.apache.openejb.junit.DeployApplication$1.call(DeployApplication.java:40)
>>>>> at
>>>>>
>>> org.apache.openejb.testing.ApplicationComposers.evaluate(ApplicationComposers.java:794)
>>>>> at
>>>>>
>>> org.apache.openejb.junit.DeployApplication.evaluate(DeployApplication.java:40)
>>>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>>>>> at
>>>>>
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>>>>> at
>>>>>
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>>>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>>>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>>>>> at
>>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>>>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>>>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>>>> at
>>>>>
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>>> Caused by: java.net.MalformedURLException: Invalid address. Endpoint
>>>>> address cannot be null.
>>>>> at
>>>>> org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:758)
>>>>> at
>>>>> org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:742)
>>>>> at
>>>>> org.apache.cxf.transport.http.HTTPConduit.setupURL(HTTPConduit.java:686)
>>>>> at
>>>>> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:476)
>>>>> at
>>>>>
>>> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>>>>> ... 37 more
>>>>>
>>>>> Second, I can't get MTOM working.
>>>>>
>>>>> I've added
>>>>> @MTOM,
>>> @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING)
>>>>> on both my SEI and my service bean, I'm using a
>>>>> @XmlMimeType("application/octet-stream") DataHandler in my response type
>>>>> but no attachment is created. (When I log my responses at the
>>> server-level
>>>>> through a SOAPHandler that calls
>>> SOAPMessageContext.getMessage().writeTo(),
>>>>> I see no attachment.)
>>>>>
>>>>> I saw in ticket OPENEJB-972 that MTOM support may not work for EJB
>>>>> endpoint, is that correct?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Xavier
>>>>>
>>>>>
>>>
>>>
>

Reply via email to