Tag: wcf

Android / iOS客户端使用WCF双工服务

我正在尝试构build一个为Android / iOS客户端提供API的服务器/ Web服务。 我正在使用WCF服务,客户端可以成功向服务器发送请求。 现在,我打算让服务器启用ping客户端来通知服务器和客户端需要一些更改来同步数据。 问题是:是否有可能使我的服务器ping客户端(Android / iOS),我知道它是可能的Windows客户端通过使用wsDualHttpBinding,但我不知道iOS和Android客户端。 任何人都可以帮我清楚一点? 任何解决scheme是赞赏。

Wcf rest服务GET&POST iOS

我的朋友为我的应用程序写了一个服务。 这里是链接http://213.155.113.51/cronos/medconcept/services/v3/iOSServices.svc/productsget ,这是testing链接。 我只是想获得string。 我试过这篇文章http://www.codeproject.com/Tips/569495/Creating-a-WCF-Service-with-JSON-Data-and-Using-it但Json是null 这是我的代码的一部分; NSString *request = [NSString stringWithFormat:@"link here"]; NSURL *URL = [NSURL URLWithString: [request stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSError *error = nil; NSData *data = [NSData dataWithContentsOfURL:URL options:NSDataReadingUncached error:&error]; NSLog(@"data = %@",data); if(!error) { NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]; NSLog(@"Json = %@",json); NSMutableArray *array= [json objectForKey:@"GetUserResult"]; NSLog(@"array = %@",array); /* for(int i=0; […]

iOS应用程序可以使用wsHttpBinding来使用WCF服务吗?

我正在构build一个WCF服务,它有一个wsHttpBinding端点。 现在的客户端是WPF。 我想知道是否将来有可能开发一个能连接到我的WCF服务端点的iOS应用程序(它必须是wsHttpBinding,因为我需要安全性,可靠性和有序消息传递)。 谢谢。

无法使用Xamarin和WCF访问webservice

我想要使​​用Xamarin和WCF的公共Web服务。 对于这个演示,我将使用Xamarin.iOS 。 这是我试图消费的(公共)web服务: http://www.webservicex.net/globalweather.asmx?WSDL 在Xamarin Studio中,我使用web服务的URL添加一个Web引用 。 所选框架被设置为Windows Communication Foundation(WCF) 。 现在,我正在使用下面的代码来连接服务: var _client = new GlobalWeatherSoapClient(); _client.BeginGetWeather ("Berlin", "Germany", (ar) => { var result = _client.EndGetWeather(ar); }, null); 当执行这个代码时,我得到一个System.NullReferenceException 。 这是问题,为什么它不正确? 最奇怪的部分:当我不使用WCF,但select.NET 2.0 Web服务作为框架,似乎一切工作正常。 我看不出我的WCF代码有什么问题 – 根据文档 ,一切都应该正常工作。 我希望有人能帮助我! 提前致谢!

WCF或Web服务(.asmx)的iOS应用程序?

我对Web开发和Web服务相当陌生。 我一直在使用C#在.NET中使用传统的Web服务(.asmx)。 有人build议,现在很多服务使用WCF,我想知道如果我应该学习WCF,并使用它与我的iOS应用程序进行通信。 看起来像WCF将是一个学习曲线,因为我没有任何.NET框架的经验(在C#中很less有经验)。 我不确定是否值得花时间在WCF上,还是应该使用传统的编写Web服务的方式。 有什么build议么?

在Objective C(iOS应用程序)中请求WCF Web服务时收到SOAP错误

我正尝试从iOS应用程序调用Web服务。 我已经在WCF中开发了这个服务。 Web服务托pipe在使用BasicHTTPBindingconfiguration的IIS上。 我开发了一个简单的iOS应用程序,调用远程PC上托pipe的Web服务。 iOS应用程序工作正常,但SOAP服务似乎不理解我从iOS应用程序发送的请求。 这里是所有的细节,我得到的错误是在最后。 Web服务的WSDL是: <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="SLService" targetNamespace="http://tempuri.org/"> <wsdl:types> <xsd:schema targetNamespace="http://tempuri.org/Imports"> <xsd:import schemaLocation="http://10.211.55.4/TestService/SLService.svc?xsd=xsd0" namespace="http://tempuri.org/"/> <xsd:import schemaLocation="http://10.211.55.4/TestService/SLService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/> </xsd:schema> </wsdl:types> <wsdl:message name="ISLService_DoWork_InputMessage"> <wsdl:part name="parameters" element="tns:DoWork"/> </wsdl:message> <wsdl:message name="ISLService_DoWork_OutputMessage"> <wsdl:part name="parameters" element="tns:DoWorkResponse"/> </wsdl:message> <wsdl:portType name="ISLService"> <wsdl:operation name="DoWork"> <wsdl:input wsaw:Action="http://tempuri.org/ISLService/DoWork" message="tns:ISLService_DoWork_InputMessage"/> […]

