WCF / ASMX :: Use Xsd Directly Rather Than Using Proxy Class?
May 11, 2010
When I do server side soap service programming, I create proxy classes first using some xsd schemas.
Xsd schemas are already defined by another company.my problem is these schemas have master xsds and child xsds which means on master xsds there are references to child xsds.
In this case I have 2 different questions.
1) Is it possible to use xsd schemas directly to build soap service without generating proxy classes.
2) If it is not possible, I am using vs command prompt by typing xsd /c /l:vb nameofmasterfile.xsd
but while there references to child xsds, I am getting an error msg. thats why I had to flatten these xsds in the past. Is it possible to generate all classes in one shot. any external program also ok.
I have an asmx file that was created using notepad. Then I created the proxy class using wsdl.exe. Now I have a dll that I want to put it in GAC. GAC needs the DLL to have a strong name. How can I create a strong name for the web service?
When you create and use a Web Service proxy class in the ASP.Net framework, the class ultimately inherits from Component, which implements IDisposable. I have never seen one example online where people dispose of a web proxy class, but was wondering if it really needs to be done. When I call only one method, I normally wrap it in a using statement, but if I have a need to call it several times throughout the page, I might end up using the same instance, and just wondered what the ramifications are of not disposing it.
I am implementing a simple complex number calculator web service. I am trying to pass an object from the service to the client. I declared a single complexnumber class in my .asmx file, I later use this class in webmethods
i am trying to follow this: http://www.communitymx.com/content/article.cfm?page=2&cid=E8E8CE970C6AB073
but i am having trouble with the first bit. i have built the pages, but i cant work out the whole proxy class bit. I cant find wsdl.exe or operate it... ive downloaded sdk's and still cant find it..
i have xp home, so does this mean no iis?
is there another way to achieve what the tutorial is doing without having to build a proxy class etc?
One of our client uses squid proxy and tries to connect to our asmx web service(which is deployed on our server over internet) via our windows application. But windows application fails to connect to our web service and gives below error.."This method call needs the custom bla bla.. " Soap ExceptionProxy (squid) shows this error:127.0.0.1 - - [10/Aug/2010:14:35:55 +0300] "POST http://abc:83/service.asmx HTTP/1.1" 500 759 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4927)" TCP_MISS DIRECTWe have used soap header security and we are also passing soap header credential while calling the service. Application runs well at our end but can anybody guid me, what could be the problem ?
When you add a Web Reference in an ASP.NET project in Visual Studio the web application's root namespace is always added.So, if I add a web reference called MyWebService and the default namespace of the application is MyApplication the namespace of the generated proxy class will be: MyApplication.MyWebService.
However, I want to be able to specify which namespace to use for the generated class (to skip the default namespace and have the namespace be called simply MyWebService).Is using wsdl.exe through the command line the only way of accomplishing this? I don't want to manually edit the generated class (since it can get re-generated).
I have created a webservice which is publicly exposed. This publicly created webservice can be consumed in the application But my requirement is I have to create a webservice to expose the schema and cannot be consumed directly.How to consume the web service which is not exposed directly.
i am usingSystem.Diagnostics.Process.Start[URL]; to download xml soap file in browse but i want when file is download. it automatically save in c drive?
i do not want any dialog box which asked me for save or any thing else.
I have a class object which is basically kind of hierarchy and looks like this when I convert that to XML.
[Code]....
So you can see that I have "objectComponent" which is kind of hierarchy and that hierarchy can be upto any level.
Now I need to update <quantity> value where <sku> = "SKU 2", remember this <sku> can be anywhere in hierarchy, so I need to update its <quantity> value where <sku> = "SKU 2".
So my question is how can I update that value using Linq query and specifically, I need that value to be updated in the actual object itself because I need to pass that updated object for furthur process.
In my c# code, there is only one class named "ObjectComponent" and that has all of these properties and "objectBundle" as array and the whole hierarchy starts from there.
If I'm writing in-line code on a .aspx page is it possible to override the onLoad of the class that the .aspx is directly inheriting from? Right now if I do the override the base.onLoad inline on the .aspx page it is overriding the "Page" object's onLoad event not the class the .aspx is inheriting from.
We are upgrading .Net 2.0 Framework Web service project to .Net 3.5 Project. We are not changing any methods. Will there be any change in the proxy because of this Framework Upgrade.My requirement is to all the existing clients consuming this webservice should not have any impact due to this framework upgrade.
I have list of class files, when i try to run the class files, it showing error as "a project with output type of class library cannot be started directly"
How to run the class file? How to create a dll file.
If i want to use Property & Method in same class then how to use it. I want to keep separate class only for interface , not for property. Also we have tried with [OperationContract] before get ,set in Service class . it solved our issue but throws error while run a .svc file
i wrote a webmethod on webservice. it will do adding product to shoppingbasket. But it doesn't work. i used a class and its method in this webservice method. error is about it. my code are below:
I've created a class library, now I'm trying to use it in a webservice.If I try and use it via a web method like this:
<WebMethod()> _Public Function GetStaffList() As List(Of ClassLibrary.Staff) End Function
I get this error:You must implement a default accessor on System.Security.Policy.Evidence because it inherits from ICollection. And I can't seem to find any coherent instructions on remedying this issue.If I copy the Staff class into the web service (app_code) it works hunky dory, so it must be security..I can't be the only one attempting this! MSDN doesn't explain this one too well :(
I have set the instanceContextMode to single to create a singleton class.I use the join to add a user to the list, and getuserlist() to retrieve the users. I added a service reference opened two browsers , made sure i simulated it such that i am adding two seperate users , and display the users returned by getuserlist. But its always displaying only one user , the current user. I also have a counter
private static int counter = 1 public int returnCounter() { return counter++; }
This is returning incremented values when i open it in different browsers , but the list is always getting overritten. I am running this as a managed windows service, wsHttpBinding , and my client is a website accessing this service.