• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how can i create java classes from given wsdl

 
Ranch Hand
Posts: 604
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
i have given wsdl that i need to extract java classes from it
this is not wsdl in web server but wsdl as file .
is there simple way to do it ?
im using JAXWS
Thanks
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Meir Yan:
this is not wsdl in web server but wsdl as file.



That shouldn't matter most code generators (wscompile, WSDL2Java, etc.) accept a server-based URL or a local file path. The following topics may be helpful:

From wsdl to web service
how can i create java classes from given wsdl

You didn't identify which JAX-WS implementation you are using - different implementations use different names for their (equivalent) code generators.
 
Meir Yan
Ranch Hand
Posts: 604
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i did use axis 1.4 and it didn't worked well with my wsdl file
( that was generated using perl idl2wsdl tool )
and now i like to try the JAXWS
 
Meir Yan
Ranch Hand
Posts: 604
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by the way this is what i had with Axis maybe someone here have some experience with the subject :

have wsdl file (generated from ) perl idl2wsdl Now I fixed the file according to this link :
http://www.omg.org/issues/issue7834.txt

but when I run the WSDL2java class im getting this error :
java -cp
axis.jar;log4j-1.2.8.jar;commons-discovery-0.2.jar;commons-logging-1.0.4
.jar;jaxrpc.jar;saaj.jar;wsdl4j-1.5.1.jar;xml-apis.jar;xercesImpl.jar
org.apache.axis.wsdl.WSDL2Java test.wsdl





this lead me to this link :
http://issues.apache.org/jira/browse/AXIS-1337?page=com.atlassian.jira.p
lugin.system.issuetabpanels:changehistory-tabpanel

I don't like to compile the axis app ..
so what can I do ? why this bug didn't fixed ?
or there is different problem here ?

my axis version is downloaded from here :
http://mirror.mirimar.net/apache/ws/axis/1_4/
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the error cited by the link you gave is similar to your case then you should be able to "fix" the WSDL
http://mail-archives.apache.org/mod_mbox/ws-axis-dev/200406.mbox/%3C781850700.1086399353329.JavaMail.apache@nagoya%3E

For example, instead of



use



i.e. make sure the targetNameSpace matches in the definitions and xsd:schema elements.

Also note that anonymous complexTypes have been a problem in the past.
http://www.mail-archive.com/axis-user@xml.apache.org/msg16426.html

So to be on the safe side make sure that all xsdxsd:complexType elements have a name attribute. E.g.:
 
Meir Yan
Ranch Hand
Posts: 604
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i willl take alook , but for now , how can i make java classes from
JAXWS from given wsdl
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Meir Yan:
but for now , how can i make java classes from
JAXWS from given wsdl



well ... as I said in my first reply:

Originally posted by Peer Reynders:
You didn't identify which JAX-WS implementation you are using ...



JAX-WS (JSR-224) is a specification - not a tool, toolkit or framework.

The Axis2 implementation is guided by JAX-WS and it still uses it's own WSDL2Java.
Sun's reference implementation uses wscompile.
Apache CXF uses its own wsdl2java
JBoss-WS uses wsconsume
etc.

So basically each Java-based, JAX-WS implementing web services toolkit has its own tool for the job.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put required jar files in the classpath common-logging i guess there are around 10 jars
 
Message for you sir! I think it is a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic