Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataHandler error in WSDL

 
jani sk
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am new to java webservices,

i started learning it by using apache axis 1.4.

i was able to do a calcualtor example .

next i want to work with the attachements.

so i started it by writing an interface . its as fallows

i am using eclipse as editor.
i compiled it and then run the java2wsdl command to generate the WSDL.

WSDL was generated succesfully but its giving fallowing error in ECLIPSE

"The part 'dh' has an invalid value 'DataHandler' defined for its type. Type declarations must refer to valid values defined in a schema."

here i am giving the wsdl generated



can some one please help me how to get rid of this error??

Edited by Ivan: Please use code tags - it makes code and XML much more readable!
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i'm also trying to learn Webservices and started with JWSDP and with JAX-RPC model. I have not done any coding for webservices so far, but trying to understand the concepts before jumpin..... I wanted to check, if you have any URL where I can get step by step approaches for JWSDP and Axis.

Since you are using axis now, can you tell me what links are you referring to for some code samples ?

My only issue is following the steps needed for generating artifacts both client and server side and for learning process, I do not want to use any intelligent IDE's and want to hard code as much as I can.

 
jani sk
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi kumar,

you can find lot of online tutorials and sample examples to start with web services.
even i too did the same thing.

but i found the fallowing link is the best link and simple.

http://lkamal.blogspot.com/2008/07/web-service-axis-tutorial-client-server.html

 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jani,

I passed the WSDL document via the W3C Markup Validation Service and it looks fine.

It says -
This document was successfully checked as well-formed XML!




Regards,
Dan

 
jani sk
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks don for validating xml reply back,

but eclipse is showing error at the lines where datahandler is there in the wsdl file that is generated.

and the error says like datahandler datatype is not there in schema.

after googling i have placed activation.jar and mail.jar in the classpath. but still the issue persists...
 
Narender Reddy Soma
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check classpath
 
jani sk
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class path is fine narender ..i found all jars of axis are in classpath including activation.jar and mail.jar.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic