• Post Reply Bookmark Topic Watch Topic
  • New Topic

WS Client

 
julio boll
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I'm really new using wsdl / wsclients.
I want to creat a java project to consume a existing wsdl and make a ws client for it, can someone help me?
 
Tim Moores
Saloon Keeper
Posts: 3250
54
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which SOAP stack are you using? The common ones come with tools to generate client code from a WSDL. For example, Axis2 has http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html
 
julio boll
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Which SOAP stack are you using? The common ones come with tools to generate client code from a WSDL. For example, Axis2 has http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html

Yes, I have the Axis2, but I'm really new to java and those applications... Some projects said about maven, the I have maven directory too, but I do not know how to create the folder "Maven dependencies" like the people say
 
Ahmed Bin S
Ranch Hand
Posts: 385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
julio boll wrote:
Tim Moores wrote:Which SOAP stack are you using? The common ones come with tools to generate client code from a WSDL. For example, Axis2 has http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html

Yes, I have the Axis2, but I'm really new to java and those applications... Some projects said about maven, the I have maven directory too, but I do not know how to create the folder "Maven dependencies" like the people say


Are you using an IDE? You could use Eclipse, install the Maven plug-in, then create a new Maven project, click on the pom.xml, go to the Dependencies Tab, and add them from there.
 
julio boll
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahmed Bin S wrote:
julio boll wrote:
Tim Moores wrote:Which SOAP stack are you using? The common ones come with tools to generate client code from a WSDL. For example, Axis2 has http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html

Yes, I have the Axis2, but I'm really new to java and those applications... Some projects said about maven, the I have maven directory too, but I do not know how to create the folder "Maven dependencies" like the people say


Are you using an IDE? You could use Eclipse, install the Maven plug-in, then create a new Maven project, click on the pom.xml, go to the Dependencies Tab, and add them from there.


Thanks, I created using the depencies as you said.
But what I really wants don't have the dependencies, is just a wsdl and I want make a ws client just with it.
 
Ahmed Bin S
Ranch Hand
Posts: 385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
julio boll wrote:
Thanks, I created using the depencies as you said.
But what I really wants don't have the dependencies, is just a wsdl and I want make a ws client just with it.


Ok, so an easy way to do this is to go to your command prompt and go to $JAVA_HOME/bin and then run "wsimport -keep <your_wsdl_file>" to generate the artifacts that your client code can then use to access the web service.
 
julio boll
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahmed Bin S wrote:
julio boll wrote:
Thanks, I created using the depencies as you said.
But what I really wants don't have the dependencies, is just a wsdl and I want make a ws client just with it.


Ok, so an easy way to do this is to go to your command prompt and go to $JAVA_HOME/bin and then run "wsimport -keep <your_wsdl_file>" to generate the artifacts that your client code can then use to access the web service.


I'm trying using the wsimport but when I do the command it generate tons of [WARNINGS] saying " we found the tag but can't reference it to the schema " and later come the messa of Generating and Compiling, but nothing has created or compilated

Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

 
Ahmed Bin S
Ranch Hand
Posts: 385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, after running this command, did any .java and .class files get generated below the path where you ran this command?
 
julio boll
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got that... I just downgrad the axis to 1.5.1 and used tomcat 8.0, now it generated all the things, Thanks for helping guys
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!