File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Web Service doesn't read my parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service doesn Watch "Web Service doesn New topic
Author

Web Service doesn't read my parameter

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
I try to send a String to my Web Service and then print it. It always prints "null". I'm developing wsdl-first using Metro.

WSDL:


And this is the SOAP message being sent over:

If i want to get something from the WS, it works. Something like getString.

I really really really need help with this.
Thank you in advance,
Alex.


"Quoting yourself is stupid" - Me
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Update:

This is the SOAP i recieve when using a get method:

If i change <return> to something else, i have the exact problem like when uploading. Is there a tag needed to contain the request too ?

PLEASE help
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
What kind of client are you using?
Have you tried to use soapUI to send requests to the web service and examine the result?
If using soapUI does not work, then there is a problem with your web service.
If soapUI does work, but your client does not work, then the problem is most likely to be the client.
Best wishes!
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Thank you Ivan for your help.

I found my problem, for some reason, i have to write all elements inside a schema and import that.

And now it's working.
Mattias Sands�ter
Greenhorn

Joined: May 05, 2006
Posts: 7
Ivan Krizsan wrote:Hi!
What kind of client are you using?
Have you tried to use soapUI to send requests to the web service and examine the result?
If using soapUI does not work, then there is a problem with your web service.
If soapUI does work, but your client does not work, then the problem is most likely to be the client.
Best wishes!


Hi.

I tried soapUI with my small "learning-project". It is able to send a request, and it gets a response (the same works with my java me client). But just as described in this thread, when it reaches the server, the arguments are somehow lost.

My wsdl looks like

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Alex Parvan wrote:I found my problem, for some reason, i have to write all elements inside a schema and import that.

Thanks for sharing this. However, to me, it sounds strange - you should not have to do that. It should be possible to declare the message types in the <types> element of the WSDL.
An advice when writing a WSDL by hand is to use the WS-I Compliance Check tool to verify the correctness of the WSDL a step further than basic XML validation is able to do. Instructions here: http://www.soapui.org/userguide/tools/wsi.html
Best wishes!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Mattias Sands�ter wrote:
I tried soapUI with my small "learning-project". It is able to send a request, and it gets a response (the same works with my java me client). But just as described in this thread, when it reaches the server, the arguments are somehow lost.

Please do not hijack threads - you have already posted this question in another thread and once is enough.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service doesn't read my parameter
 
Similar Threads
MTOM example
SOAP Request and Response problem
JAX-WS wsgen using Maven2
Cannot find dispatch method for {http://www.ivan.com/additionservicetypes}addValuesRequest
Why do I see different wsdl and xsd generated for webservice through wsgen.