|
Sorry it does compile but I get a runtime error.
You need to add XmlChoiceIdentifierAttribute to the 'arbtwo' member.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'arbtwo' member.
|
|
|
|
|
Well the syntax of the attribute tags is correct, so your code is not compiling for another reason. Can you paste some more of the code here so we can figure out why it's not?
|
|
|
|
|
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
namespace ITCService
{
///
/// Summary description for Test1.
///
public class Test1 : System.Web.Services.WebService
{
public Test1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}
#region Component Designer generated code
//Required by the Web Services Designer
private IContainer components = null;
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5
[WebMethod]
public SomeDetail HelloWorld(InputDetail inputDetail)
{
return new SomeDetail();
}
}
public class SomeDetail
{
public int SomeValue;
public SomeDetail()
{
}
}
public class InputDetail
{
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public int InputValue;
public InputDetail()
{
}
}
}
|
|
|
|
|
I copied and pasted everything you have here into a new class in my .NET environment and it compiled perfectly
|
|
|
|
|
It compiles fine.
Its giving me a runtime error when I goto the webservice.
Server Error in '/ITCService' Application.
--------------------------------------------------------------------------------
You need to add XmlChoiceIdentifierAttribute to the 'InputValue' member.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'InputValue' member.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'InputValue' member.]
System.Xml.Serialization.XmlReflectionImporter.CheckAmbiguousChoice(XmlAttributes a, Type accessorType, String accessorName)
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType)
System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns)
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns)
|
|
|
|
|
Ahhh that makes sense. Well, just out of curiosity, did you do exactly what the error tells you to do? It's not done in the example you pasted. Add the XmlChoiceIdentifierAttribute to the InputValue member See below:
<code>
public class InputDetail
{
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
[System.Xml.Serialization.XmlChoiceIdentifierAttribute]
public int InputValue;
public InputDetail()
{
}
}
</code>
|
|
|
|
|
I still get a runtime exception.
|
|
|
|
|
Well silly, paste the new exception. It's probably a different exception than before. We'll work them out one by one.
|
|
|
|
|
Dear all
I am new to Visual studio 2005 beta, I am unable to connect Sql server 2000 database from DataBase explorer in VS 2005.when am going to establish connection to my sqlsever 2000 from Database explorer window(C# editor),it asks me the database file name,when i attach the database file even though it raises error that "Time out expire", Please help me
how to connect sqlserver 2000 from Database explorer.
Thanks In Advance.
|
|
|
|
|
Hello guys,
I am starting to study C# , having good background in C++ .
Could anybody recommend me a good book for C# programmnig.
thanks
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Programming C# by Jesse Liberty - O'Reilly Press
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
thanks
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
i am working with c# console application.i am using MInternetExplorer.Explorer class of SHocVw.dll.basically i am parsing html pages.i am using following events as per my requirement
BeforeNavigate2()
DocumentComplete()
i am giving the website name for parsing. My problem is that when i give the name of website.i need IP address of that wesite before parsing.which event i need to capture in order to find the IP Address and which way i could find the IP address.
Please send the code If possible.
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
There's the System.Net.Dns class that can be used to resolve the name.
Regards,
mav
|
|
|
|
|
i need to access a public folder, then copy everything from that folder to another folder, then delete everything from the public folder...
any ideas...
or help wil be appreciated..
thanks
flipmode_dsi
|
|
|
|
|
Perhaps looking into the Directory[^] and File[^] classes would help. Each has methods for enumerating, copying, and deleteing folders and files.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Check out the cool HTM file that is located in the Exchange SDK. It is called webdavsample.htm. It does all that you are asking for. Look in the SDK/SAMPLES folder.
|
|
|
|
|
Hi!,
Please help if anyone knows how to retreive the folders/files allowed through the security permissions for a particulat user in one shot!! Because checking for each and every file will take hell lot of time!!
Akshay!
|
|
|
|
|
You want to retrieve the entire list of accessible files and folders based on a users ACL, correct? There is no function that will do this. You have to walk the filesystem tree and check each one individually.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm studying sharepoint and I saw something in aspx pages that I did not underestand.There is a page that contains a radiobutton but does not contain the radiobutton options but when the page is shown the options appear,I want to know where do they come from?
the main code is :
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.SubNewPage" ValidateRequest="False" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
<asp:radiobuttonlist id="RadioBtnEventType" cssclass="ms-authoringcontrols" runat="server">
the radiobutton code is :
asp:RadioButtonList id="RadioBtnEventType" CssClass="ms-authoringcontrols" Runat="server"
the rendered page code radiobutton section is:
All changes | Added items | Changed items | Deleted items |
-- modified at 2:23 Tuesday 11th October, 2005
|
|
|
|
|
|
i have a listview control on my form. The View property of the control is set to LargeIcon. I have three items in it. I have three buttons on my form. What I want to accomplish is that when the first button is clicked, the forst item in the listview gets selected and when the second buttob is clicked, the secon item in the listview gets selected and so on. How do i do this?
|
|
|
|
|
Write this code on each button click....change the index value as desired
<br />
ListViewItem LItem=LView.Items[0];<br />
Litem.Selected=true;<br />
hope this helps
_mubashir
|
|
|
|
|
Need a code sample.
How to recurse an Active Directory Security Group that contains other Security Groups as well as users. I need to create a full text listing of each user and all attributes available for that user. When I get the user collection now I get the Member groups. How might I recognize that one of the members is actually another Security Group?
|
|
|
|
|
Hi everyone,
I am trying to capture specific frames of video file using tungMediaPlayer.clsMoviePlayer cMoviePlayer to save the frames as images, can someone help me? Or does someone else have a better video file player that i can use to create the screen captures. I checked outA Simple C# Wrapper for the AviFile Library
By Corinna John but it doesn't even work, so can someone help me?
Thank you,
Da Intern
|
|
|
|