asmx

Send a custom header of soap envelope using jQuery Ajax

无人久伴 提交于 2019-12-12 13:29:47
问题 I am trying to call an asmx service using jQuery Ajax. POST /YderWS.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://scandihealth.com/iwebservices/HentKommuner" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeader xmlns="http://scandihealth.com

Check if a webservice exists

最后都变了- 提交于 2019-12-12 10:43:57
问题 Could someone please be kind enough to show me the best way to determine if a webservice (ASP.NET) exists at a given URL? I assume an approach will be something along the lines of issuing a request using System.Net.Webclient but how could I determine if it is a valid webservice and what sort of request should I issue? EDIT: To add a bit more context I am determining if a webservice exists because I am attempting to build a generic tool that uses arbitrary webservices. 回答1: The only way IMHO

How to send NSArray to web service

一曲冷凌霜 提交于 2019-12-12 09:26:18
问题 I have no success to send NSArray to web service. Service method is not called. But other service methods call works. Web service method is: [WebMethod] public int Method(IList items){... My array is full of objects Items: @interface Item : NSObject { double prop1; double prop2; double prop3; } @property double prop1; @property double prop2; @property double prop3; From objective c I try to send data like this: NSString *soapMsg = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\

Change the url of a web service by reading from the web.config [duplicate]

百般思念 提交于 2019-12-12 09:14:29
问题 This question already has answers here : What should be modified to change the URL of a web service in C#? (3 answers) Closed 5 years ago . I have a WCF app that consumes an asmx web service. I use the web service in a million places in the app: public string LogOnUser(string username, string password, string db) { var wsi = new ASMXServiceInterface(); return wsi.LogIn(); } public string GetNotes(string username, string password, string db) { var wsi = new ASMXServiceInterface(); return wsi

POST JSON data to .asmx webservice

做~自己de王妃 提交于 2019-12-12 08:39:57
问题 I'm trying to post some simple parameters to a .asmx webservice. I get the following error: Request format is invalid: application/json; charset=utf-8. What I really need to get to is to be able to pass a complex object, but I can't get past making a POST request with json content type. Here is my WebService Definition [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public int JsonTest2(int myparm1, int myparm2) { return 101; } And this is my javascript code function

calling asmx service using jquery ajax asp.net 4.0

别来无恙 提交于 2019-12-12 08:38:38
问题 I'm trying to call a sample asmx service using jquery, here is the jquery code $.ajax({ type: "POST", url: "/Services/Tasks.asmx/HelloWorld", data: "{}", dataType: "json", contentType: "application/xml; charset=utf-8", success: function (data) { alert(data); } }); This is not showing any message,code is in asp.net 4.0, Am I missing any thing? Edit - I changed the dataType to xml, now success function is working it return following xml <?xml version="1.0" encoding="utf-8"?> <string xmlns="http

ASMX equivalent of Page_Init?

给你一囗甜甜゛ 提交于 2019-12-12 08:26:04
问题 I have some code I would like to execute very early in the lifecycle of a call to an ASMX function. For our ASPX pages, this code is in the Page_Init() function on a base class, from which all our ASPX pages inherit. Is there an ASMX equivalent to the ASPX's Page_Init() function? Better yet, is there an ASMX lifecycle diagram like the ASPX one? http://msdn.microsoft.com/en-us/library/ms178472.aspx If there is an ASMX equivalent to Page_Init(), I assume I can implement code in a common base

Webservice C# ASMX, timeout-event from IIS Server?

我的梦境 提交于 2019-12-12 05:49:01
问题 I have a webservice running on an IIS server using c# and a asmx file. The Service is able to upload files requested by users to a ftp-server for them to temporarily view. The temporary folders are cleared on logout and such things... but if the user does not log out and just closes the tab or the browser in general, the files will stay at the FTPserver... I wanted to make a "garbagecollector" function wich will clean up these files, or any files older than XXXXX. So, since the Webservice

Define Outgoing/Calling Port for SOAP Web Service in Visual Studio 2010

妖精的绣舞 提交于 2019-12-12 05:27:25
问题 The application application I'm currently working on is required to interface with a web service using SOAP. The service providers want to restrict access to the service via a firewall using BOTH an IP address and a Port. I'm using VS 2010 and the service has been added as a .NET 2.0 Web Service. Right now the firewall rule for my connection's port is set to 'ANY' and the service team wants to tighten it down to a specific port. I can't seem to find any way to set a specific outgoing port

Whats great deal about ASMX Services

爱⌒轻易说出口 提交于 2019-12-12 04:44:12
问题 I have been working with webservices for over 2 years now. I have lot to say about services like Soap 1.2, WSDL, the way communication is taking place and 100 of other things. I have seen people talking about their heavy ASMX background and web services expertize. But, when it comes to implementation I don't find anything but adding a web reference and calling few methods from C#. All the things that we talk about (serialization, deserialization, soap, blah blah) is taken care by Microsoft