Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Complex Data Type Axis

 
Siva Jagadeesan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:
I am getting a NullPointerException when invoking a webservice using a JavaClient.
Service Interface is
public boolean uploadFile(
DataHandler dataHandler,
MetadataBean metadataBean,
FolderBean folderBean);
MetadataBean has a another bean (as a composite) PublicationMetaConf.
This is my wsdd file
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:schema="http://www.w3.org/2001/XMLSchema"
xmlns:au="AutoUploaderService">
<service name="AutoUploaderService" provider="java:RPC">
<namespace>AutoUploaderService</namespace>
<parameter name="className" value="cat.vce.autoUpload.server.service.AutoUploaderServiceImpl"/>
<parameter name="allowedMethods" value="*"/>
<typeMapping deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
languageSpecificType="java:javax.activation.DataHandler" qname="au ataHandler"
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
<beanMapping qname="au ublicationMetaConf" languageSpecificType="java:cat.vce.autoUpload.server.conf.PublicationMetaConf"/>
<beanMapping qname="au:MetadataBean" languageSpecificType="java:cat.vce.autoUpload.server.bean.MetadataBean"/>
<beanMapping qname="au:FolderBean" languageSpecificType="java:cat.vce.autoUpload.server.bean.FolderBean"/>
</service>
</deployment>

I have two questions
1) When I make a call using Java client I am getting an NullPointerException
2) I am not able to generate Client side code using WSDL2Java. I am getting this error
[java] java.io.IOException: Type {AutoUploaderService}DataHandler is referenced but not defined
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
[java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
[java] at java.lang.Thread.run(Thread.java:536)
It would be great is someone could help me.
Rgds,
--Siva
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I dunno about AXIS, but I think we need more information on:
1) When I make a call using Java client I am getting an NullPointerException

Is that thrown on the client side before it sends the SOAP request?
On the server side when it gets the request?
On the client side when it gets the response?
From your code or from AXIS classes?
Bill
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sivakumar Jagadeesan:

[java] java.io.IOException: Type {AutoUploaderService}DataHandler is referenced but not defined

Just a guess
Check whether you had included activation.jar in your lib folder or classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic