facebook

Problem creating Web Service using code first and javabeans.

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #279950 Reply

    Lasana
    Participant

    Hello,

    My problem is that I am using code first to create my web service. I am using XMLBeans object as input value(attribute) into the method. My first question is that allowed or should I use the XMLObject or String instead. I am using MyEclipse 6.0 jdk 1.5. I am getting this error:

    2007-12-22 22:07:05,593 INFO [STDOUT] test
    2007-12-22 22:07:05,593 INFO [STDOUT] $Proxy75@12448867
    2007-12-22 22:07:05,593 ERROR [org.codehaus.xfire.handler.DefaultFaultHandler] Fault occurred!
    org.codehaus.xfire.XFireRuntimeException: Error invoking ‘com.kt.ws.IDemoTest.importWS(user.kt.ws.UserDocument)’. Nested exception is java.lang.reflect.InvocationTargetException: null
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:59)
    at org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker.java:45)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:320)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
    at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
    at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
    at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
    at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.IllegalAccessError: getUserInfoArray is not delegated.
    at org.codehaus.xfire.aegis.type.basic.InterfaceInvocationHandler.invoke(InterfaceInvocationHandler.java:52)
    at $Proxy76.getUserInfoArray(Unknown Source)
    at com.kt.ws.DemoTestImpl.importWS(DemoTestImpl.java:29)
    … 36 more

    My code is:

    import user.kt.ws.*;

    //Generated by MyEclipse

    public class DemoTestImpl implements IDemoTest {

    public String example(String message) {
    return message;
    }
    public String importWS(UserDocument user){
    String str = null;

    try{
    System.out.println(“test “);
    System.out.println(user.toString());
    str = user.getUser().getUserInfoArray(0).getMessage();
    }
    catch (Exception ex){
    ex.printStackTrace();
    return “this didn’t get worked”;
    }
    return “this worked ” + str;
    }
    }

    MyEclipse configurations:

    *** Date: Saturday, December 22, 2007 10:24:16 PM ET

    *** Platform Details:

    *** System properties:
    ErrorManager.minimum=18
    awt.toolkit=sun.awt.windows.WToolkit
    birt.viewer.working.path=C:\java\workspace60\.metadata\.plugins\org.eclipse.birt.report.viewer
    catalina.base=/C:/java/MyEclipse 6.0/eclipse/plugins/org.eclipse.tomcat_4.1.230.v20070531/
    catalina.home=/C:/java/MyEclipse 6.0/eclipse/plugins/org.eclipse.tomcat_4.1.230.v20070531/
    catalina.useNaming=true
    eclipse.buildId=I20070625-1500
    eclipse.commands=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\java\MyEclipse 6.0\eclipse\eclipse.exe
    -name
    Eclipse
    –launcher.library
    C:\java\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
    -startup
    C:\java\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
    -exitdata
    13e4_58
    -vm
    C:\java\MyEclipse 6.0\jre\bin\javaw.exe
    eclipse.ee.install.verify=false
    eclipse.product=com.genuitec.myeclipse.product.ide
    eclipse.startTime=1198307961859
    eclipse.vm=C:\java\MyEclipse 6.0\jre\bin\javaw.exe
    eclipse.vmargs=-Xms128m
    -Xmx512m
    -Duser.language=en
    -XX:PermSize=128M
    -XX:MaxPermSize=256M
    -jar
    C:\java\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
    eof=eof
    file.encoding=Cp1252
    file.encoding.pkg=sun.io
    file.separator=\
    java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob=sun.awt.windows.WPrinterJob
    java.class.path=C:\java\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
    java.class.version=49.0
    java.endorsed.dirs=C:\java\MyEclipse 6.0\jre\lib\endorsed
    java.ext.dirs=C:\java\MyEclipse 6.0\jre\lib\ext
    java.home=C:\java\MyEclipse 6.0\jre
    java.io.tmpdir=C:\DOCUME~1\User1\LOCALS~1\Temp\
    java.library.path=C:\java\MyEclipse 6.0\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\sun\AppServer\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files\Align\ClinCheck 2.5\common;;C:\Program Files\Citrix\System32\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Lenovo;C:\Program Files\Lenovo\Client Security Solution;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\java\ant17\bin;C:\java\maven207\bin;C:\Program Files\QuickTime\QTSystem\;C:\java\maven207\bin;C:\TIBCO\TIBRV\BIN;C:\java\xmlbeans-2.3.0\bin
    java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
    java.naming.factory.url.pkgs=org.apache.naming
    java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version=1.5.0_11-b03
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Sun Microsystems Inc.
    java.specification.version=1.5
    java.vendor=Sun Microsystems Inc.
    java.vendor.url=http://java.sun.com/
    java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
    java.version=1.5.0_11
    java.vm.info=mixed mode
    java.vm.name=Java HotSpot(TM) Client VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.specification.version=1.0
    java.vm.vendor=Sun Microsystems Inc.
    java.vm.version=1.5.0_11-b03
    line.separator=

    org.eclipse.equinox.launcher.splash.handle=918110
    org.eclipse.equinox.launcher.splash.location=c:\java\MyEclipse 6.0\eclipse\..\myeclipse\eclipse\plugins\com.genuitec.myeclipse.product_6.0.1.zmyeclipse601200710\splash.bmp
    org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5
    org.osgi.framework.language=en
    org.osgi.framework.os.name=WindowsXP
    org.osgi.framework.os.version=5.1
    org.osgi.framework.processor=x86
    org.osgi.framework.system.packages=javax.accessibility,javax.activity,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.events,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
    org.osgi.framework.vendor=Eclipse
    org.osgi.framework.version=1.4.0
    org.osgi.supports.framework.extension=true
    org.osgi.supports.framework.fragment=true
    org.osgi.supports.framework.requirebundle=true
    os.arch=x86
    os.name=Windows XP
    os.version=5.1
    osgi.arch=x86
    osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
    osgi.bundlestore=C:\java\MyEclipse 6.0\eclipse\configuration\org.eclipse.osgi\bundles
    osgi.compatibility.bootdelegation=true
    osgi.configuration.area=file:/C:/java/MyEclipse 6.0/eclipse/configuration/
    osgi.framework=file:/c:/java/MyEclipse 6.0/eclipse/plugins/org.eclipse.osgi_3.3.0.v20070530.jar
    osgi.framework.beginningstartlevel=1
    osgi.framework.shape=jar
    osgi.framework.version=3.3.0.v20070530
    osgi.install.area=file:/C:/java/MyEclipse 6.0/eclipse/
    osgi.instance.area=file:/C:/java/workspace60/
    osgi.instance.area.default=file:/C:/Documents and Settings/User1/workspace/
    osgi.logfile=C:\java\workspace60\.metadata\.log
    osgi.manifest.cache=C:\java\MyEclipse 6.0\eclipse\configuration\org.eclipse.osgi\manifests
    osgi.nl=en_US
    osgi.os=win32
    osgi.splashLocation=c:\java\MyEclipse 6.0\eclipse\..\myeclipse\eclipse\plugins\com.genuitec.myeclipse.product_6.0.1.zmyeclipse601200710\splash.bmp
    osgi.splashPath=platform:/base/../myeclipse/eclipse/plugins/com.genuitec.myeclipse.product
    osgi.syspath=c:\java\MyEclipse 6.0\eclipse\plugins
    osgi.ws=win32
    path.separator=;
    sun.arch.data.model=32
    sun.awt.exception.handler=org.netbeans.core.NbErrorManager$AWTHandler
    sun.boot.class.path=C:\java\MyEclipse 6.0\jre\lib\rt.jar;C:\java\MyEclipse 6.0\jre\lib\i18n.jar;C:\java\MyEclipse 6.0\jre\lib\sunrsasign.jar;C:\java\MyEclipse 6.0\jre\lib\jsse.jar;C:\java\MyEclipse 6.0\jre\lib\jce.jar;C:\java\MyEclipse 6.0\jre\lib\charsets.jar;C:\java\MyEclipse 6.0\jre\classes
    sun.boot.library.path=C:\java\MyEclipse 6.0\jre\bin
    sun.cpu.endian=little
    sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
    sun.desktop=windows
    sun.io.unicode.encoding=UnicodeLittle
    sun.java.launcher=SUN_STANDARD
    sun.jnu.encoding=Cp1252
    sun.management.compiler=HotSpot Client Compiler
    sun.net.client.defaultConnectTimeout=60000
    sun.net.client.defaultReadTimeout=60000
    sun.os.patch.level=Service Pack 2
    user.country=US
    user.dir=C:\java\MyEclipse 6.0\eclipse
    user.home=C:\Documents and Settings\User1
    user.language=en
    user.name=User1
    user.timezone=America/New_York
    user.variant=
    workspace.projectclasspath=/C:/tibco/TIBRV/lib/tibrvnativesd.jar;/C:/tibco/TIBRV/lib/rvconfig.jar;/C:/tibco/TIBRV/lib/tibrvj.jar;/C:/tibco/TIBRV/lib/tibrvjsd.jar;/C:/tibco/TIBRV/lib/tibrvjweb.jar;/C:/tibco/TIBRV/lib/tibrvnative.jar;/C:/java/commons-dbcp-1.2.2/commons-dbcp-1.2.2.jar;/C:/java/commons-pool-1.3/commons-pool-1.3.jar;/C:/java/mysql-connector-java-5.1.5/mysql-connector-java-5.1.5-bin.jar;/C:/java/tibco/tibrvjms.jar;/C:/java/tibco/tibjms.jar;/C:/java/tibco/tibjmsapps.jar;/C:/java/tibco/tibjmsadmin.jar;/C:/java/tibco/jms.jar;/C:/java/tibco/jsse.jar;/C:/java/tibco/jta-spec1_0_1.jar;/C:/java/tibco/tibcrypt.jar;C:\java\workspace60\EEApplication\bin;C:\java\workspace60\KTScheduleWeb\target\main\java;C:\java\workspace60\KTTestWS\WebRoot\WEB-INF\classes;/C:/java/xmlbeans-2.3.0/projects/kttestws/wscommon1.jar;/C:/rhdevstudio/jboss-eap/jboss-as/server/default/lib/jnpserver.jar;/C:/rhdevstudio/jboss-eap/jboss-as/lib/jboss-common.jar;/C:/rhdevstudio/jboss-eap/jboss-as/server/default/lib/mysql-connector-java-5.1.5-bin.jar;/C:/java/jndi-1_2_1/lib/jndi.jar;/C:/rhdevstudio/jboss-eap/jboss-as/client/jnp-client.jar;C:\java\workspace60\KTWSDemo\WebRoot\WEB-INF\classes;/C:/java/xmlbeans-2.3.0/projects/kttestws/wscommon.jar;C:\java\workspace60\KTWebServiceDemo\WebRoot\WEB-INF\classes;/C:/bea/user_projects/applications/TestWS/APP-INF/lib/Schemas.jar;/C:/bea/weblogic81/server/lib/xbean.jar;C:\java\workspace60\TestClientWS\WebRoot\WEB-INF\classes;C:\java\workspace60\TestEJB\classes;/C:/bea/user_projects/applications/TestWS/APP-INF/lib/Schemas.jar;/C:/bea/weblogic81/server/lib/xbean.jar;C:\java\workspace60\TestKTWS\WebRoot\WEB-INF\classes;/C:/java/xmlbeans-2.3.0/projects/kttestws/wscommon.jar;C:\java\workspace60\TestWS\WebRoot\WEB-INF\classes;C:\java\workspace60\TestingStub\bin;/C:/java/xmlbeans-2.3.0/projects/kttestws/wscommon1.jar;C:\java\workspace60\WSTestKT\WebRoot\WEB-INF\classes;/C:/WebServTest/myeclipse-XMLBeans;C:\java\workspace60\WebServTest\WebRoot\WEB-INF\classes;C:\java\workspace60\commonSchemas\bin;C:\java\workspace60\testAppProj\target\classes

    I just need some guidance here….Thank you.

    Lasana

    #280154 Reply

    Brian Fernandes
    Moderator

    This message has not been recovered.

    #280164 Reply

    Lasana
    Participant

    This message has not been recovered.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Problem creating Web Service using code first and javabeans.

You must be logged in to post in the forum log in