Title: Message
Alex,
 
What is doable in my opinion is that you can put them in different namespaces (you cannot use the same namespace, because as I've already said there is no includes in wsdl, so you need to use different namespace). Putting different pieces in different namespaces shouldn't be a problem for you, because resulting wsdl will have them all and your messages itself are intact. In this case your master wsdl file <import>s other wsdl files.
 
Splitting wsdl in manageable pieces is a good cause. Not everybody does this. I don't know how big your wsdl is, but the biggest one I saw so far was from Microsoft http://service.mappoint.net/find-20/mappoint.wsdl .
 
In our company we use another approach. We split xsds which are generated by our tools for every component in complex hierarchies, trying to reuse code, and have one wsdl  per component/application, which imports top level xsd definitions.
 
I don't know the best approach for you, but the one I suggested should work. There is one site which covers best practices for xsd schemas (http://www.xfront.com/BestPracticesHomepage.html) but not specifically wsdl.
 
Thanks,
Michael
 
-----Original Message-----
From: Alex Huang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 2:07 PM
To: [EMAIL PROTECTED]
Subject: RE: Problem with multiple imports...

Hi Michael,
 
Thanks for the quick reply.  Maybe it's my understanding of Namespace that's the problem then.  Let me describe what I'm trying to do.  Let me know if it's not doable or I'm doing it incorrectly.
 
With a port and soap binding declaration for each method, I have a very long wsdl file.  My whole intent is to group the methods into smaller wsdl files but I want them to use the same name space and the same port.  Is that doable? 
 
If that's not the right way to do this, then what's the correct approach?  Is it to assign a different port to each group of methods? 
 
There's nothing I can find in the wsdl spec about this.
 
Thanks for any help you can give me.
 
--Alex
-----Original Message-----
From: Sapozhnikov, Michael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:20 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with multiple imports...

Alex,
 
As far as I know  WSDL's grammar for <import> is similar to xsd schemas' grammar (only location is used enstead of schemaLocation) and in xsd schemas you cannot use <import> when you use target namespace are the same, there is an <include> for this. AFAIK, there is no <include> in wsdl so try to change namespaces to something different in imported wsdl fragments.
WSDL spec (http://www.w3.org/TR/wsdl) has comprehensive example in section 2.1.2.
 
Michael
-----Original Message-----
From: Alex Huang [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 5:42 PM
To: [EMAIL PROTECTED]
Subject: Problem with multiple imports...

In an effort to organize a rather large set of API commands in wsdl, we decided to break the wsdl file into multiple files and use import.  Each of these files have their own type, message, port, binding but no service.  Each file uses the same namespace.  I have a master file that imports all of these files and declare one service.  However, I'm getting a weird condition that only the first import appear in the generated files and the subsequent imports simply disappear.  If I only have one import then everything is fine.

 

Please note that each wsdl file are using the same namespace, same port name, and same binding name.  I'm not trying to partition the api into different ports.  I'm merely trying to divide up the wsdl file so it's easier for me to manage.

 

Am I doing this incorrectly?

 

Any suggest would be welcome.

 

--Alex

Reply via email to