Jan 21st, 2010, 06:15 AM
"sch" prefix out of nowhere
In order to learn Spring WS, I've created a simple web service which adds to integer numbers and returns the result to the client. My service works fine. I've tested it with SoapUI. Nevertheless, when SoapUI retrievs the wsdl to present the request XML, there appears a strange prefix "sch:" instead of the one I put in the schema.
This prefix is nowhere in the wsdl.
The prefixes in the response are OK.
Where does the prefix come from? Why is my prefix not used?
I use Spring WS 1.5.7
Jan 21st, 2010, 10:03 AM
It's just a namespace bound to your schema. The namespace prefix is irrelevant. It could be 'sch', 'ns' or 'ns1' it doesn't really matter.
Jan 21st, 2010, 11:44 AM
Thanks for your reply, Chudak.
As I looked closer at the wsdl, I found you're right.
The prefix I used in my schema does not get passed to wsdl.
"tns" prefix (target namespace) is used instead in the wsdl.
That's why clients can use whatever prefix they like, provided it is bound to the target namespace. And SoapUI seems to like "sch".
If you find something wrong in my reasoning, please let me know.
Jan 21st, 2010, 12:07 PM
Your reasoning is correct. Some tools use 'sch'--some use 'tns' or 'ns1'. It really doesn't matter what the prefix is as long as it is bound to the correct namespace URI.
Originally Posted by brtj
Jan 21st, 2010, 12:09 PM
Thanks again. Now, it's all clear to me.