File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Axis issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis issues" Watch "Axis issues" New topic
Author

Axis issues

peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
Hi, this is my first post, and also my first use of webservices.

I have 3 issues, all of which seem to be common, but the solutions don't work for me.

In general this WS: uses document/literal , uses only int[],String[],int and String and uses attachments, the adminclient works, the happy page is happy

First of all I noticed that all the [] parameters cause exceptions at startup and when calling the Webservice:

DEBUG - Exception:
java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.ArrayDeserializerFactory.<init>(java.lang.Class, javax.xml.namespace.Q
Name)
at java.lang.Class.getConstructor0(Class.java:1929)
at java.lang.Class.getConstructor(Class.java:1019)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.createFactory(BaseDeserializerFactory.java:246)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:554)
at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233)
at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:192)
at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
at org.apache.axis.server.AxisServer.<init>(AxisServer.java:88)
at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)
at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3209)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3195)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
DEBUG - org.apache.axis.i18n.resource::handleGetObject(exception00)
DEBUG - Exception:
java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.ArraySerializerFactory.create(java.lang.Class, javax.xml.namespace.QNa
me)
at java.lang.Class.getMethod(Class.java:978)
at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:254)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233)
at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:192)
at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
at org.apache.axis.server.AxisServer.<init>(AxisServer.java:88)
at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)
at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3209)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3195)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
DEBUG - org.apache.axis.i18n.resource::handleGetObject(exception00)


other people seem to have the same thing, but they claim it doesn't harm anything. I think they are correct.

Next issue (this maybe something very stupid, but WS are completely new to me) I succesfully deployed the WS, but when running the client, I notice that the params do get send through, but they are all null or 0 inside my actual implementation method. Whereas the attachment does work flawlessly.
I guess this could be related to the (de)serialize thing.

Next problem, I tried to enable the SOAPMonitor applet.So I deployed that webservice, compiled the soapmonitorclasses and put them in the webapp root.
This is the resulting stacktrace:

java.lang.NoClassDefFoundError: SOAPMonitorApplet$SOAPMonitorPage
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-94" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-SOAPMonitorApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NoSuchMethodError: SOAPMonitorApplet.access$000(LSOAPMonitorApplet I
at SOAPMonitorApplet$SOAPMonitorPage.start(SOAPMonitorApplet.java:355)
at SOAPMonitorApplet.start(SOAPMonitorApplet.java:98)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



Any help would be greatly appreciated
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39551
    
  27
Hello Peter-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

Enjoy your time here.


Ping & DNS - updated with new look and Ping home screen widget
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
I apologize, name is changed.

One more usefull trace :

DEBUG - NSPush (32)
DEBUG - SAXOutputter.startElement ['urn:GeneralContentWS' pTitle]
DEBUG - org.apache.axis.i18n.resource::handleGetObject(startElem00)
DEBUG - Start element [urn:GeneralContentWS] Title
DEBUG - SAXOutputter.characters ['title']
DEBUG - SAXOutputter.endElement ['urn:GeneralContentWS' pTitle]
DEBUG - org.apache.axis.i18n.resource::handleGetObject(endElem00)
DEBUG - End element pTitle
DEBUG - NSPop (32)


This title field is filled here, but when I log its value later on in the impl. class, its null ...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39551
    
  27
Thanks for fixing the name.

As to the SOAPMonitor issue, by default the classes needed for that applet are not where they need to be. They need to be moved right into the Axis directory. Some help for the applet can be found here.
[ January 13, 2006: Message edited by: Ulf Dittmer ]
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
Thx. for the url, but I have the SoapMonitorApplet.class, and 6 other soapmonitorapplet class files in the applications\entapp\DCTMWebServices

I renamed the axis webapp to DCTMWebServices, I do hope that that is not the issue.
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
I don't want to spam my own thread, but this is usefull information, hope I can help others with it. After examining the (De)SerializeFactory code a bit, I discovered that those exceptions are normal behaviours. So I'm down to 2 issues.
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
next update:

SOAPmonitor issue resolved, it wasn't a config problem, I just cleared the classloader cache in the java console.

