Adding Webservices VS2005 beta2 problem

well at least this gave me a bit more info...

Error: There was an error processing 'http://sj-barsoap:8080/jboss-net/services/BaanDataRetrieval?wsdl'.
- The document at the url http://sj-barsoap:8080/jboss-net/services/BaanDataRetrieval?wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'system.web.services.discovery.discoverydocumentreference' is 'Discovery document at the URL http://sj-barsoap:8080/jboss-net/services/BaanDataRetrieval?wsdl could not be found.'.
- The document format is not recognized.
- Report from 'system.web.services.discovery.contractreference' is 'There is an error in the XML document.'.
- The element is not supported in this context: <sequence xmlns="http://www.w3
.org/2001/XMLSchema"><element name="value" nillable="true" type="xsd:anyType" />
</sequence>.
- Report from 'system.web.services.discovery.schemareference' is 'Expected Schema root. Make sure the root element is <schema> and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema.'.
Now if I just knew what it meant...
The only place that the wsdl has a element named value is in the following schema that I don't have any control over (yea jboss!)
<schema targetNamespace="http://net.jboss.org/jmx">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ObjectNameType">
<simpleContent>
<extension base="string"/>
</simpleContent>
</complexType>
<complexType name="AttributeType">
<attribute name="name" type="xsd:string"/>
<complexContent>
<sequence>
<element name="value" nillable="true" type="xsd:anyType"/>
</sequence>
</complexContent>
</complexType>
</schema>
[2040 byte] By [stacyb] at [2008-2-4]
# 1
Xsd schema says complexContent are only allowed to have either restriction or extension element only and optionally annotation. so in this case when you have "sequence" it's clearly violating the rule". to verify this , i copied and paste to XMLSpy. XMLSpy schema validator complaints about "sequence" in "complexContent" by removing compleContent and straight to sequence it works fine. This seem to be consistent with the the schema validator in wsdl.exe, when it says

- Report from 'system.web.services.discovery.contractreference' is 'There is an error in the XML document.'.
- The element is not supported in this context: <sequence xmlns="http://www.w3
.org/2001/XMLSchema"><element name="value" nillable="true" type="xsd:anyType" />
</sequence>.

modified with XMLSpy output, might not be what you want.

<?xml version="1.0" encoding="UTF-8" ?>

- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://net.jboss.org/jmx">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ObjectNameType">
- <simpleContent>
<extension base="string" />
</simpleContent>
</complexType>
- <complexType name="AttributeType">
- <sequence>
<element name="value" type="anyType" nillable="true" />
</sequence>
<attribute name="name" type="string" />
</complexType>
</schema>
erymuzuan at 2007-9-8 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...

.NET Development

Site Classified