Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

response unable to receive the parameter sent

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can any one please go through this post.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Skool. Stay in. Smartness. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic