Problem adding a reference to a web service.

Discussion in 'ASP .Net Web Services' started by VGE, Feb 20, 2008.

  1. VGE

    VGE Guest

    I am having a problem when trying to add a Service Reference to a web
    service created in php using NuSoap. If I run the wsdl through a
    validator it comes back clean and if I try it at soapclient.com
    (http://www.soapclient.com/soapclien...portal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    generates a form for the webservice based off the wsdl. However if I try
    to do it through the IDE in 2008 I get the following:

    The HTML document does not contain Web service discovery information.
    Metadata contains a reference that cannot be resolved:
    'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    The content type text/xml; charset=ISO-8859-1 of the response message
    does not match the content type of the binding (application/soap+xml;
    charset=utf-8). If using a custom encoder, be sure that the
    IsContentTypeSupported method is implemented properly. The first 691
    bytes of the response were: '<?xml version="1.0"
    encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    xsi:type="xsd:string">Client</faultcode><faultactor
    xsi:type="xsd:string"></faultactor><faultstring
    xsi:type="xsd:string">Operation &apos;&apos; is not defined in the WSDL
    for this service</faultstring><detail
    xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>'.
    The remote server returned an error: (500) Internal Server Error.
    If the service is defined in the current solution, try building the
    solution and adding the service reference again.

    And if I get the WSDL and save it locally and try generating using the
    WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:

    Error: There is an error in XML document (97, 41).
    - The element was not expected in this context: <xsd:enumeration
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    http://www.w3.org/2001/XMLSchema:list,
    http://www.w3.org/2001/XMLSchema:restriction,
    http://www.w3.org/2001/XMLSchema:union.

    And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I get:

    Error: Cannot read PNGQuote.wsdl.

    WSDL Parsing Error while reading:
    'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that the
    XML is both well-formed and valid.

    There is an error in XML document (97, 41).

    The element was not expected in this context: <xsd:enumeration
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    http://www.w3.org/2001/XMLSchema:list,
    http://www.w3.org/2001/XMLSchema:restriction,
    http://www.w3.org/2001/XMLSchema:union.

    Any help would be appreciated.
     
    VGE, Feb 20, 2008
    #1
    1. Advertising

  2. VGE

    Steven Cheng Guest

    Hi VGE,

    It seems the WCF "Add Service Reference" wizard can not quite parse the
    webservice WSDL document you provided. Is there a public accessible url of
    a test service? If so, I can do some tests on my side against it.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >Date: Wed, 20 Feb 2008 18:25:16 -0500
    >From: VGE <>
    >User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >MIME-Version: 1.0
    >Subject: Problem adding a reference to a web service.


    >
    >I am having a problem when trying to add a Service Reference to a web
    >service created in php using NuSoap. If I run the wsdl through a
    >validator it comes back clean and if I try it at soapclient.com
    >(http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfo

    rm&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://ecare.pngcom.com/agentpor
    tal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    >generates a form for the webservice based off the wsdl. However if I try
    >to do it through the IDE in 2008 I get the following:
    >
    >The HTML document does not contain Web service discovery information.
    >Metadata contains a reference that cannot be resolved:
    >'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    >The content type text/xml; charset=ISO-8859-1 of the response message
    >does not match the content type of the binding (application/soap+xml;
    >charset=utf-8). If using a custom encoder, be sure that the
    >IsContentTypeSupported method is implemented properly. The first 691
    >bytes of the response were: '<?xml version="1.0"
    >encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    >xsi:type="xsd:string">Client</faultcode><faultactor
    >xsi:type="xsd:string"></faultactor><faultstring
    >xsi:type="xsd:string">Operation &apos;&apos; is not defined in the WSDL
    >for this service</faultstring><detail
    >xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:

    Envelope>'.
    >The remote server returned an error: (500) Internal Server Error.
    >If the service is defined in the current solution, try building the
    >solution and adding the service reference again.
    >
    >And if I get the WSDL and save it locally and try generating using the
    >WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:
    >
    >Error: There is an error in XML document (97, 41).
    > - The element was not expected in this context: <xsd:enumeration
    >xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >http://www.w3.org/2001/XMLSchema:list,
    >http://www.w3.org/2001/XMLSchema:restriction,
    >http://www.w3.org/2001/XMLSchema:union.
    >
    >And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I get:
    >
    >Error: Cannot read PNGQuote.wsdl.
    >
    > WSDL Parsing Error while reading:
    >'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that the
    >XML is both well-formed and valid.
    >
    > There is an error in XML document (97, 41).
    >
    > The element was not expected in this context: <xsd:enumeration
    >xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >http://www.w3.org/2001/XMLSchema:list,
    >http://www.w3.org/2001/XMLSchema:restriction,
    >http://www.w3.org/2001/XMLSchema:union.
    >
    >Any help would be appreciated.
    >
     
    Steven Cheng, Feb 21, 2008
    #2
    1. Advertising

  3. VGE

    VGE Guest

    http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php

    Steven Cheng wrote:
    > Hi VGE,
    >
    > It seems the WCF "Add Service Reference" wizard can not quite parse the
    > webservice WSDL document you provided. Is there a public accessible url of
    > a test service? If so, I can do some tests on my side against it.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    > --------------------
    >> Date: Wed, 20 Feb 2008 18:25:16 -0500
    >> From: VGE <>
    >> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >> MIME-Version: 1.0
    >> Subject: Problem adding a reference to a web service.

    >
    >> I am having a problem when trying to add a Service Reference to a web
    >> service created in php using NuSoap. If I run the wsdl through a
    >> validator it comes back clean and if I try it at soapclient.com
    >> (http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfo

    > rm&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://ecare.pngcom.com/agentpor
    > tal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    >> generates a form for the webservice based off the wsdl. However if I try
    >> to do it through the IDE in 2008 I get the following:
    >>
    >> The HTML document does not contain Web service discovery information.
    >> Metadata contains a reference that cannot be resolved:
    >> 'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    >> The content type text/xml; charset=ISO-8859-1 of the response message
    >> does not match the content type of the binding (application/soap+xml;
    >> charset=utf-8). If using a custom encoder, be sure that the
    >> IsContentTypeSupported method is implemented properly. The first 691
    >> bytes of the response were: '<?xml version="1.0"
    >> encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    >> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    >> xsi:type="xsd:string">Client</faultcode><faultactor
    >> xsi:type="xsd:string"></faultactor><faultstring
    >> xsi:type="xsd:string">Operation &apos;&apos; is not defined in the WSDL
    >> for this service</faultstring><detail
    >> xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:

    > Envelope>'.
    >> The remote server returned an error: (500) Internal Server Error.
    >> If the service is defined in the current solution, try building the
    >> solution and adding the service reference again.
    >>
    >> And if I get the WSDL and save it locally and try generating using the
    >> WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:
    >>
    >> Error: There is an error in XML document (97, 41).
    >> - The element was not expected in this context: <xsd:enumeration
    >> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >> http://www.w3.org/2001/XMLSchema:list,
    >> http://www.w3.org/2001/XMLSchema:restriction,
    >> http://www.w3.org/2001/XMLSchema:union.
    >>
    >> And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I get:
    >>
    >> Error: Cannot read PNGQuote.wsdl.
    >>
    >> WSDL Parsing Error while reading:
    >> 'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that the
    >> XML is both well-formed and valid.
    >>
    >> There is an error in XML document (97, 41).
    >>
    >> The element was not expected in this context: <xsd:enumeration
    >> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >> http://www.w3.org/2001/XMLSchema:list,
    >> http://www.w3.org/2001/XMLSchema:restriction,
    >> http://www.w3.org/2001/XMLSchema:union.
    >>
    >> Any help would be appreciated.
    >>

    >
     
    VGE, Feb 21, 2008
    #3
  4. VGE

    Steven Cheng Guest

    Hi VGE,

    I've managed to perform some tests and research based on the url(WSDL
    document) you provided. I did get the error when try "Adding WebReference"
    or "Adding Service Reference" against it. Also, the GUI interface doesn't
    provide quite much information. After using the "wsdl.exe" commandline
    utility to generate webservice proxy, I've got some more detailed error
    info. Most of them are related to the type definiation within the "schema"
    part of the WSDL document. There has many problems such as attribute has on
    value(the "base" attribute), the element is not put in the correct nested
    hierarchy according to xml schema spec(W3C SPEC). After changed them(supply
    some test values), it still report some WSDL format error in
    commandline(maybe due to the WSDL document doesn't conform to BP 1.1 spec),
    however, I've been able to generate service reference proxy through "Add
    WebReference". Is this WSDL authored by your members or your partner who
    provide the service? I would suggest you contact with the wsdl author and
    perform more validation on the WSDL document as it does exists some
    problems that may cause proxy generator to fail. If you need, I can email
    you the modified WSDL document.


    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    >Date: Thu, 21 Feb 2008 17:37:20 -0500
    >From: VGE <>
    >User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >MIME-Version: 1.0
    >Subject: Re: Problem adding a reference to a web service.


    >
    >http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php
    >
    >Steven Cheng wrote:
    >> Hi VGE,
    >>
    >> It seems the WCF "Add Service Reference" wizard can not quite parse the
    >> webservice WSDL document you provided. Is there a public accessible url

    of
    >> a test service? If so, I can do some tests on my side against it.
    >>
    >> Sincerely,
    >>
    >> Steven Cheng
    >>
    >> Microsoft MSDN Online Support Lead
    >>
    >>
    >> This posting is provided "AS IS" with no warranties, and confers no

    rights.
    >>
    >>
    >> --------------------
    >>> Date: Wed, 20 Feb 2008 18:25:16 -0500
    >>> From: VGE <>
    >>> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >>> MIME-Version: 1.0
    >>> Subject: Problem adding a reference to a web service.

    >>
    >>> I am having a problem when trying to add a Service Reference to a web
    >>> service created in php using NuSoap. If I run the wsdl through a
    >>> validator it comes back clean and if I try it at soapclient.com
    >>>

    (http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfo
    >>

    rm&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://ecare.pngcom.com/agentpor
    >> tal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    >>> generates a form for the webservice based off the wsdl. However if I

    try
    >>> to do it through the IDE in 2008 I get the following:
    >>>
    >>> The HTML document does not contain Web service discovery information.
    >>> Metadata contains a reference that cannot be resolved:
    >>> 'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    >>> The content type text/xml; charset=ISO-8859-1 of the response message
    >>> does not match the content type of the binding (application/soap+xml;
    >>> charset=utf-8). If using a custom encoder, be sure that the
    >>> IsContentTypeSupported method is implemented properly. The first 691
    >>> bytes of the response were: '<?xml version="1.0"
    >>> encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    >>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    >>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    >>> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    >>> xsi:type="xsd:string">Client</faultcode><faultactor
    >>> xsi:type="xsd:string"></faultactor><faultstring
    >>> xsi:type="xsd:string">Operation &apos;&apos; is not defined in the WSDL
    >>> for this service</faultstring><detail
    >>>

    xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:
    >> Envelope>'.
    >>> The remote server returned an error: (500) Internal Server Error.
    >>> If the service is defined in the current solution, try building the
    >>> solution and adding the service reference again.
    >>>
    >>> And if I get the WSDL and save it locally and try generating using the
    >>> WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:
    >>>
    >>> Error: There is an error in XML document (97, 41).
    >>> - The element was not expected in this context: <xsd:enumeration
    >>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>> http://www.w3.org/2001/XMLSchema:list,
    >>> http://www.w3.org/2001/XMLSchema:restriction,
    >>> http://www.w3.org/2001/XMLSchema:union.
    >>>
    >>> And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I

    get:
    >>>
    >>> Error: Cannot read PNGQuote.wsdl.
    >>>
    >>> WSDL Parsing Error while reading:
    >>> 'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that the
    >>> XML is both well-formed and valid.
    >>>
    >>> There is an error in XML document (97, 41).
    >>>
    >>> The element was not expected in this context: <xsd:enumeration
    >>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>> http://www.w3.org/2001/XMLSchema:list,
    >>> http://www.w3.org/2001/XMLSchema:restriction,
    >>> http://www.w3.org/2001/XMLSchema:union.
    >>>
    >>> Any help would be appreciated.
    >>>

    >>

    >
     
    Steven Cheng, Feb 25, 2008
    #4
  5. VGE

    VGE Guest

    Please send me the modified WSDL so that I can forward it on to our
    partner with your description of the issue.

    Thanks,

    VGE
    Steven Cheng wrote:
    > Hi VGE,
    >
    > I've managed to perform some tests and research based on the url(WSDL
    > document) you provided. I did get the error when try "Adding WebReference"
    > or "Adding Service Reference" against it. Also, the GUI interface doesn't
    > provide quite much information. After using the "wsdl.exe" commandline
    > utility to generate webservice proxy, I've got some more detailed error
    > info. Most of them are related to the type definiation within the "schema"
    > part of the WSDL document. There has many problems such as attribute has on
    > value(the "base" attribute), the element is not put in the correct nested
    > hierarchy according to xml schema spec(W3C SPEC). After changed them(supply
    > some test values), it still report some WSDL format error in
    > commandline(maybe due to the WSDL document doesn't conform to BP 1.1 spec),
    > however, I've been able to generate service reference proxy through "Add
    > WebReference". Is this WSDL authored by your members or your partner who
    > provide the service? I would suggest you contact with the wsdl author and
    > perform more validation on the WSDL document as it does exists some
    > problems that may cause proxy generator to fail. If you need, I can email
    > you the modified WSDL document.
    >
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > --------------------
    >> Date: Thu, 21 Feb 2008 17:37:20 -0500
    >> From: VGE <>
    >> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >> MIME-Version: 1.0
    >> Subject: Re: Problem adding a reference to a web service.

    >
    >> http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php
    >>
    >> Steven Cheng wrote:
    >>> Hi VGE,
    >>>
    >>> It seems the WCF "Add Service Reference" wizard can not quite parse the
    >>> webservice WSDL document you provided. Is there a public accessible url

    > of
    >>> a test service? If so, I can do some tests on my side against it.
    >>>
    >>> Sincerely,
    >>>
    >>> Steven Cheng
    >>>
    >>> Microsoft MSDN Online Support Lead
    >>>
    >>>
    >>> This posting is provided "AS IS" with no warranties, and confers no

    > rights.
    >>>
    >>> --------------------
    >>>> Date: Wed, 20 Feb 2008 18:25:16 -0500
    >>>> From: VGE <>
    >>>> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >>>> MIME-Version: 1.0
    >>>> Subject: Problem adding a reference to a web service.
    >>>> I am having a problem when trying to add a Service Reference to a web
    >>>> service created in php using NuSoap. If I run the wsdl through a
    >>>> validator it comes back clean and if I try it at soapclient.com
    >>>>

    > (http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfo
    > rm&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://ecare.pngcom.com/agentpor
    >>> tal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    >>>> generates a form for the webservice based off the wsdl. However if I

    > try
    >>>> to do it through the IDE in 2008 I get the following:
    >>>>
    >>>> The HTML document does not contain Web service discovery information.
    >>>> Metadata contains a reference that cannot be resolved:
    >>>> 'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    >>>> The content type text/xml; charset=ISO-8859-1 of the response message
    >>>> does not match the content type of the binding (application/soap+xml;
    >>>> charset=utf-8). If using a custom encoder, be sure that the
    >>>> IsContentTypeSupported method is implemented properly. The first 691
    >>>> bytes of the response were: '<?xml version="1.0"
    >>>> encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    >>>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    >>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >>>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    >>>> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    >>>> xsi:type="xsd:string">Client</faultcode><faultactor
    >>>> xsi:type="xsd:string"></faultactor><faultstring
    >>>> xsi:type="xsd:string">Operation &apos;&apos; is not defined in the WSDL
    >>>> for this service</faultstring><detail
    >>>>

    > xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:
    >>> Envelope>'.
    >>>> The remote server returned an error: (500) Internal Server Error.
    >>>> If the service is defined in the current solution, try building the
    >>>> solution and adding the service reference again.
    >>>>
    >>>> And if I get the WSDL and save it locally and try generating using the
    >>>> WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:
    >>>>
    >>>> Error: There is an error in XML document (97, 41).
    >>>> - The element was not expected in this context: <xsd:enumeration
    >>>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>>> http://www.w3.org/2001/XMLSchema:list,
    >>>> http://www.w3.org/2001/XMLSchema:restriction,
    >>>> http://www.w3.org/2001/XMLSchema:union.
    >>>>
    >>>> And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I

    > get:
    >>>> Error: Cannot read PNGQuote.wsdl.
    >>>>
    >>>> WSDL Parsing Error while reading:
    >>>> 'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that the
    >>>> XML is both well-formed and valid.
    >>>>
    >>>> There is an error in XML document (97, 41).
    >>>>
    >>>> The element was not expected in this context: <xsd:enumeration
    >>>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>>> http://www.w3.org/2001/XMLSchema:list,
    >>>> http://www.w3.org/2001/XMLSchema:restriction,
    >>>> http://www.w3.org/2001/XMLSchema:union.
    >>>>
    >>>> Any help would be appreciated.
    >>>>

    >
     
    VGE, Feb 26, 2008
    #5
  6. VGE

    Steven Cheng Guest

    Thanks for your reply VGE,

    No problem. Please send me a mail through the following address:

    "stcheng" + "@" + "microsoft.com"

    I'll reply you with the modified WSDL file.

    Regards,

    Steven
    --------------------
    >Date: Tue, 26 Feb 2008 17:07:18 -0500
    >From: VGE <>
    >User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >MIME-Version: 1.0
    >Subject: Re: Problem adding a reference to a web service.


    >
    >Please send me the modified WSDL so that I can forward it on to our
    >partner with your description of the issue.
    >
    >Thanks,
    >
    >VGE
    >Steven Cheng wrote:
    >> Hi VGE,
    >>
    >> I've managed to perform some tests and research based on the url(WSDL
    >> document) you provided. I did get the error when try "Adding

    WebReference"
    >> or "Adding Service Reference" against it. Also, the GUI interface

    doesn't
    >> provide quite much information. After using the "wsdl.exe" commandline
    >> utility to generate webservice proxy, I've got some more detailed error
    >> info. Most of them are related to the type definiation within the

    "schema"
    >> part of the WSDL document. There has many problems such as attribute has

    on
    >> value(the "base" attribute), the element is not put in the correct

    nested
    >> hierarchy according to xml schema spec(W3C SPEC). After changed

    them(supply
    >> some test values), it still report some WSDL format error in
    >> commandline(maybe due to the WSDL document doesn't conform to BP 1.1

    spec),
    >> however, I've been able to generate service reference proxy through "Add
    >> WebReference". Is this WSDL authored by your members or your partner

    who
    >> provide the service? I would suggest you contact with the wsdl author

    and
    >> perform more validation on the WSDL document as it does exists some
    >> problems that may cause proxy generator to fail. If you need, I can

    email
    >> you the modified WSDL document.
    >>
    >>
    >> Sincerely,
    >>
    >> Steven Cheng
    >>
    >> Microsoft MSDN Online Support Lead
    >>
    >>
    >> This posting is provided "AS IS" with no warranties, and confers no

    rights.
    >>
    >> --------------------
    >>> Date: Thu, 21 Feb 2008 17:37:20 -0500
    >>> From: VGE <>
    >>> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >>> MIME-Version: 1.0
    >>> Subject: Re: Problem adding a reference to a web service.

    >>
    >>> http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php
    >>>
    >>> Steven Cheng wrote:
    >>>> Hi VGE,
    >>>>
    >>>> It seems the WCF "Add Service Reference" wizard can not quite parse

    the
    >>>> webservice WSDL document you provided. Is there a public accessible

    url
    >> of
    >>>> a test service? If so, I can do some tests on my side against it.
    >>>>
    >>>> Sincerely,
    >>>>
    >>>> Steven Cheng
    >>>>
    >>>> Microsoft MSDN Online Support Lead
    >>>>
    >>>>
    >>>> This posting is provided "AS IS" with no warranties, and confers no

    >> rights.
    >>>>
    >>>> --------------------
    >>>>> Date: Wed, 20 Feb 2008 18:25:16 -0500
    >>>>> From: VGE <>
    >>>>> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
    >>>>> MIME-Version: 1.0
    >>>>> Subject: Problem adding a reference to a web service.
    >>>>> I am having a problem when trying to add a Service Reference to a web
    >>>>> service created in php using NuSoap. If I run the wsdl through a
    >>>>> validator it comes back clean and if I try it at soapclient.com
    >>>>>

    >>

    (http://www.soapclient.com/soapclient?template=/clientform.html&fn=soapfo
    >>

    rm&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://ecare.pngcom.com/agentpor
    >>>> tal2/dedicated/WSTest/PNGQuote.php?wsdl)it
    >>>>> generates a form for the webservice based off the wsdl. However if I

    >> try
    >>>>> to do it through the IDE in 2008 I get the following:
    >>>>>
    >>>>> The HTML document does not contain Web service discovery information.
    >>>>> Metadata contains a reference that cannot be resolved:
    >>>>> 'http://ecare.pngcom.com/agentportal2/dedicated/WSTest/PNGQuote.php'.
    >>>>> The content type text/xml; charset=ISO-8859-1 of the response message
    >>>>> does not match the content type of the binding (application/soap+xml;
    >>>>> charset=utf-8). If using a custom encoder, be sure that the
    >>>>> IsContentTypeSupported method is implemented properly. The first 691
    >>>>> bytes of the response were: '<?xml version="1.0"
    >>>>> encoding="ISO-8859-1"?><SOAP-ENV:Envelope
    >>>>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    >>>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    >>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >>>>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    >>>>> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
    >>>>> xsi:type="xsd:string">Client</faultcode><faultactor
    >>>>> xsi:type="xsd:string"></faultactor><faultstring
    >>>>> xsi:type="xsd:string">Operation &apos;&apos; is not defined in the

    WSDL
    >>>>> for this service</faultstring><detail
    >>>>>

    >>

    xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:
    >>>> Envelope>'.
    >>>>> The remote server returned an error: (500) Internal Server Error.
    >>>>> If the service is defined in the current solution, try building the
    >>>>> solution and adding the service reference again.
    >>>>>
    >>>>> And if I get the WSDL and save it locally and try generating using

    the
    >>>>> WSDL tool (wsdl /o:pngQuote.cs PngQuote.wsdl) I get the following:
    >>>>>
    >>>>> Error: There is an error in XML document (97, 41).
    >>>>> - The element was not expected in this context: <xsd:enumeration
    >>>>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>>>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>>>> http://www.w3.org/2001/XMLSchema:list,
    >>>>> http://www.w3.org/2001/XMLSchema:restriction,
    >>>>> http://www.w3.org/2001/XMLSchema:union.
    >>>>>
    >>>>> And if try using the svcutil (svcutil PNGQuote.wsdl /language:C#) I

    >> get:
    >>>>> Error: Cannot read PNGQuote.wsdl.
    >>>>>
    >>>>> WSDL Parsing Error while reading:
    >>>>> 'C:\Projects\QuoteWare.root\PNGQuoteApi\PNGQuote.wsdl' verify that

    the
    >>>>> XML is both well-formed and valid.
    >>>>>
    >>>>> There is an error in XML document (97, 41).
    >>>>>
    >>>>> The element was not expected in this context: <xsd:enumeration
    >>>>> xmlns:xsd='http://www.w3.org/2001/XMLSchema'>..</xsd:enumeration>.
    >>>>> Expected elements: http://www.w3.org/2001/XMLSchema:annotation,
    >>>>> http://www.w3.org/2001/XMLSchema:list,
    >>>>> http://www.w3.org/2001/XMLSchema:restriction,
    >>>>> http://www.w3.org/2001/XMLSchema:union.
    >>>>>
    >>>>> Any help would be appreciated.
    >>>>>

    >>

    >
     
    Steven Cheng, Feb 27, 2008
    #6
    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. Kiran
    Replies:
    3
    Views:
    757
  2. cindy
    Replies:
    0
    Views:
    484
    cindy
    Aug 14, 2009
  3. wawa_piggy

    Adding a web reference to a java web service

    wawa_piggy, Apr 19, 2004, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    172
    Dino Chiesa [Microsoft]
    Apr 22, 2004
  4. CyberLotus

    Adding web reference to a windows service

    CyberLotus, Dec 10, 2004, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    249
    Dan Rogers
    Dec 13, 2004
  5. only_me

    vs2005 consuming web service, adding web reference ?

    only_me, Sep 20, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    204
    only_me
    Sep 25, 2005
Loading...

Share This Page