|
|
Discussion
Started by theGecko at 08-08-2006 11:07 PM. Topic has 7 replies.
 
 
|
|
Sort Posts:
|
|
|
|
08-08-2006, 11:07 PM
|
theGecko

Joined on 08-08-2006
Cambridge, UK
Posts 8
|
WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
|
Not sure if this just hasn't been implemented yet or if it's a known issue, but the generated helper throws errors when it encounters attributeGroups such as:
<xs:attributeGroup name="aGroup"> <xs:attribute name="name" type="xs:string" use="optional"/> <xs:attribute name="languageID" type="xs:language" use="optional" fixed="en"/> </xs:attributeGroup>
Cheers,
Rob
|
|
|
|
|
Report
|
|
|
|
11-19-2006, 4:13 PM
|
theGecko

Joined on 08-08-2006
Cambridge, UK
Posts 8
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
|
Hi Buddhike,
sorry for not replying earlier.
This still seems to be an issue in WSCF 0.7. If you create a schema with an AttributeGroup, run the WSCF tool and compile the web application, when clicking on a method using a schema containing the AttributeGroup, it invokes the AsmxHelpPage.aspx file which throws an InvalidCastException:
Unable to cast object of type 'System.Xml.Schema.XmlSchemaAttributeGroupRef' to type 'System.Xml.Schema.XmlSchemaAttribute'
When recursing the SoapArray on line 1161.
Many thanks,
Rob
|
|
|
|
|
Report
|
|
|
|
11-19-2006, 8:32 PM
|
rseso
Joined on 11-19-2006
Posts 2
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
I can confirm the problem. It basically happens when you generate a server stub using an XSD with attributeGroups, start the service (the service overview page is displayed), and then click on a method whose in/out types have attributeGroups to display its help/description page. I've even been able to find the spot where it breaks in the debugger, however didn't have time to play with it further. This all refers to 0.6, haven't tried 0.7 yet.
Best regards, Robert
|
|
|
|
|
Report
|
|
|
|
11-20-2006, 5:27 PM
|
rseso
Joined on 11-19-2006
Posts 2
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
The Exception is thrown in the AsmxHelpPage.aspx on the line 1161 where it says
foreach (XmlSchemaAttribute attr in typeItems.Attributes) { ...
And here is the stack trace:
System.InvalidCastException was unhandled by user code Message="Unable to cast object of type 'System.Xml.Schema.XmlSchemaAttributeGroupRef' to type 'System.Xml.Schema.XmlSchemaAttribute'." Source="App_Web_cublqe4a" StackTrace: at ASP.asmxhelppage_aspx.WriteComplexType(XmlSchemaComplexType type, String ns, Boolean encoded, Int32 depth, Boolean writeXsiType, Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 1161 at ASP.asmxhelppage_aspx.WriteElement(XmlSchemaElement element, String ns, XmlSchemaForm form, Boolean encoded, Int32 id, Int32 depth, Boolean writeXsiType, Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 795 at ASP.asmxhelppage_aspx.WriteTopLevelElement(XmlSchemaElement element, String ns, Int32 depth, Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 669 at ASP.asmxhelppage_aspx.WriteTopLevelElement(XmlQualifiedName name, Int32 depth, Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 665 at ASP.asmxhelppage_aspx.WriteSoapMessage(MessageBinding messageBinding, Message message, Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 380 at ASP.asmxhelppage_aspx.GetSoapOperationInput(Boolean soap12) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 198 at ASP.asmxhelppage_aspx.__DataBind__control54(Object sender, EventArgs e) in d:\VBProjNET\TestProjects\OTA_ProfileLookup\ProfileLookupWS2\AsmxHelpPage.aspx:line 1738 at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren()
HTH, Robert
|
|
|
|
|
Report
|
|
|
|
07-11-2007, 6:44 PM
|
ostrichwatch
Joined on 07-11-2007
Posts 1
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
|
hi Buddhike,
I have exactly the same problem in 0.7 with any schema that utilises attributeGroups.
I can provide sample schema's if it helps you re-create the problem.
any help would be much appreciated!
regards mark.
|
|
|
|
|
Report
|
|
|
|
01-10-2008, 9:32 AM
|
Daniel

Joined on 05-29-2007
Швейцария
Posts 24
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
Did anyone find a solution for the exception thrown in AsmxHelpPage.aspx ?
Any help would really be appreciated !
не идея, но да
VS2005 - WSCF 0.7
|
|
|
|
|
Report
|
|
|
|
04-03-2008, 3:03 PM
|
Daniel

Joined on 05-29-2007
Швейцария
Posts 24
|
Re: WSCF 0.6 doesn't seem to support attributeGroups
|
|
|
|
|
I've found something.
Put a try { } catch { } at the right place and the exception won't be thrown.
I've put it at the WriteComplexType Method.
не идея, но да
VS2005 - WSCF 0.7
|
|
|
|
|
Report
|
|
|
|
|
|