Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8245243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:07:13+00:00 2026-06-07T22:07:13+00:00

In the WSDL that is generated from a WCF service, there are a few

  • 0

In the WSDL that is generated from a WCF service, there are a few problems that I’d like to take control of a little more. First, is there a way to add annotations to the xsd files generated with the WSDL without using surrogates?

    I’ve taken care of adding annotations to the WSDL itself thanks to the following articles:

    • http://msdn.microsoft.com/en-us/library/system.servicemodel.description.iwsdlexportextension.aspx”
    • http://www.codeproject.com/Articles/29980/Exporting-Annotations-from-WCF

    I was able to add annotations to data members through agillior, however they used surrogates which I would rather not use.

    • http://agilior.pt/blogs/bruno.camara/archive/2006/10/01/6.aspx


    I would use Thoranin’s solution except I want to apply the annotations to data members not parameters

    • http://thorarin.net/blog/post/2010/08/08/Controlling-WSDL-minOccurs-with-WCF.aspx

Second, I want to explicitly name the namespaces for the xsd files generated from the WSDL. I was able to take control over the namespace of the wsdl using the ServiceBehaviorAttribute: [ServiceBehavior(Namespace="http://mysite.com/HelloWorld")]
but unfortunately I can’t find an easy way to specify the namespace of the xsd files :(, is there a simple way to do this/can you point me in the right direction?

-edit-

Well I was being silly on the second request. I had forgotten to set the namespaces for my wcf files which is what maps to the xsd namespaces. My bad 🙂 .


Lastly, when the wsdl imports an xsd, it uses a path similar to http://localhost:8080/HostDevServer/HelloWorldService.svc?xsd=xsd0

which seems to break the wsdl2java ant script by apache. I can go in and manually change them to the local files but it’s just such a pain :). Is there any way to have the files generated and then have a local reference like:
HelloWorldService.xsd,HelloWorldService1.xsd etc?

Any feedback would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:07:15+00:00Added an answer on June 7, 2026 at 10:07 pm

    WCFExtras ftw:

    I decided that instead of having my own attributes and classes put documentation/annotation into the WSDL and XSD files I would just give into the hype and let WCFExtras take care of it. That being said I do wish that the Xml comments would be split into different lines instead of having them all on the same line. (Just to make reading the xml files easier). Plus WCFExtras takes care of the surrogate problem perfectly 🙂 !

    Ended up writing a program to solve the third issue. It pretty much grabs the metadata files using svcutil then goes in and finds all the imports, and reassigns them to the files downloaded based of off the namespaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF web service using wsHttpBinding that I am consuming from a
I have a class generated from a WSDL that has a bunch of public
I have a bunch of generated SOAP client stubs that differ between WSDL versions.
I have to consume a WCF WebServices but the WSDL contains bindings that PHP
I have a WSDL file defining a service that I have to implement in
Is there any tool that can read a WSDL file and based on the
I have the same problem that is listed in the following thread. WSDL first
The WSDL generated by WCF is describing all my bindings, and I want it
I am attempting to create a wcf service that accepts any input (Action=*) and
I have a WSDL that the consumer of my web service expects will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.