0

im pretty new in programming WCF Service Applications using C#. Currently im learning and what i was trying now is create a web service application class from WSDL. First of all i created a WSDL which is looking like the WSDL at the end of the post. Now i want to use the Tool "svcUtil" in order to create my class. In the command prompt i tried to write

C:\program files (x86)\Microsoft sdks\windows\v7.0a\bin>svcutil /language:csharp "c:\users\myNick\Documents\visual studio 2010\projects\myWSDL.wsdl"

and was expecting a class file to be written in the project folder. But i always got the following error message:

"Warning: No code was generated. If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.

Waring: if you would like to generate data contracts form schemas make sure to use the /datacontractonly option."

I was searching in internet for some help but wasn't able to figure out what is going wrong. Is anything is missing in my WSDL? From what i know everything should be there or am i wrong?

Thanks for help!

best regards

Marbuel

    <definitions>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://MyCompany.com/MyService/wsdl/abstract" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="Request">
      <xs:sequence>
        <xs:element name="Value" type="xs:string">
          <xs:annotation>
            <xs:documentation>
              Include here either string with XML escaped

              characters or in CDATA section
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
    <xs:complexType name="FaultMessage">
      <xs:sequence>
        <xs:element name="Value" type="xs:string">
          <xs:annotation>
            <xs:documentation>
              Include here either string with XML escaped

              characters or in CDATA section
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:schema>
  <types>
    data type definitions........
  </types>

  <message>
    <part name="FaultMessage" type="FaultMessage"></part>
  </message>
  <message name="RequestMessage">
    <part name="request" type="Request"/>
  </message>

  <portType name="MyInterface">
    <operation name="sendData">
      <input message="RequestMessage"></input>
      <fault name="fault1" message="FaultMessage"/>
    </operation>
  </portType>

  <binding xmlns:soap="http://www.w3.org/2001/XMLSchema" type="MyInterface" name="b1">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation>
      <soap:operation soapAction="http://example.com/sendData"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
</definitions>
4

0 に答える 0