INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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!

*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.

Jobs

WSDL Message definition and elements - what are the rules???

WSDL Message definition and elements - what are the rules???

WSDL Message definition and elements - what are the rules???

(OP)
Hi,

Would someone be able to tell me if there is a requirement in XML/WSDL/SOAP rules which means an application must return a response message with the same top-level element as defined in the WSDL thata client would use?

For example, if I have a WSDL that contains the following:

<wsdl:message name="ServiceResponseMessage">
  <wsdl:part name="Header" element="v1_0:Header"/>
  <wsdl:part name="Body" element="v1_0:ServiceResponse"/>
</wsdl:message>

Then the body element in the response message from the application should have ServiceResponse as the top level element.

Is the above correct or can the application return a body part that has "ResponseBody" as the top level element? Should this make any difference to the calling client?

Does the message returned from the application need to start with the same top level element but use any namespaces it wishes as they are just references?

Many thanks for your help,

Steve

RE: WSDL Message definition and elements - what are the rules???

Think on the WSDL as a contract with the client. So, yes, the client is expecting a response that will follow the schema shown in the WSDL file.

Cheers,
Dian

RE: WSDL Message definition and elements - what are the rules???

(OP)
Thanks Dian.

I assumed that would be the case but wasn't sure if there were rules that said the client could still accept a response where the top level was different but then I guess it could not confirm it was getting the right response.

Steve

RE: WSDL Message definition and elements - what are the rules???

Well, it's up to the client to validate the message or not but even if chooses to not do it, how would know if the top element is just renamed or the structure has changed? The structure uses to be necessary to properly identify the data contained in it.

Cheers,
Dian

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!

Resources

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