[mistletoe] Problem with tests using a Web service client

Ceki Gülcü ceki at qos.ch
Tue Nov 23 23:29:10 CET 2010


George,
Thanks for this information.
Cheers,

--
Ceki

On 23/11/2010 6:40 PM, George Herson wrote:
> FYI:  Whatever the below problem stems from, it isn't Mistletoe, I've
> confirmed.
>
> Best,
> George
>
>
> ----- Original Message ----
> From: Ceki Gülcü<ceki at qos.ch>
> To: Mist<mistletoe at qos.ch>
> Sent: Fri, November 19, 2010 1:12:20 PM
> Subject: Re: [mistletoe] Problem with tests using a Web service client
>
>
> Hi George,
>
> It looks like  java.lang.reflect.Proxy is unable to create a proxy for
> the l2d.cadoc.glms.api.StadiumWS interface because it is somehow views
> as something other than an interface. Can it be a class loader issue?
>
> On 19/11/2010 5:26 PM, George Herson wrote:
>> Greetings,
>>
>> I have a Web service and a JUnit 4.8.2 test class that, running in
>> NetBeans 6.7.1, can access that Web service via a Web service client
>> generated by NetBeans on my request. These all work inside the NetBeans IDE.
>>
>>
>> Mistletoe, which is working generally, is so far having trouble with
>> this client, however --
>> http://localhost:8080/d2l/MistletoeServlet/?testClassName=l2d.cadoc.glms.api.StadiumWSTest
>> t
>> <http://localhost:8080/d2l/MistletoeServlet/?testClassName=kodak.d2l.glms.api.StadiumWSTest>
>>>
>> returns the below error for all 4 JUnit tests. (I bolded the 2 lines
>> closest to my tests; hopefully this formatting won't be removed.)
>>
>> Tests: 4 Errors: 4
>>
>>      l2d.cadoc.glms.api.StadiumWSTest
>>
>>      testGetAllGroups(l2d.cadoc.glms.api.StadiumWSTest)
>>
>>
>> java.lang.IllegalArgumentException:  l2d.cadoc.glms.api.StadiumWS is not an
>> interface
>>
>>      java.lang.reflect.Proxy.getProxyClass(Proxy.java:362)
>>      java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
>>
>> com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:591)
>>
>>     com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:329)
>>
> com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:311)
>>
> com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:304)
>>     javax.xml.ws.Service.getPort(Service.java:92)
>>
>> *l2d.cadoc**.glms.api.StadiumWSService.getStadiumWSPort(StadiumWSService.java:56)*
>>
>>
>> *    l2d.cadoc.glms.api.StadiumWSTest.testGetAllGroups(StadiumWSTest.java:60)*
>>
>>      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>>      java.lang.reflect.Method.invoke(Method.java:597)
>>
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>
>>
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>
>>
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>
>>
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>
>>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
>>
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
>>
>>
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
>>
>>      org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>      org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>      org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>      org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>      org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>      org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>      org.junit.runners.Suite.runChild(Suite.java:128)
>>      org.junit.runners.Suite.runChild(Suite.java:24)
>>      org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>      org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>      org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>      org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>      org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>      org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>      ch.qos.mistletoe.core.MistletoeCore.run(MistletoeCore.java:82)
>>      ch.qos.mistletoe.core.MistletoeCore.run(MistletoeCore.java:66)
>>      ch.qos.mistletoe.servlet.MistletoeServlet.run(MistletoeServlet.java:90)
>>
> ch.qos.mistletoe.servlet.MistletoeServlet.service(MistletoeServlet.java:71)
>>
>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
>>
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
>>
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>>
>>
>> l2d.cadoc.glms.servlet.session.SessionSecurityFilter.doFilter(SessionSecurityFilter.java:53)
>>
>>
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
>>
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>>
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
>>
>>
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
>>
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
>>
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>      com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
>>
>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>>
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
>>      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
>>
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
>>
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
>>      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
>>      org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
>>
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
>>
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
>>
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
>>
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
>>
>>
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
>>
>>      com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
>>
>> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
>>
>>
>> Line 60 in StadiumWSTest.java, bolded above, is shown in some context here:
>>
>> StadiumWSService service = new StadiumWSService();
>>
>> *StadiumWS proxy = service.getStadiumWSPort();*
>>
>> List<Long>  response = proxy.getAllGroups();
>>
>> assertEquals("Comparing to predefined groups", expResult, response);
>>
>> }
>>
>>
>> Line 56 in StadiumWSService.java is bolded:
>>
>> /**
>>
>> *
>>
>> * @return
>>
>> *returns StadiumWS
>>
>> */
>>
>> @WebEndpoint(name = "StadiumWSPort")
>>
>> public StadiumWS getStadiumWSPort() {
>>
>> ***return super.getPort(new QName("http://api.glms.cadoc.l2d/
>> <http://api.glms.d2l.kodak/>", "StadiumWSPort"), StadiumWS.class);*
>>
>> }
>>
>> Thoughts? Are tests utilizing Web service clients known to work with
>> Mistletoe?
>>
>> Thank you,
>>
>> george herson



More information about the mistletoe mailing list