web-services

How to use a custom type object at the client

核能气质少年 提交于 2019-12-30 06:58:11
问题 I'm new to C# and to WCF, coming from a Java background. I'm have a solution with a WCF service hosted on IIS that has an Employee class, and a method... public Employee getEmployee(int loginId) This method takes the loginId, queries the database and creates an Employee object with the results, and then returns the Employee object. Simple enough. So I have a client, and thus far all it does is call a simple "Hello World" web method to prove to me that it's configured right to talk to the

Can I access My Custom .NET Class from PowerShell?

为君一笑 提交于 2019-12-30 06:39:13
问题 I have a couple of questions and doubts to regarding PowerShell and .NET Classes. I am trying to write a class 'foo' that will call Rest web service and perform some tasks. If I deploy the class in GAC then can I call it from PowerShell? 回答1: Try: ADD-TYPE -AssemblyName myassemblyname or [System.Reflection.Assembly]::LoadWithPartialName("myassemblyname") to access method/properties of your assembly you can do this: [myassemblyname]::mymethod() [myassemblyname]::myproperty 回答2: You can load

C# SOAP - Error in deserializing body of reply message (Magento API)

☆樱花仙子☆ 提交于 2019-12-30 06:01:10
问题 I'm trying to connect a C# app to Magento 1.6 (through Magento SOAP V2) using the following code: using (Mage_Api_Model_Server_Wsi_HandlerPortTypeClient proxy = new Mage_Api_Model_Server_Wsi_HandlerPortTypeClient()) { string sessionId = proxy.login("XXXXXXX", "XXXXXXXXXXX"); Console.WriteLine(sessionId); } and I get the following error: Error in deserializing body of reply message for operation 'login'. I used Fiddler to inspect the transfer and this is the result: <?xml version="1.0"

.asmx Web Service Documentation

最后都变了- 提交于 2019-12-30 06:01:07
问题 I'd like my summary, param info, returns info, etc (listed below) to show up on the standard help page that .net generates for .asmx web services. /// <summary> /// Brief description /// </summary> /// <param name="fakeParamOne">Fake Param One Description</param> /// <returns>Bool representing foo</returns> The only thing that I've tried that affected the auto-generated help page in any way was this: [WebMethod(Description = "Does awesome things.")] I'm sure I'm missing something VERY simple

How do I test connectivity to an unknown web service in C#?

北慕城南 提交于 2019-12-30 05:53:06
问题 I'm busy writing a class that monitors the status of RAS connections. I need to test to make sure that the connection is not only connected, but also that it can communicate with my web service. Since this class will be used in many future projects, I'd like a way to test the connection to the webservice without knowing anything about it. I was thinking of passing the URL to the class so that it at least knows where to find it. Pinging the server is not a sufficient test. It is possible for

calling Restful Service from Java

笑着哭i 提交于 2019-12-30 05:48:27
问题 Here I am not creating a RESTful service indeed I have to call an external Restful service from my java code. Currently I am implementing this using Apache HttpClient. The response that I get from the web service is in XML format. I need to extract the data from XML and put them on Java objects. Rather than using SAX parser, I heard that we can use JAX-RS and JERSEY which automatically maps the xml tags to corresponding java objects. I have being looking through but unable to find a source to

WCF Service 405 Method Not Allowed Exception

扶醉桌前 提交于 2019-12-30 05:28:08
问题 I'm writing a WCF service in Visual Studio 2008 to be hosted on a Windows 2008 Standard server. I've created a new Web Site in IIS7 with its own application targeted to ASP.NET 2.0. I added .NET 3.0 Framework features to the server role. I've already gone through all of the steps involving *.svc extensions and the aspnet_isapi module. I've run "ServiceModelReg -r" and restarted IIS as well as the server itself. My project targets the .NET framework 3.5 for builds. My solution references the

How to use WS-Security in C#?

假如想象 提交于 2019-12-30 05:27:20
问题 How to create a web service in C# that uses WS-Security for encryption and signatures for both sides (requests and responses)? Client and server will use certificates. 回答1: Not sure which version of the framework you're using, but if it's .NET 2.0 (not using WCF) check out Web Service Extensions 3.0. That will allow you to implement the WS-Security standards in .NET 2.0 Web Services. And if you're using WCF, take a look at this article to get some ideas on how to secure your services using

Web service soap header authentication

空扰寡人 提交于 2019-12-30 05:24:27
问题 I have a web service, i want to authenticate the user from the soap header. That is, i want to check a token id (random number) in soap header and validate it against a value in my database and if the number matches i allow the request to go through otherwise i dont want to allow execution of my web method. Is there any clean way of doing it using SOAP headers? Thanks, Mrinal Jaiswal 回答1: Have you looked into WS-Security? Assuming you're not already using it for something else, you could

How to use webservices in android?

非 Y 不嫁゛ 提交于 2019-12-30 05:20:25
问题 I want to know about how to call webservices in android I had done a lot of search from Internet and have read several tutorials but was not able to understand much and manipulate, can anyone suggest any Tutorial, or provide any Pdf file or any book related to web services so that I can understand it. Thanks in advance 回答1: The first reading I would suggest is this one - this is the W3School tutorial. Don't forget to read the related chapters included in this tutorial - Soap, Wsdl, etc - as