Welcome to thinktecture forums Sign in | Join | Faq

Discussion

Started by theGecko at 08-08-2006 11:07 PM. Topic has 7 replies.

Print Search
Sort Posts:    
   08-08-2006, 11:07 PM
theGecko is not online. Last active: 11/24/2006 11:30:00 PM theGecko



Top 25 Posts
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 
   10-01-2006, 8:32 PM
Buddhike is not online. Last active: 3/27/2007 2:05:59 PM Buddhike



Top 10 Posts
Joined on 07-29-2005
Colombo, Sri Lanka
Posts 138

MVP

thinktect

WSCF Team Member
Re: WSCF 0.6 doesn't seem to support attributeGroups
Hi Rob,

I tried this by adding an attribute group to the restaurant schema used for the WSCF walkthrough sample and everything worked well from code generation to running the sample service and the client. May be I’m not getting your question properly… Could you please elaborate?
Thanks a lot for your feedback!

Cheers,


Buddhike de Silva

thinktecture
http://www.thinktecture.com
   Report 
   11-19-2006, 4:13 PM
theGecko is not online. Last active: 11/24/2006 11:30:00 PM theGecko



Top 25 Posts
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 is not online. Last active: 11/20/2006 4:01:12 PM rseso

Top 100 Posts
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 is not online. Last active: 11/20/2006 4:01:12 PM rseso

Top 100 Posts
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 is not online. Last active: 7/11/2007 3:33:08 PM ostrichwatch

Top 500 Posts
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 is not online. Last active: 11/11/2008 1:41:46 PM Daniel



Top 10 Posts
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 is not online. Last active: 11/11/2008 1:41:46 PM Daniel



Top 10 Posts
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 
thinktecture fo... » WSCF » Discussion » Re: WSCF 0.6 doesn't seem to support attributeGroups

Powered by Community Server, by Telligent Systems