.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

Generated WSDL - Remove prefix

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :.NET Framework
ssdHi, My Service WSDL is generated with a "s:" prefix. How can I prevent this? ex: <s:schema elementFormDefault="qualified" targetNamespace="http://MyCompany.Services.Utils.LongNameServiceTest/"> <s:element name="Test"> <s:complexType /> </s:element> Thanks in advance, DD

View Complete Post

More Related Resource Links

WSDL Generated with my.svc?wsdl

I can get WSDL generated by WCF, if I simply point my web browser to URL: http://myhost/iisvirdir/my.svc?wsdl Generated WSDL contains entries like the following: <wsdl:operation name="callname"> <soap:operation soapAction="http://myhost/mypath/myservice/callname" style="document" /> <wsdl:input>   <soap:body use="literal" /> </wsdl:input> <wsdl:output>   <soap:body use="literal" /> </wsdl:output> </wsdl:operation> I see that input and output are always set to use literal. As I understand input and output parameters are XML document and its format is not covered in this WSDL.  I certainly cannot tell what input datastructures are used as input and output parameters from this WSDL. Does it mean that WSDL generated by svc?wsdl is incomplete? If I use Microsoft Windows SDK svcutil tool to generate WSDL I also get associated XSD files. Here is the command I use: svcutil.exe /t:metadata http://myhost/iisvirdir/my.svc That produces a set of files: namespace1.xsd namesapce2.xsd tempuri.org.wsdl my.wsdl I know that with this set of files I can easily generate C# code to implement another WCF service or client. I am surprised to see that after I put so much effort in creating namespaces all over I still get tempuri.org.wsdl (with the same literals for input outpu

remove stack trace , Additional Info, from log file


i am using belowcode in web.config 

<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
      <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName=".\Logs\jeejix_error.log" footer="------------Error End----------------------------" formatter="Text Formatter" header="---------Error Start-------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="50" />
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken

How to remove auto generated right blank column from the wpf datagrid?


i have already use this.


how to convert a byte[] to a xsd:hexBinary in the WSDL generated of a WCF service


Hi, i always see a byte[] type in the contract gets converted into a base64Binary type. What should i do in my WCF service contract so that the date type in the WSDL comes out to hexBinary ?

Will appreciate your help.


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.


C# reading Java/Php/SOAP service, WSDL generated file missing some namespace information

I'm trying to use a Web Service, which I believe is Java/php/SOAP, using C#.
I can connect and send fine, but the results, which are an array of information,
is null. The return is not instant, and I can get back errors.
I believe the problem is in the WSDL translation. The actual response coming back
does not line up with the WSDL generated code in reguards to namespaces. In
perticular, 'getCategoryTreeResponse' & 'getCategoryTreeResult' do not show up 
in the generated file.
I'm quite sure the WSDL file provided is poorly written but I have no control
over it. WSDL.exe only works when I pass a saved copy of the web service's
provided WSDL information due to the way it is called.

WCF WSDL generated paths for xsd:schema, wsdl:import, soap:address wrong for WCF behind a firewall.


My WCF server is behind a firewall
but the schema locations are incorrect in the wsdl

   <xsd:schema targetNamespace="http://www.myserver.net/Imports">
      <xsd:import schemaLocation="" namespace="http://www.myserver.net" />
      <xsd:import schemaLocation="" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
      <xsd:import schemaLocation="

Working with Pega generated WSDL in .Net Application


Hi All,

As a part of project requirement .Net application has to call web service developed using Pega tool. Reference class generated for the WSDL is not compliance with .Net or other OOP programming standard. Some of the issues are listed below.


  1. Each complex types generated in the WSDL is named as pagedata. Thus when we add a web reference its generated the class name include pagedata1,pagedata2, etc
  2. And also this name will be changed when update it next time.

Let's assume we need to hold employee information and client application manage it through EmployeeData class.

Same data type WSDL reference na

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

Remove #Region from whole web site


Hi All,

I need to deliver source code to client and my boss need to remove all the comments and #region sections from the whole web site source code.

So is there any functionality available in visual studio 2010 or may be in an other 3rd party tool available to do so, which can remove all the #region from all over the source code ?

Otherwise my developers has to do donkey work.... :(( and I don't wish it. 

Any help or tips/tricks would be appreciated.


Charset Problem with dynamically generated Word Document


in my asp.net web application i am dynamically generating a word documnet out of a sql data. I have set the char set UTF-8 during the doument creation in code but still when i open the generated document and check it char set .. it is always windows-1252 not the one that i have set. My sql data in the document have special characters whihc can only be understandable using the UTF-8 charset otherwise its always ?T written in place of an apostrophy . Pasting my code here..

         HttpContext.Current.Response.ContentType = "application/msword";
         HttpContext.Current.Response.ContentEncoding = System.Text.UnicodeEncoding.UTF8;
         HttpContext.Current.Response.Charset = "utf-8";
         string strFileName = "Details" + ".doc";
        HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
        StringBuilder strHTMLContent = new StringBuilder();
        string strMessage = " ";
        DataView abstractview = (DataView)dsAbstract.Select(DataSourceSelectArguments.Empty);
        foreach (DataRowView row1 in abstractview)
            strMessage += "<table border='1' cellspacing='0' cellpadding='5' width

Web deployment project - web.config section replacement does not add remove tag


I have a web application that is actually installed as a component of a third party site.  In some configurations, I need to remove certain connection strings and re-add them.  I'm replacing this web.config section with a xml file that includes the following:

      <remove name="MyOverridenConnection"/>
      <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection"

For some reason the remove tag is left out during the substitution and I end up with the following in the installed config:

      <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection"

Is there any way to issue removes in replaced sec

Urgently Need Help : Unrecognized Tag Prefix or device filter 'CR'


I have download and installed the Crystal Report for 2010 from my Visual Studio 2010. 


Problem 1 :

When I create a new crystal report in the Project, the aspx created code below :

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
            AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1202px"
            ReportSourceID="MemberList" ToolbarImagesFolderUrl="" ToolPanelWidth="200px"
            Width="1104px" />
        <CR:CrystalReportSource ID="MemberList" runat="server">
            <report filename="MemberList.rpt">

 but there is error : unrecognized tag prefix or device filter 'CR'


Problem 2 :

The vb code of the crystal report that I had created has 'ComponentModel is not a member of 'MYPROJECT.system'



Remove characters in a string


i have a string like this   sravani/, asdfff/, lsdsf/
i want to remove last character '/'  in the above string...
which function can i use?

pls help me....

Web Services: Increase Your App's Reach Using WSDL to Combine Multiple Web Services


The very tools that have helped drive the growing adoption of Web services, and the enabling abstractions that they provide, can often prevent developers from peeking behind the curtains at the XML standards that make up the Web services stack. This article will offer a solution that enables type sharing between proxies created for complementary Web services, while at the same time providing an opportunity to examine the Web Services Description Language (WSDL) and its interaction with the Web services tools you know and love.

Gerrard Lindsay

MSDN Magazine March 2005

How To Remove a Query Parameter from a URL


for a string such as this:


how would I remove the parameter id 12?


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