.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Help interoping contracts for large XSD message set (OAGIS) with WCF

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :WCF


I'm working with writing some services that support the OAGIS (http://www.openapplication.org) set of messages. My problems are:

-OAGIS uses XML attributes all over, so I can't use DataContracts (i have to use the XmlSerializer)

-OAGIS imports schemas all over, if I include all the xsd's needed to pass to svcutil for codegeneration off my filesystem, the path is too long and svcutil blows up.

I am trying to do the following:

1. Use xsd.exe or svcutil.exe to generate code that will get compiled into a DLL containing ONLY the data contracts (using XmlSerializer) for schema datatypes in OAGIS that are shared by all of their messages.

2. Use svcutil to generate code for WSDL files that come with OAGIS that reference the schemas in step 1, using the /r switch to pass the dll compiled in step 1 (so that the common types dont get re-generated).

I'm running into two problems.

-One, when I run step 2 its generating all the datatypes I pre-generated in step 1 anyway. I can't seem to get it to not regenerate them.

-Two, svcutil (in step 2) also generates code into just one of the four namespaces I pass to it, but ignores all the others for some reason. Passing these same 4 namespaces to the first invoke of svcutil (in step 1)

View Complete Post

More Related Resource Links

data contract code generation for large/complex schema (HR-XML/OAGIS) - is there an alternative?

Hello, and thank you for reading.I am implementing a Service based on a predefined specification (HR-XML 3.0). As such, I am starting with the schema, and working my way back to code. There are a number of large Schema documents (which import yet more Schema documents) related to my implementation, provided by this specification.I am able to generate code using xsd.exe, by supplying the "main" and "supporting" xsd files as arguments. But there are several issues, and I am wondering if this is the right approach.- there are litterally hundreds of classes - the code file is half a meg in size- duplicate classes (ex. Type, Type1 - which both represent the same type)- there are classes declared as inheriting from a base class, but that base class is not generated/definedI understand that there are limitations to the types of Schema supported by svcutil.exe/xsd.exe when targeting the DataContractSerializer and even XmlSerializer. My question is two-fold:1. Are code generation "issues" fairly common when dealing with larger, modular xsd files? Has anyone had success with generating data contracts from OAGIS or HR-XML schema?2. Given the above issues, are there better approaches to this task, avoiding generating code and working with concrete objects? Does it make better sence to read and compose a SOAP message directly, while sti

WS-ReliableMessaging: Message sent multiple times when payload is large

Environment: .NET WCF client to .NET WCF service using WS-ReliableMessaging   Description: I am sending rather large message (~ 50 mb) using a .NET WCF client to a .NET WCF service. I have enabled WS-ReliableMessaging. This results in the following message flow: http://dl.dropbox.com/u/1373661/messageflow.png The flow shows that the payload message is sent with an interval of less than a second. Why is this? The problem doesn't seem to happend when sending small messages. The client side App.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <customBinding> <binding name="OiosiHttpBinding" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00"> <reliableSession flowControlEnabled="false" inactivityTimeout="01:00:00" maxPendingChannels="32" maxTransferWindowSize="32" ordered="true" /> <!-- <security defaultAlgorithmSuite="Default" authenticationMode="MutualCertificate" requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true" keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeE

Data Contracts vs Message Contracts



I'm not sure when I should use a message contract.  In fact why would I use a message?  After all my operation parameters get serialized into a soap envelope automatically.

So when would I use a message and when would I use a serilizable class?

Thanks in advance


Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Persist large dataset across ASP.NET pages. No database


Can anyone give me suggestions on how to implement the following requirement?

1. A online wizard (step-by step operation) processes user requests across several ASP.NET pages.  The session data is stored in memory until the user submits the request.  Once the request is submitted, a XML file is created and the data are passed to XML.

# Case Study: The parent page has a "select" button.  Click "select" will pop up a child page.  The users can select 1000+ items from a datagrid in the child page.  Once the user clicks "confirm", the selected items in the child page will be populated to the selected item gridveiw in the parent page.  The user can keep selecting more in the child page and the selected items will be appended to the gridview in the parent page.


- What's the best way to extract strings from a text file and convert to a dataset in memory and then present it in a datagrid in UI?

- What's the best way to persist and manipulate a large dataset across pages?  Session? or ViewState? Can it be accomplished by LINQ?

The app doesn't interact with a DB.  Once the request is submitted, it will convert the in memory data to a XML file.  What technology can be used to accomplished this?&nb

Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

How to generate large pdf's?


Hi all,

I am using rdlc reports in my appln. Am trying to generate a huge pdf file which almost consists of 1500 - 2000 pages.
I have used ReportViewer and am adding datasource (Generic collection) to report. But am getting system out of Memory exception as it is a huge file.
Can any one suggest me how to generate large pdf files in asp.net c#

CLR Inside Out: Code Contracts


This article will share some of the best practices that the Base Class Libraries (BCL) team devised as they added the code contract libraries and started to take advantage of them in their own code.

Melitta Andersen

MSDN Magazine August 2009

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend