[jbossws-dev] [Design of JBoss Web Services] - Re: VirtualFileAdaptor behavior seems incorrect

scott.stark@jboss.org do-not-reply at jboss.com
Sat Jun 21 13:09:31 EDT 2008


I see you added a test that did not show the problem. I went through the server code to see exactly how the VirtualFile being passed to the ws VirtualFileAdaptor was being created. The issue is that a VirtualFile with a DelegatingHandler pointing to the client jar is asked for itself using getChild(""), and its this VirtualFile that is passed to the VirtualFileAdaptor. It is this file that 


  |    public void testVirtualFileAdaptorEarInnerJar() throws Exception
  |    {
  |       URL rootURL = getResource("/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear");
  |       VFS vfs = VFS.getVFS(rootURL);
  |       VirtualFile file = vfs.getChild("interop_W2JREMarshallTest_appclient_vehicle_client.jar");
  |       assertNotNull(file);
  |       VirtualFile file2 = file.getChild("");
  |       assertNotNull(file2);
  |       VirtualFileAdaptor adaptor = new VirtualFileAdaptor(file2);
  |       // serialize
  |       adaptor = serializeDeserialize(adaptor, VirtualFileAdaptor.class);
  |       VirtualFileAdaptor child = adaptor.findChild("MarshallTest.xml");
  |       assertNotNull(child);
  |    }
  | 


  | java.io.IOException: Child not found interop_W2JREMarshallTest_appclient_vehicle_client.jar for ZipEntryHandler at 15675922[path= context=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar real=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar], available children: [ZipEntryHandler at 12612903[path=META-INF context=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar real=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar/META-INF], ZipEntryHandler at 4945063[path=MarshallTest.xml context=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar real=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar/MarshallTest.xml], ZipEntryHandler at 14126576[path=com context=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar real=vfszip:/Users/svn/JBossAS/projects/vfs/trunk/target/test-classes/vfs/test/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar/com]]
  | 	at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:409)
  | 	at org.jboss.test.virtual.support.VirtualFileAdaptor.getFile(VirtualFileAdaptor.java:83)
  | 	at org.jboss.test.virtual.support.VirtualFileAdaptor.findChild(VirtualFileAdaptor.java:91)
  | 	at org.jboss.test.virtual.test.JARSerializationUnitTestCase.testVirtualFileAdaptorEarInnerJar(JARSerializationUnitTestCase.java:264)
  | 

See http://jira.jboss.com/jira/browse/JBVFS-36.

The current testVirtualFileAdaptorEarInnerJar should have other tests that validate basic navigation assertations as serialization really is not the issue here.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159738#4159738

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159738




More information about the jbossws-dev mailing list