wsdl.exe fails with WebMethods generated wsdl file

Discussion in 'ASP .Net Web Services' started by mrnu, Jun 7, 2004.

  1. mrnu

    mrnu Guest

    Using WebMethods, Inc Developer tool to create a wsdl for a flow service. Try to use .NET wsdl utility to create a C# proxy, but get the errors below. Support person at WebMethods, Inc. says it is a bug in wsdl.exe. I have included the text of the wsdl generated by WebMethods along with the response from WebMethods support. I appreciate any assistance

    wsdl generated by WebMethods' Developer
    <?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="mtst" targetNamespace="http://mtsrvr/
    xmlns:wsdns1="http://localhost/mtst/tfs
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
    xmlns:xsd="http://www.w3.org/2001/XMLSchema
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
    xmlns:tns="http://mtsrvr/"><wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://localhost/mtst/tfs" xmlns:tns="http://localhost/mtst/tfs" xmlns:SOAP_ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><xsd:complexType name="__tfsInput"><xsd:sequence><xsd:element name="accountnumber" nillable="true" type="xsd:string"/><xsd:element name="ordernumber" nillable="true" type="xsd:string"/></xsd:sequence></xsd:complexType><xsd:complexType name="__tfsOutput"><xsd:sequence><xsd:element name="t" nillable="true" type="tns:__t"/></xsd:sequence></xsd:complexType><xsd:complexType name="__t"><xsd:sequence><xsd:element name="ns_x003A_BES" type="tns:__ns_x003A_BES"/></xsd:sequence></xsd:complexType><xsd:complexType name="__ns_x003A_BES"><xsd:sequence><xsd:element name="ns_x003A_BE" type="tns:ArrayOf__ns_x003A_BE" minOccurs="0"/></xsd:sequence></xsd:complexType><xsd:complexType name="__ns_x003A_BE"><xsd:sequence><xsd:element name="ns_x003A_AccountID" type="tns:__ns_x003A_AccountID"/><xsd:element name="ns_x003A_OrderNumber" type="tns:__ns_x003A_OrderNumber"/></xsd:sequence></xsd:complexType><xsd:simpleType name="__ns_x003A_AccountID"><xsd:restriction><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:whiteSpace value="preserve"/></xsd:restriction></xsd:simpleType><xsd:maxLength value="10"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="__ns_x003A_OrderNumber"><xsd:restriction><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:whiteSpace value="preserve"/></xsd:restriction></xsd:simpleType><xsd:maxLength value="6"/></xsd:restriction></xsd:simpleType><xsd:complexType name="ArrayOf__ns_x003A_BE"><xsd:complexContent><xsd:restriction base="SOAP_ENC:Array"><xsd:attribute ref="SOAP_ENC:arrayType" wsdl:arrayType="tns:__ns_x003A_BE[]"/></xsd:restriction></xsd:complexContent></xsd:complexType></xsd:schema></wsdl:types><wsdl:message name="tfsInput"><wsdl:part name="accountnumber" type="xsd:string"/><wsdl:part name="ordernumber" type="xsd:string"/></wsdl:message><wsdl:message name="tfsOutput"><wsdl:part name="t" type="wsdns1:__t"/></wsdl:message><wsdl:portType name="mtstPortType"><wsdl:eek:peration name="tfs"><wsdl:input message="tns:tfsInput"/><wsdl:eek:utput message="tns:tfsOutput"/></wsdl:eek:peration></wsdl:portType><wsdl:binding name="mtstBinding" type="tns:mtstPortType"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:eek:peration name="tfs"><soap:eek:peration soapAction=""/><wsdl:input><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://mtsrvr/mtst" use="encoded"/></wsdl:input><wsdl:eek:utput><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://mtsrvr/mtst" use="encoded"/></wsdl:eek:utput></wsdl:eek:peration></wsdl:binding><wsdl:service name="mtstService"><wsdl:port name="mtstPort0" binding="tns:mtstBinding"><soap:address location="http://mtsrvr:5555/soap/rpc"/></wsdl:port></wsdl:service></wsdl:definitions

    wsdl.exe errors
    Microsoft (R) Web Services Description Language Utilit
    [Microsoft (R) .NET Framework, Version 1.1.4322.573
    Copyright (C) Microsoft Corporation 1998-2002. All rights reserved

    Schema validation warning: Invalid 'type' attribute: The ':' character, hexadec
    mal value 0x3A, cannot be included in a name..
    Schema validation warning: Invalid 'type' attribute: The ':' character, hexadeci
    mal value 0x3A, cannot be included in a name..
    Schema validation warning: Invalid 'type' attribute: The ':' character, hexadeci
    mal value 0x3A, cannot be included in a name..
    Schema validation warning: Invalid 'type' attribute: The ':' character, hexadeci
    mal value 0x3A, cannot be included in a name..

    Warning: Schema could not be validated. Class generation may fail or may produce
    incorrect results.

    Error: Unable to import binding 'mtstBinding' from namespace 'http://mtsrvr/'.
    - Unable to import operation 'tfs'.
    - Schema with targetNamespace='http://localhost/mtst/tfs' has invalid syntax.
    - Invalid 'type' attribute: The ':' character, hexadecimal value 0x3A, cannot
    be included in a name..

    If you would like more help, please type "wsdl /?".

    WebMethods support response:
    From my investigation, I have found that this is a .NET bug. Please find
    below the explaination:
    In a WSDL file schema section the element "name" attribute is defined
    as an "NCName" in the XSD Specification[6].

    An NSName[4] has the following production defined in the XSD Spec[7]:
    NCName ::= (Letter | '_') (NCNameChar)*
    NCNameChar ::= Letter|Digit|'.'|'-'|'_'|CombiningChar|Extender

    ..NET seems to think that a "x003A" sequence in a WSDL file element
    "name" attribute has a ':' because it is the hex number of a ':'
    character[3], meaning it thinks the text is "rsi_:_OfficerName" which
    _would_ be illegal if the file really had "rsi_:_OfficerName" in it.
    This character sequence is part of an NSName[6] value, which allows a
    value of "x003A" to mean an element named "x003A".

    The XML Specification is very clear in how one should embed a Hex
    character definition in an XML file [5]. It is not the "x003A"
    sequence, but the entity reference "&#x003A".
     
    mrnu, Jun 7, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Edgecombe

    WSDL.EXE: WSDL Import Directive

    Stephen Edgecombe, Aug 13, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    240
    Stephen Edgecombe
    Aug 13, 2003
  2. RH
    Replies:
    1
    Views:
    265
    Dino Chiesa [Microsoft]
    May 27, 2004
  3. TR
    Replies:
    2
    Views:
    1,426
  4. how to use WSDL,exe generated code?

    , Oct 6, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    1,240
    John Saunders
    Oct 6, 2006
  5. Replies:
    3
    Views:
    489
    John Saunders
    Oct 7, 2008
Loading...

Share This Page