Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


SOAP Response from Webservice

SOAP Response from Webservice

SOAP Response from Webservice


I have a situation where I have created a web service that requests 2 parameters. However, one of the parameters needs to be optional. Now when I say optional I mean that nothing gets passed at all - not even NULL. So what I did was create 2 web methods with the same name, but different message names.

When I test this using http I get the desired results. However, I need it to work with SOAP and SOAP just ignores the second parameter all together and does not give me the results I want.

Is it possible for this to work with SOAP?



RE: SOAP Response from Webservice

Well, I've tried to overload a method, creating the same method twice (with one param and with 2 params), but it complains about this:


WSDL and XML schema allow each element to have only one definition, so unique names must be chosen.

So I think (but I'm not a SOAP expert) you have 2 options: create 2 different methods, or only one method but with a mandatory second param (that can be null, but must be present).


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close