Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create seperate XSD files for each class to send with WSDL

Status
Not open for further replies.

rrchowdhary

Programmer
Aug 26, 2005
20
GB
Hi

I am developing a WCF service in .net and would like to give the wsdl file to the customer who can consume our service. I successfully Generated the wsdl which includes the following xsd import statements
<xsd:import schemaLocation=" namespace="Service-v1" />
<xsd:import schemaLocation=" />
etc

**But what I would like to know is, is that is the best way or sufficient to send the wsdl to the customer or do I need to send them the XSD files as well..**

How can I generate seperate XSD files for each class like class1.xsd, class2.xsd, class3.xsd so I can send it to them along with wsdl file

here is my project structure
Code:
[b]DataModel[/b]

  Class1.cs
  {
          [DataMember(Name = "Term", IsRequired = true, Order = 3)]
        public decimal Term { get; set; }
        
         private int _cdrfield { get; set; }
        [DataMember(Name = "CDR", Order = 4)]
        public int CDR
        {
            get
            {
                return (int)this._cdrfield;
            }
            set
            {
                this._cdrfield = value;
            }
        }
        [DataContract(Name = "CDR")]
        public enum CDREnumeration
        {
            [EnumMember()]
            item1Mb = 1,
            [EnumMember()]
            item1Mb = 2

         }
   }

  Class2.cs
  {

  }
  Class3.cs
  {

  }
 Response.cs
 {
 }
[b]Contract[/b]
  IService1 with the following contracts
    Response GetQuote1(Class1 class1Request);
    Response GetQuote2(Class2 class2Request);
    Response GetQuote2(Class2 class2Request);
  
[b]Service[/b]
 Service1 : Iservice1
    public Response GetQuote1(Class1 class1Request)
      {
              return response;
      }
   public Response GetQuote2(Class2 class2Request)
      {
              return response;
      }
   public Response GetQuote3(Class3 class3Request)
      {
              return response;
      }
I really appreciate your input as I search on the internet but couldn't be able to decide on the best option as we have no control over the other end who is going to implement our wcf service.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top