Sorry :-(
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39551
    
  27
Thanks for following up. This is useful information for others to learn from.

Those exceptions would have looked to me like a mismatch of libraries, where the API changed from one version to the next, and the jar files got mixed up. Strange that that should be normal behavior. Something to investigate on a rainy day...
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
More information,

I noticed that the DEBUG trace where the title is printed posted before, occurs when I'm reading the attachment.

The axis debug info that really occurs before the app. server starts executing the skeleton and implementation class is

DEBUG - Enter: DeserializationContext::startPrefixMapping(, urn:GeneralContentWS)
DEBUG - NSPush (32)
DEBUG - NSPush (32)
DEBUG - Exit: DeserializationContext::startPrefixMapping()
DEBUG - Enter: DeserializationContext::startElement(urn:GeneralContentWS, pTitle)
DEBUG - Enter: BodyBuilder: nStartChild()
DEBUG - org.apache.axis.i18n.resource::handleGetObject(newElem00)
DEBUG - New MessageElement (org.apache.axis.message.SOAPBodyElement@4f0f97) named {}pTitle
DEBUG - Exit: BodyBuilder: nStartChild()
DEBUG - org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
DEBUG - Pushing handler org.apache.axis.message.SOAPHandler@889c4e
DEBUG - Pushing element pTitle
DEBUG - Exit: DeserializationContext::startElement()
DEBUG - Enter: DeserializationContext::endElement(urn:GeneralContentWS, pTitle)
DEBUG - org.apache.axis.i18n.resource::handleGetObject(popHandler00)
DEBUG - Popping handler org.apache.axis.message.SOAPHandler@889c4e
DEBUG - NSPop (32)
DEBUG - Popped element stack to org.apache.axis.message.SOAPBody:Body
DEBUG - Exit: DeserializationContext::endElement()
DEBUG - Enter: DeserializationContext::endPrefixMapping()
DEBUG - Exit: DeserializationContext::endPrefixMapping()
DEBUG - Enter: DeserializationContext::startPrefixMapping(, urn:GeneralContentWS)
DEBUG - NSPush (32)

I hope someone knows what this means :-)

I hope this isn't caused because of the use of document/literal, because the java2wsdl gave me this warning :

Request Message type information has multiple parts than one single wrapped complexType. Use WRAPPED/LITERAL if interoping with some other soap stack becomes a problem


Which also sounds a little chinese to me.

It's strange that it's getting that title field while retreiving the attachment. I've verified the actual soap message, and it looks good.

This is a chunk of my wsdl file :

<wsdl:message name="insertContentRequest">

<wsdl art element="impl:in0" name="in0"/>

<wsdl art element="impl:in1" name="in1"/>

<wsdl art element="impl:in2" name="in2"/>

<wsdl art element="impl:in3" name="in3"/>

<wsdl art element="impl:in4" name="in4"/>

<wsdl art element="impl:in5" name="in5"/>

<wsdl art element="impl:in6" name="in6"/>

<wsdl art element="impl:in7" name="in7"/>

<wsdl art element="impl:in8" name="in8"/>

</wsdl:message>

<wsdl ortType name="GeneralContentWS">

<wsdl peration name="insertContent" parameterOrder="in0 in1 in2 in3 in4 in5 in6 in7 in8">

<wsdl:input message="impl:insertContentRequest" name="insertContentRequest"/>

<wsdl utput message="impl:insertContentResponse" name="insertContentResponse"/>

</wsdl peration>
peter coster
Greenhorn

Joined: Jan 13, 2006
Posts: 26
I found the solution, and it was actually provided by axis, because when I was generating the WSDL, axis warned me about using doc. literal, and told to use wrapped, that solved the problem (altough I don't really comprehend why)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis issues
 
Similar Threads
Setup AXIS problem
ConfigurationException when using attachments with axis
Unable to deploy typemapping with AXIS Custom (De)Serializers - Please help .. Urgent
Null serializer factory specified : Axis 1.2 RC2 Bug ?
Error running deploy.wsdd - NoClassDefFoundError Deserializer