• Post Reply Bookmark Topic Watch Topic
  • New Topic

response unable to receive the parameter sent  RSS feed

 
saipraneeth nallapareddy
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to web services, i am using the AXIS2 to develop my web service.
i generated a hand made WSDL file which has a types, message port->binding->service.
the following is my WSDL file

i have a class that has been specified in my services.xml, which has a method with a parameter and returns a string in concatenation with the parameter, earlier i have used the same class and same service.xml file and created a .aar file and uploaded it to server with the AXIS2 deployed and it worked fine with the server generated WSDL and when i passed the parameter it has received that.

Now the problem is with my hand made WSDL file, it is showing no errors even when i tried to generate wsdl2java.bat all the stubs are getting generated, but when on the browser with the AXIS2 list of services and try to pass the parameter it is showing the hard coded string of my class but couldn't concatenate the passed parameter

can any one help me.
 
saipraneeth nallapareddy
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one please go through this post.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to pass the parameter

What does that mean? How, exactly, are you invoking the service?
 
saipraneeth nallapareddy
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

where
sayHello is operation name
try is the parameter
anystring is its value

if the above link is clicked in my browser with tomcat running it should return an xml with content 'Hello anystring!'
but i don't know what went wrong it is just displaying 'Hello !'
not even null in the place of the anystring as the variable that should receive is a variable of java class.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://localhost:8080/axis2/services/TrialService/sayHello?try=anystring

if the above link is clicked in my browser with tomcat running it should return an xml with content 'Hello anystring!'

That's not how SOAP services work. You need to use the client code that wsdl2java generated for you in order to create and send a proper SOAP request.

If, on the other hand, you prefer to use an URL like that one, maybe RESTful web services are more up your alley. Check out the JAX-RS API and its Jersey reference implementation; the WebServicesFaq also has lots of useful stuff about REST.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!