This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes Value cannot be null. Parameter name: s Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Value cannot be null. Parameter name: s" Watch "Value cannot be null. Parameter name: s" New topic
Author

Value cannot be null. Parameter name: s

Matt Middleton
Greenhorn

Joined: Feb 23, 2010
Posts: 7
I am working on a client for a SOAP Web Service and am running into this error. I was able to generate the classes I need from the wsdl fine, but when I go to send a value to any of the services I get the following error:

The server reports getting called, but not receiving any value. I am writing the client in Java and the Server is written in C#.

The services in question only take in 1 value of type String, but that String contains XML that is currently not encased in CDATA tags. Any help would be greatly appreciated. Thanks!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I don't know what causes the problem, but I still want to suggest a way to examine the problem closer and hopefully resolve it:
First, try invoking the web service using soapUI. This way you will hopefully see what a good SOAP message looks like.
Second, examine the SOAP message sent by your client using Wireshark or some other packet inspection software.
Having done the above, you will hopefully be able to determine what the difference between a good SOAP message and the message generated by your client is and devise a remedy to your problem.
If you have already tried this, ignore all of the above.
Best wishes!
Matt Middleton
Greenhorn

Joined: Feb 23, 2010
Posts: 7
Thanks Ivan, the SoapUI tip definitely helped out.

I found the problem, they updated the WSDL and didn't let me know, all I had to do was rerun wsconsume (a jboss util) to regenerate the java classes and it was fixed. Just to add some detail that may or may not be helpful, the parameter s that was mentioned was a variable name on the servers end.
 
GeeCON Prague 2014
 
subject: Value cannot be null. Parameter name: s