Hi...
I'm trying to separate the definitions for the object types a web service
will act on from the wsdl file, moving them into a separate schema.
Basically, my wsdl has an
<xsd:import namespace="foo" schemaLocation=".\objects.xsd"/> at the top.
I was hoping to do this because the objects may be useful to different types
of services in different places.
I'm having a problem, however, getting a web reference to make the right
client code. I enter a file:/// url in the Add Web Reference window with the
wsdl and xsd locally (have to let the embedded IE load local files). The
wizard pulls up the files and I see the list of methods in the pane but when
I go ahead and say Add Reference, I get compilation errors saying that it
can't find the datatypes to make code from
Is this something I just shouldn't be doing? I've tried xsd:import and
xsd:include but they both through similar kinds of errors.
Thanks
Mark
Hi Mark,
From your description, you're encountering some problem to add webreference
against a WSDL document which separate the WSDL parts into multiple files,
correct?
Based on my experience, using separate files to split the WSDL document
does be a reasonble approach and is supported, here is a MSDN article
introducing this also:
#Splitting up WSDL: The Importance of targetNamespace
http://msdn2.microsoft.com/en-us/library/aa480511.aspx
I think the problem is likely caused by the path. Have you tried edit the
WSDL document to use full path for those separate files? In addition, here
is a former web thread discussing on a similar issue, you can also refer to
it to see whether it can help some:
#build proxy with wsdl.exe (Error: Unable to import binding)
http://www.thescripts.com/forum/thread376410.html
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 13 Aug 2007 13:37 GMT
Hi Mark,
How are you doing on this issue, does the information in my last reply help
you some?
If you have any further questions, please don't hesitate to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.