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

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

Deserializing Problem when build proxy by svcutil from WSDL

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :WCF
Hi, I got a WSDL from a third-party company and have to build a proxy to fetch data. I used svcutil *.wsdl to generate code and config file. Using the proxy I wondered why I got unexpected results: The return value is alway 0 and the string field CTWS_ReturnMsg always empty even if the server sent values. Could anybody help me? Here the WSDL and afterwards the http-traffic (from Wireshark): <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://CEITONWebService.org/">     <wsdl:types>         <xs:schema xmlns="http://CEITONWebService.org/" xmlns:mstns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://CEITONWebService.org" targetNamespace=&q

View Complete Post

More Related Resource Links

Serializing and Deserializing Problem


Hi, I used serialization and de-serialization in my project. 

Below is my class and form code for your reference.

Public Class Serialization
    Public Function XmlSerialization(ByRef objEmployee As Object) As String
        'XML Serialization
        Dim encoding As New UTF8Encoding()
        Dim Serializer As New XmlSerializer(objEmployee.GetType())

How do I generate proxy class for webservice with no WSDL published?

 Hello, I need to utilize following web service: https://www.icds.att.com/xmlrequest Service publishes 2 XML files (one for Request and another for Response) https://www.icds.att.com/schemas/XMLRequest.xsd and https://www.icds.att.com/schemas/XMLResponse.xsd. I generated classes for those manually, but my question is how do I actually utilize web service (generate proxy file) in this case. Do I have to code everything manually?

DataContractJsonSerializer: Problem when deserializing the Date

Sorry for cross-posting. I posted the same question on the Silverlight forum, but it has not received a single answer yet. The majority of folks there must be more interested in UI than in more fundamental stuff.     Hello everyone! Let's say we have the folllowing POCO classes: public class PocoObject : List<PocoPropertyData> {     public PocoObject() {}     public override string ToString()     {         var parts = new List<string>();         foreach (var pd in this)             parts.Add(string.Format("{{N=[{0}], Type=[{1}], V=[{2}]}}", pd.N, pd.V == null ? typeof(object) : pd.V.GetType(),  pd.V));         return string.Join(",", parts);     } } public class PocoPropertyData {     public string N { get; set; }  // the property name     public object V { get; set; }  // the property value } As you can see, the PocoPropertyData can hold value of any type. When I execute the following code in both .NET 4 application and Silverlight 4 application: ========================================================= var poco = new PocoObject {       { new PocoPropertyData { N = "DateTimeField", V =  Da

Proxy Authentication in svcutil

Hi, i want to use svcutil (or VS2008 Add Service Reference) to generate a proxy client class for a internet public wcf service, the thing is im behind a proxy, and svcutil fails:    Error de la solicitud con el código de estado HTTP 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).And VS2008 also fails:The remote server returned an unexpected response: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).Error en el servidor remoto: (407) Se requiere autorización del proxy.How can i add a service reference or create a proxy class thru the proxy server ?Thanks!!

Problem deserializing a collection (CollectionBase)


I am attempting to expose WCF services to AJAX-enabled web pages. Everything is working fine, but I can't for the life of me figure out who to make this work with collections (inheriting from CollectionBase). This is my current class structure:


Code Snippet


public class SalesOrder {

private string _number;

private DateTime _date;

private Customer _customer;

private SalesOrderItemCollection _items;

How to create wsdl proxy of web service with out event handler for .net compact framework 4


Hi All

i have one problem while access web service axis 1.4 in compact frame work

Create web service object using client

 MIScreenSoapClient ser = new MIScreenSoapClient();

create event handler for method to access web service

ser.GetLoginRequestCompleted += new EventHandler<GetLoginRequestCompletedEventArgs>(proxy_getloginrequest);
    ser.GetLoginRequestAsync(strLogin, strPass, Program.VersionNumber, "WM1", "test", "WP7");

Event Handle for method

 void proxy_getloginrequest(object sender, GetLoginRequestCompletedEventArgs e)
   string eee = e.Result;
is there any way to access webservice without call event handler?
Please help me


Problem creating DataContract with SVCUTIL


I am trying to create a DataContract for a simple REST based webservice using a XSD file.

However when I run:

 svcutil /dconly .\workcodes.xsd /out:workcodes.cs

I get the following error message:

Error: Cannot read .\workcodes.xsd.

    Cannot load file C:\home\timesheet_webpart\workcodes.xsd as an Assembly. Check the FusionLogs for more Information.