在WPF应用程序内部托pipeWCF Web服务

我正在开发一个WPF应用程序。 作为应用程序的一部分,我需要通过另一个iOS应用程序接收一些图像。 所以我写了WCF REST服务和iOS,并且只有在将服务定义为IIS的一部分时,才能将图像发送到Web服务。 我需要发生的事情是:当WPF应用程序启动时,Web服务也将启动,并公开iOS设备的端口号以发送图像,并在启动时“唤醒”WPF应用程序。 有什么想法吗?

用于Android,iPhone等的.NET Web服务格式/协议的build议集成

我正在为ASP.NET MVC 3网站构build一个Web服务。 理想情况下,我希望所有的客户端(我的网页,iPhone应用程序,Android应用程序,Windows Phone 7应用程序等)使用相同的服务层来加载和保存数据。 我是移动开发新手,想知道是否有一个首选的机制 – SOAP / JSON /等 – 使用异构移动设备设置。 具体来说,我想知道如果Android和iOS有更好的库/支持一个协议,或者主要的移动平台有强大的支持所有协议。 我也想知道是否所有的都是保证上述服务。 任何意见将不胜感激 谢谢 J.P

使用SOAP将使用WCF服务的图像从iPhone上传到服务器

hiii,我使用wcf SOAP服务为我的应用程序,我发送下面的请求。 postStr = [NSString stringWithFormat:@"<?xml version=\"1.0\"?>\n" "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" "<s:Body>\n" "<InsUpdDelActivityInfo xmlns=\"http://tempuri.org/\">\n" "<objEventsContent xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/iCampuslite.Model.ActivityStream\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\n" "<d4p1:ActCommentId i:nil=\"true\" />\n" "<d4p1:ActSubTypeCd i:nil=\"true\" />\n" "<d4p1:ActType>Status</d4p1:ActType>\n" "<d4p1:ActTypeCd>1</d4p1:ActTypeCd>\n" "<d4p1:ActivityAnswersList />\n" "<d4p1:ActivityComments />\n" "<d4p1:ActivityId i:nil=\"true\" />\n" "<d4p1:ActivityLike />\n" "<d4p1:ActivityName>%@</d4p1:ActivityName>\n" "<d4p1:ActivityStreamImagesBytes>%@</d4p1:ActivityStreamImagesBytes>\n" "<d4p1:AnswerDesc i:nil=\"true\" />\n" "<d4p1:AnswerId>0</d4p1:AnswerId>\n" "<d4p1:CommentDesc i:nil=\"true\" />\n" "<d4p1:CommentId i:nil=\"true\" />\n" "<d4p1:CreatedUserId>%@</d4p1:CreatedUserId>\n" "<d4p1:CreatedUserName i:nil=\"true\" />\n" "<d4p1:FileOrLinkName i:nil=\"true\" />\n" "<d4p1:IsLiked>0</d4p1:IsLiked>\n" "<d4p1:IsTotalSchool i:nil=\"true\" />\n" […]

xmlparsing错误,同时使用wcf框架的Web服务

这是第一次,而我的工作在iOS应用程序的wcf肥皂服务,当尝试发送xml到服务器使用post方法时,我的iOS边代码看起来像这样 NSString *soapMessage = [NSString stringWithFormat:@"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"><SOAP-ENV:Body><SaveAllRecords33><xmlData></xmlData></SaveAllRecords33></SOAP-ENV:Body></SOAP-ENV:Envelope>"]; NSURL *url = [NSURL URLWithString:@"http://webservice.net2survey.com/servicejson.svc/SaveAllRecord33"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"urn:ServiceJSON/SaveAllRecords33" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; 并在.net方面是这样的 [WebInvoke(Method = "POST", BodyStyle […]