Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

part names in output and input

 
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.
 
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:
 
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.
 
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
 
author
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.
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic