• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WSDL external schema import

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a WSDL document belonging to tns 'myWebserviceTNS'. Next, I have an external schema belonging to tns 'testschema'. I want to import the schema in the WSDL document. I can do this like:




Now, in a message element I can refer to the external element as 'ts:myElement' (myElement being an element in the 'testschema.xsd').

Is this the only way to accomplish this ? I find it rather strange to create a new schema just to import an existing schema. Agreed, the new schema does not contain any elements, but it feels weird ?
[ December 27, 2006: Message edited by: Jim Janssens ]
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I find it rather strange to create a new schema just to import an existing schema. ...



You are not creating new schema here. Just you are refering to the already existing schema.. Thats how it is defined in WSDL spec as a syntax for importing other reusable schemas.. I dont feel odd in this.. How do you think this should be designed??
 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rizwan Mohammad:


You are not creating new schema here. Just you are refering to the already existing schema.. Thats how it is defined in WSDL spec as a syntax for importing other reusable schemas.. I dont feel odd in this.. How do you think this should be designed??



"<xsd:schema..." points out the beginning of a new schema, or not ? If you look at it is perhaps not that weird. But I feel that a separate WSDL function for importing schemas (like the import element for WSDL files) would perhaps be a better solution ?
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand what you are saying.. But thats how they have defined.
How I read that syntax myself is...

"For this wsdl document I need to define all types that I use....
So start defining new elements with schema element...
Start the definition of Schema...
I have 10 types to definie in this document...
I see that already 7 types are defined in some other document...
Lets import that first...
Now add additional 3 types now...
End the definition of schmea."

Sorry if I didn't make sense to you.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic