Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

part names in output and input

 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following wsdl fragments.
message named "InputMsg" and "OutputMsg" both have a
part called "Common" but the Common part in InputMsg
is typed string while the onter is int. as part name only
needs to unique accross the the enclosing message. Message declaraion
looks fine for me.

<message name="InputMsg">
<part name="para1" type="xsd:string"/>
<part name="Common" type="xsd:int"/>
</message>
<message name="OutputMsg>
<part name="Common" type="xsd:string>
</message>

<portType name="test">
<operation name="TestOP>
<input message="InputMsg"/>
<output message="OutputMsg"/>
</portType>


My question is for the TestOP operation. As part named "Common"
appears both in operattion TestOP's input and output message.
Will "Common" part become and in/out parameter?. Logically the
anwser should be no. Not for java, you would say. But I cannot
find a definitive answer for this situation.
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By Basic Profile if you are using the same part name in both input and output then it has to be of the same type .

It would be called as INOUT parameter .

Richard's book has a good description of this in the WSDL chapter.
[ June 01, 2004: Message edited by: Santosh Ram ]
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By Basic Profile if you are using the same part name in both input and output then it has to be of the same type

I cannot find requirment that backs up your claim. Could you point out the
require number to me?

BTW, the term "in/out paramenter" is used bywsdl Note.
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zhou I have been reading Richard M H J2EE Web Services book, I read that in the SOAP and WSDL chapter.

I think Richard M H is around this forum he may give you better explanation. :roll:
 
roland polzer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monson-Haefel, p. 144:

"When the <input> and <output> elements in a <portType> declare a part with the same name, it's an INOUT parameter, and the type must be the same in the <input> and <output> elements"

Cheers,
Roland
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys, I found it in the book too. However, It's not very clear if the claim in the book also logically implies the following statment:

If two message definitions each contains parts with different
type but the same name, then these two messages cannot be used in the soap perarion such that one of the message is used in input and the other is used as output.


I was trying to find out if above statment is implyed by BP and wsdl spec. However, I would guess that above statemnet is false and in the case the messages is used in a soap peration it is more logical for me that they corresponds to one IN parameter and one OUT paremeter separately. I am studying the wsdl note and BP1.0 file to figure it out.
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I agree with u that it should be an IN and OUT and not INOUT becuase the wire signature s are not the same so its not the same part .
If the types were the same then its an INOUT I think that is what RMH implies for it to qualify as INOUT the types have to be the same. (pg 144 quoted)

Any thoughts .
I think Richard can is the best person to clarify this for us though.
Dhiren
 
Richard Monson-Haefel
author
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an input and output message have a part with the same name, but a different type, than they would be interpreted as different paramters (IN and OUT). That said, the WS-I BP clearly prohibits this so if an input and output have a part with the same name, they must be the same type and therefor it represents an INOUT parameter.
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard,
I am unable to find out relevant discussions in Basic Profile Version 1.0 that can support the following claim in your post:

the WS-I BP clearly prohibits this so if an input and output have a part with the same name, they must be the same type


Could you possibly give me a clue either as form of the requirement statement number or cut and paste some text from Basic Profile Version 1.0? Am I looking at wrong document?
I appreicate your help very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic