This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create skeleton with WSDL

 
soraya penina
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I create skeleton with WSDL using this command -> java -cp .;%AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true math.wsdl
File MathServiceSoapBindingImpl.java was generated..
the code which is in the file is:

now, i want asked all of you, why the method return -3??
I have read code of math.wsdl..but i didn't find clue for it..

can you all explain it for me??
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.


With reference to your question, can you please copy & paste your wsdl so that it can give some clue ?

Thanks!
Balaji
 
Nitin Pathak
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The WSDL2Java emitter add the arbitrary return types (null for String) -3 in your case which needs to be modified in your SoapBindinImpl class to bind it with your functionality provider. Since, this value has nothing to do with your custom WSDL, please update the return statement with the actual implementinn method from the provider.
 
soraya penina
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nitin Pathak:
The WSDL2Java emitter add the arbitrary return types (null for String) -3 in your case which needs to be modified in your SoapBindinImpl class to bind it with your functionality provider. Since, this value has nothing to do with your custom WSDL, please update the return statement with the actual implementinn method from the provider.


sorry....can you explain it with more detail??
what -3 is default value if create skeleton with WSDL??

Thanks,
Soraya
 
Nitin Pathak
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Creating a java class with the operations (read methods) returning Integer types have the arbitrary integer value of -3 assigned to the return type; as the WSDL2Java utility class is NOT aware of your functionality provider:

For example - I created a SoapBindingImpl class from WSDL2Java with the following code:


Here, for both the add and subtract methods, the return type has been assigned as -3 which we definitely need to change.

We need to make the following changes to bind WS with the functionality provider:

Where the modifications made are depicted in bold.

It does not matter what arbitrary values your method returns, which in this case we have learnt is -3; what matters is the binding the service with the provider (in this case it is SimpleCalculator).

Hope this helps a bit!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic