Problem adding a reference to a web service.


V

VGE

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.
 
Ad

Advertisements

S

Steven Cheng

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.


--------------------
 
S

Steven Cheng

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.

--------------------
 
V

VGE

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

Thanks,

VGE
 
Ad

Advertisements

S

Steven Cheng

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
--------------------
 
Ad

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top