[ http://jira.codehaus.org/browse/XFIRE-775?page=comments#action_80978 ] Tomasz Sztelak commented on XFIRE-775: --------------------------------------
Currently dynamic client doesn't support complex types well ( or maybe at all ). But we have some improvments here, so you can try current svn snapshot ( can be downloaded from http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20061109.042638-29.jar ) or wait till next release. > XFire Dynamic Client > -------------------- > > Key: XFIRE-775 > URL: http://jira.codehaus.org/browse/XFIRE-775 > Project: XFire > Issue Type: Test > Components: Core > Reporter: Madan Gopal > Assigned To: Dan Diephouse > Attachments: bbservice.wsdl, XFireClientTest.zip > > > I'm a newbie to web service with a little bit of Axis1.4 knowledge. I'm > trying to create a dynamic web service client for a complex web service with > an multi-enapsulated object model which I have attached to this post. > The following is my client code to access the web service hosted as a > document/literal style using Axis on my tomcat server. > import org.codehaus.xfire.client.*; > import org.codehaus.xfire.*; > import java.net.*; > public class XFireClientTest{ > public static void main(String[] args) throws Exception{ > testSOAPService(); > } > public static void testSOAPService() throws MalformedURLException, Exception > { > Client client = new Client(new > URL("http://localhost:8080/axis/services/localobdwebservice?wsdl")); > ObdConfigSpecification obdConfig = new ObdConfigSpecification(); > obdConfig.setVIN("1D4HS48N63F508322"); > obdConfig.setParamSearchStr("odometer"); > CommonParam[] cps = new CommonParam[1]; > cps[0] = new CommonParam(); > cps[0].setCategory("Streamer"); > cps[0].setCommonPID(new CommonPID("ODOMETER")); > obdConfig.setCommonParams(cps); > Object[] results = client.invoke("GetObdConfig", new Object[] > {obdConfig}); > // Service returns a double of the currency conversion rate. > System.out.println(results); > } > } > And the following is the exception thrown by it. I could not find a good > clean explanation on the documentation section and I would appreciate if > someone can help me out.. > Exception in thread "main" java.lang.NoClassDefFoundError > at > org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.class$(Defau > ltTypeMappingRegistry.java:62) > at > org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.createDefaul > tMappings(DefaultTypeMappingRegistry.java:397) > at > org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.createDefaul > tMappings(DefaultTypeMappingRegistry.java:302) > at > org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.<init>(Defau > ltTypeMappingRegistry.java:128) > at > org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.<init>(Defau > ltTypeMappingRegistry.java:116) > at > org.codehaus.xfire.aegis.AegisBindingProvider.<init>(AegisBindingProv > ider.java:63) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct > orAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC > onstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:274) > at java.lang.Class.newInstance0(Class.java:308) > at java.lang.Class.newInstance(Class.java:261) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.getBindingProvide > r(WSDLServiceBuilder.java:134) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.createMessagePart > (WSDLServiceBuilder.java:489) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.createMessagePart > s(WSDLServiceBuilder.java:462) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLService > Builder.java:431) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLService > Builder.java:389) > at > org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.build(WSDLService > Builder.java:187) > at > org.codehaus.xfire.client.Client.initFromDefinition(Client.java:263) > at org.codehaus.xfire.client.Client.<init>(Client.java:235) > at org.codehaus.xfire.client.Client.<init>(Client.java:245) > at bbclient.XFireClientTest.testSOAPService(XFireClientTest.java:17) > at bbclient.XFireClientTest.main(XFireClientTest.java:11) > Caused by: java.lang.ClassNotFoundException: org.jdom.Element > at java.net.URLClassLoader$1.run(URLClassLoader.java:199) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:187) > at java.lang.ClassLoader.loadClass(ClassLoader.java:289) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) > at java.lang.ClassLoader.loadClass(ClassLoader.java:235) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:141) > ... 23 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