    Could not load file or assembly 'file:///C:\home\timesheet_webpart\workcodes.xsd' or one of its dependencies. The module was expected to contain an assembly manifest.

I do not know why it would be trying to load the XSD as an assembly. I researched the issue and was unable to find a solution.

Can anyone shed some light on this issue? I have att

Can a WCF Server "Stub" be Generated from WSDL (eg. via svcutil) ?


What I would like to know is whether there is any tool out there that can generate a WCF Server stub for us, given WSDL & XSD. I am not talking about generating a client proxy - I am talking about generating the skeleton of a server (web service) based on supplied WSDL and XSD.

In other words it would generate a Service class, the Service data structures, the service interfaces etc, with the WCF appropropriate attributes applied where necessary to match the WSDL.

I realise it's an unusual request but we are needing to integrate with a web service that is not directly accessible to us (thinked locked down installation, defence etc) and we were thinking of building a "dummy version" of the web service (since it is very simple) so we can first test against it before moving onto the real thing.

Without this we will have to do most of our development on-site against the real web service, because it is not externally exposed.

The organisation has provided us, however, the WSDL and XSD files and whilst we can hand-craft a service and spend lots of time trying to make it identical to the supplied schemas, I thought a tool might be able to generate a WCF server skeleton for us easily.


Generation of proxy class using svcutil


Hello All,

I created a simple host application for hosting a class of mine. I have created endpoint, address binding and contract.

I am able to use svcutil to generate a proxy class. I am able to connect to the host application from my client, when both are put up onthe same machine. But when I try to host the application on my PC and try to obtain proxy class by running svcutil on someo ther machine, I am not able to generate the .cs and .config file.

Can u pls help.. as to what setting i have to change in order to generate the config file on the other machine.



Error Message - The document at the url ________ (request URL) was not recognized as a known document type.

-Report from the url __________ is ' The document format is not recognised ( the content type is text/htmll charset  = utf-8)

- Report from Disco Document = there was an error downloading ____ url ? disco

WCF client, svcutil and SOAP array problem


Hi, everyone. I hope someone will be able to help me about this issue:
I am trying to generate WCF client by issuing following command:
svcutil testingWsdl.wsdl /ser:XmlSerializer (/ser option has nothing with problem, I've just tried with it also)
I am getting following error:

Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: The datatype 'http://schemas.xmlsoap.org/soap/encoding/:Array' is missing.

Here is complete WSDL:

<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
<import namespace="soap" location="http://schemas.xmlsoap.org/wsdl/soap/"/>
 <portType name="SoapInPort">
 <operation name="SoapIn">

XMLSerializer: Losing data from a generated web service proxy using svcutil


I generated a proxy using svcutil with the option ser:XmlSerializer.  When trying to serialize the object I am losing data.  The wsdl came from a .asmx web service.

Wsdl genereated proxy getting error "The underlying connection was closed: An unexpected error occur


Created a server interface proxy with wsdl.exe and added the /ServiceInterface attribute.  When consuming the web service on the development machine I receive this error, "The underlying connection was closed: An unexpected error occurred on a receive"


Pat Luciano

create proxy client with SvcUtil from service using https+cert authentication


Hi all,

I have build two web services one is wcf hosted in iis and the other one is java web service (jax-ws ri) hsted on tomcat. Both of the services uses https and certificate authentication.The certificates are valid and when I check the wsdl's from the browser I can see them without any warning.

So I want to create a wcf client for the services with svcutil. I have created the necessary config file for svcutil (svcutil.exe.config).

When I try to create the proxy files for the java service (svcutil http://JavaServiceIpAddress/service?wsdl) I receive

"metadata contains a reference that cannot be resolved .

<Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/" >
   <faultcode xmlns:a="http://www.w3.org/2003/05/soap-envelope" xmlns="">a:Client</faultcode>
   <faultstring xmlns="">Cannot find dispatch method for {}</faultstring>

the request was aborted: Could not create ssl/tls secure channel"


When I execute svcutil http://WcfServiceIpAddress/service.svc the proxy and configs file are created smoothly. When I try svcutil http://WcfServiceIpAddress/service.svc?wsdl

"error: cannot obtain metadata from http://WcfServiceIpAddress/service.svc?wsdl


Problem hosting .NET build ActiveX Control in existing VB6 ActiveX control


Hi all,

After struggling several days with this it's time to find some help.

I'm developing for a third party application that supports a modular design by hosting custom ActiveX Controls in an ActiveX Control Container (basically a Tab control with each hosted control on its own tab).
An ActiveX Control build with VB6 with no added code shows up just fine, but I don't want to use VB6, I want to use a .NET UserControl which exposes itself as an ActiveX Control. I successfully created a class library project with a Windows Forms User Control, which is exposed to COM as a control. With some extra registry entries, the control even shows up in the VB6 designer. If I create a small VB6 test application with my .NET control on the form, it shows up just fine.

The problem is that nothing is painted on the tab control, if I add my control to the third party software. The UserControl constructor is called (twice), but that's it. When I switch tabs, the information from the previous tab stays visible, so no Draw() operations are executed at all.

I have read some articles that anything else but Internet Explorer is not supported for hosting ActiveX controls build in .NET but I'm not sure if this is still true.

I hope there is a solution to get this to work in .NET, otherwise I would have to switch to C++ (which

Soap cs code from WSDL encoding response problem


I have created a client proxy from a WSDL file with WSDL.exe

i can both send and recieve data fine.

The xmlfile i recieve contains Nordic char data (i see that in fiddler).

ex: <mydata>øæå</mydata>

The problem occurs when the data goes into my client proxy. It looks like they are in utf-8 format (and that will not work with nordic chars).

so the nordic chars are just scrambled.

any way to override this ?

 object[] response = this.Invoke("Query", new object[] { message });
 message = ((elements)(response[1]));
 return (string)(response[0]);




WSDL proxy class


Hi All

I am using Add Reference in visual studio to generate a local proxy class by using the link http://localhost/abc.wsdl, then begin to development the program at my local environment. 

When the program is finished, I deploy the program to the production environment where cannot access my local environment, would I fail to connect to the web service because the proxy class is generated by ?http://localhost/abc.wsdl? should I need another link which can be accessed in production environment to generate the proxy class? Or I just need to swtich a production accessiable url for the HttpSoapClientProtocol? Thanks

Merge Replication using Web Sync - Proxy Auto config problem



I am trying to setup merge replication using web sync. I  keep on getting the message: The Proxy Auto-configuration URL was not found. Yes I have read all the postings telling me to check my internet explorer settings concerning proxy server and auto-detection - I am not using a proxy - auto detection is unchecked.

Does anyone have another clue?



2006-08-16 15:31:09.375 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.437 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.453 The upload message to be sent to Publisher 'CRAW' is being generated
2006-08-16 15:31:09.453 The merge process is using Exchange ID '20E2BF4F-8812-431F-8BF8-94A44B80C16E' for this web synchronization session.
2006-08-16 15:31:09.500 The Proxy Auto-configuration URL was not found.

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