Search Results

Search found 1635 results on 66 pages for 'webservice'.

Page 17/66 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Making of JSON Webservice using C# .NET

    - by Parth_90
    I am trying to make JSON webservice in C# .NET. A json string is returning by web method but it contains xml structure like: <string xmlns="http://tempuri.org/"> {"checkrecord":[{"rollno":"abc2","percentage":40,"attended":12,"missed":34}],"Table1":[]} </string> I saw this article before it wasn't much helpful for me. So my problem is, that json string is not returned in its pure format. I do not want that xml version and xmlns string. I plan to consume the web service on Android later. Can anyone help me? Thanks

    Read the article

  • What does this IIS error log mean?

    - by Victor Rodrigues
    I'm using Debug Diagnostic Tool, trying to understand why around 5% of the requests that are sent to my webservice just crash, without necessarily throw any error inside my application. One of the errors this tool took is below. Can anyone here understand exactly what could be happening? Thanks! [6/17/2010 5:32:58 PM] First chance exception - 0xe0434f4d caused by thread with system id 1736 [6/17/2010 5:32:58 PM] Stack Trace ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 1c5bec58 79ef2bbc e0434f4d 00000001 00000001 kernel32!RaiseException+0x3c 1c5becb8 79fccf80 0a6d4998 00000000 00000000 mscorwks!GetMetaDataInternalInterface+0x84a9 1c5bed7c 656cab0e 0a6d4788 1c5bed98 65221345 mscorwks!StrongNameErrorInfo+0x103dc 1c5bed88 65221345 0a6cefb0 1c5bedf8 1c5bee08 System_Data_ni+0x57ab0e 1c5bee0c 79e7e1f3 1c147158 1c147158 0a6d0710 System_Data_ni+0xd1345 1c5bee24 79f7c770 0a6d0710 1c147158 026f25a8 mscorwks!DllUnregisterServerInternal+0x21d7 1c5beee8 79e71b4c 0a6cd9b8 0a6cd994 026f409c mscorwks!CorExitProcess+0x28f9a 1c5bef00 79e821b9 1c5befd8 00000002 1c5befa0 mscorwks+0x1b4c 1c5bef80 79e96531 1c5befd8 00000002 1c5befa0 mscorwks!DllUnregisterServerInternal+0x619d 1c5bf0c8 79e96564 1c531688 1c5bf228 1c5bf120 mscorwks!CoUninitializeEE+0x2ead 1c5bf0e4 79e96582 1c531688 1c5bf228 1c5bf120 mscorwks!CoUninitializeEE+0x2ee0 1c5bf0fc 79f87a83 1c5bf120 1c5bf2e0 79fa6a6b mscorwks!CoUninitializeEE+0x2efe 1c5bf2ec 79f87be2 00629d50 0a6cdae8 0a6d0e04 mscorwks!CorExitProcess+0x342ad 1c5bf3ac 792d5348 00629d90 00000086 1c5bf3c8 mscorwks!CorExitProcess+0x3440c 1c5bf3fc 792d50f6 00629d90 00000086 066a1ae0 mscorlib_ni+0x215348 1c5bf434 792d4fde 00000000 00000000 0a6cd944 mscorlib_ni+0x2150f6 1c5bf488 65e1098e 0a6cd944 00000000 00000000 mscorlib_ni+0x214fde 1c5bf4cc 65e10665 66082f99 0a6ca144 00000000 System_Web_Services_ni+0x13098e 1c5bf4fc 65e10ff7 026c1054 0a6ca168 0a6ace9c System_Web_Services_ni+0x130665 1c5bf510 6dde7666 1c5bf54c 660adb16 6ddd2c34 System_Web_Services_ni+0x130ff7 1c5bf518 660adb16 6ddd2c34 0a6ace8c 0a6c883c System_Web_Extensions_ni+0x1c7666 1c5bf54c 6608132c 1c5bf578 0a6c883c 00000000 System_Web_ni+0x18db16 1c5bf588 6608c5c3 1c5bf5b0 0a6abecc 0a6c8b4c System_Web_ni+0x16132c 1c5bf5dc 660808ac 0a6c8218 0a6abecc 026c0d48 System_Web_ni+0x16c5c3 1c5bf5f0 66083e1c 0a6c883c 026c1054 0a6c883c System_Web_ni+0x1608ac 1c5bf62c 66083ac3 026bc67c 0a6c8400 1c5bf6b0 System_Web_ni+0x163e1c 1c5bf63c 66082c5c 8984fdc8 79e7a6b8 1c5bf858 System_Web_ni+0x163ac3 1c5bf6b0 79f9811e 00000002 01b93b00 026cf6e4 System_Web_ni+0x162c5c 1c5bf768 79f9822b 0017a0d0 1c5bf970 1c5bf9e8 mscorwks!CorExitProcess+0x44948 1c5bf7c4 79f98691 0017a0d0 1c5bf970 1c5bf9e8 mscorwks!CorExitProcess+0x44a55 1c5bf9d0 6a2aa19b 00000001 01b93b00 00000000 mscorwks!CorExitProcess+0x44ebb 1c5bf9f0 6a2aa19b 023ad3f0 01b93b00 00000002 webengine!BufferPoolReleaseBuffer+0x1bb 1c5bfa28 79e72032 79e821f6 e5934469 0017a0d0 webengine!BufferPoolReleaseBuffer+0x1bb 00000000 00000000 00000000 00000000 00000000 mscorwks+0x2032 [6/17/2010 5:33:00 PM] First chance exception - 0xe0434f4d caused by thread with system id 3252 [6/17/2010 5:33:00 PM] Stack Trace ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 01d0ecd8 79ef2bbc e0434f4d 00000001 00000001 kernel32!RaiseException+0x3c 01d0ed38 79fccf80 02748edc 00000000 00000000 mscorwks!GetMetaDataInternalInterface+0x84a9 01d0edfc 656cab0e 02748ccc 01d0ee18 65221345 mscorwks!StrongNameErrorInfo+0x103dc 01d0ee08 65221345 027434d0 01d0ee78 01d0ee88 System_Data_ni+0x57ab0e 01d0ee8c 79e7e1f3 1c147158 1c147158 02744c30 System_Data_ni+0xd1345 01d0eea4 79f7c770 02744c30 1c147158 026f25a8 mscorwks!DllUnregisterServerInternal+0x21d7 01d0ef68 79e71b4c 02741ed8 02741eb4 026f409c mscorwks!CorExitProcess+0x28f9a 01d0ef80 79e821b9 01d0f058 00000002 01d0f020 mscorwks+0x1b4c 01d0f000 79e96531 01d0f058 00000002 01d0f020 mscorwks!DllUnregisterServerInternal+0x619d 01d0f148 79e96564 1c531688 01d0f2a8 01d0f1a0 mscorwks!CoUninitializeEE+0x2ead 01d0f164 79e96582 1c531688 01d0f2a8 01d0f1a0 mscorwks!CoUninitializeEE+0x2ee0 01d0f17c 79f87a83 01d0f1a0 01d0f360 79fa6a6b mscorwks!CoUninitializeEE+0x2efe 01d0f36c 79f87be2 00629d50 02742008 02745324 mscorwks!CorExitProcess+0x342ad 01d0f42c 792d5348 00629d90 00000086 01d0f448 mscorwks!CorExitProcess+0x3440c 01d0f47c 792d50f6 00629d90 00000086 066a1ae0 mscorlib_ni+0x215348 01d0f4b4 792d4fde 00000000 00000000 02741e64 mscorlib_ni+0x2150f6 01d0f508 65e1098e 02741e64 00000000 00000000 mscorlib_ni+0x214fde 01d0f54c 65e10665 66082f99 0273e664 00000000 System_Web_Services_ni+0x13098e 01d0f57c 65e10ff7 026c1054 0273e688 0a6ace9c System_Web_Services_ni+0x130665 01d0f590 6dde7666 01d0f5cc 660adb16 6ddd2c34 System_Web_Services_ni+0x130ff7 01d0f598 660adb16 6ddd2c34 0a6ace8c 0272cce4 System_Web_Extensions_ni+0x1c7666 01d0f5cc 6608132c 01d0f5f8 0272cce4 00000000 System_Web_ni+0x18db16 01d0f608 6608c5c3 01d0f630 0a6abecc 0272cff4 System_Web_ni+0x16132c 01d0f65c 660808ac 0272c6c0 0a6abecc 026c0d48 System_Web_ni+0x16c5c3 01d0f670 66083e1c 0272cce4 026c1054 0272cce4 System_Web_ni+0x1608ac 01d0f6ac 66083ac3 026bc67c 0272c8a8 01d0f730 System_Web_ni+0x163e1c 01d0f6bc 66082c5c 8984fdc8 79e7a6b8 01d0f8d8 System_Web_ni+0x163ac3 01d0f730 79f9811e 00000002 01b93b00 026cf6e4 System_Web_ni+0x162c5c 01d0f7e8 79f9822b 000dcea8 01d0f9f0 01d0fa68 mscorwks!CorExitProcess+0x44948 01d0f844 79f98691 000dcea8 01d0f9f0 01d0fa68 mscorwks!CorExitProcess+0x44a55 01d0fa50 6a2aa19b 00000001 01b93b00 00000000 mscorwks!CorExitProcess+0x44ebb 01d0fa70 6a2aa19b 023ad3f0 01b93b00 00000002 webengine!BufferPoolReleaseBuffer+0x1bb 01d0fac8 79e79cba 79e79ccd 0000000d 00000000 webengine!BufferPoolReleaseBuffer+0x1bb 01d0facc 79e79ccd 0000000d 00000000 79ec3f4b mscorwks+0x9cba 01d0fad8 79ec3f4b 79e7c82c 79ec3f53 f818458d mscorwks+0x9ccd 00000000 00000000 00000000 00000000 00000000 mscorwks!CreateAssemblyNameObject+0x22f40 [6/17/2010 5:33:37 PM] Thread exited. Exiting thread system id - 2144. Exit code - 0x00000000

    Read the article

  • iphone web service access

    - by malleswar
    Hi, I have .net webservice methods login and summary. After getting the result from login, I need to show second view and need to call summary method. I am following this tutorial. http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/ I created two new classes loginaccess.h and loginaccess.m. @implementation LoginAccess @synthesize ResultString,webData, soapResults, xmlParser; -(NSString*)LoginCheck:(NSString*)userName:(NSString*)pwd { NSString *soapMessage = [NSString stringWithFormat: @"\n" "\n" "\n" "\n" "%@" "%@" "" "\n" "\n",userName,pwd ]; NSLog(soapMessage); NSURL *url = [NSURL URLWithString:@"http://www.XXXXXXXXX.com/service.asmx"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"http://XXXXXXXXm/Login" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } else { NSLog(@"theConnection is NULL"); } //[nameInput resignFirstResponder]; return ResultString; } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"ERROR with theConenction"); [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"DONE. Received Bytes: %d", [webData length]); NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(theXML); [theXML release]; if( xmlParser ) { [xmlParser release]; } xmlParser = [[NSXMLParser alloc] initWithData: webData]; [xmlParser setDelegate: self]; [xmlParser setShouldResolveExternalEntities: YES]; [xmlParser parse]; [connection release]; [webData release]; } -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName attributes: (NSDictionary *)attributeDict { if( [elementName isEqualToString:@"LoginResult"]) { if(!soapResults) { soapResults = [[NSMutableString alloc] init]; } recordResults = TRUE; } } -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if( recordResults ) { [soapResults appendString: string]; } } -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if( [elementName isEqualToString:@"LoginResult"]) { recordResults = FALSE; ResultString = soapResults; NSLog(@"Login"); [VariableStore setStr:ResultString]; NSLog(soapResults); [soapResults release]; soapResults = nil; } } @end I am calling LoginCheck method and based on result I want to show the second view. Here after finishing of the button touch down event, it enter into did end element, so I am always getting nil value. If I use the same code controller it works fine as I push second view controller in didendelement. Please give me some samples to place the web service calls in differnt class and how to call them in viewcontrollers. Regards, Malleswar

    Read the article

  • Sql CLR calling webservice throws exception

    - by TonyP
    I have clr stored procedure that calls a Webservice method. Webmethod in turn call a com object .. and do some processing on a remote Unix server. When I invoke webmethod by it self it works fine. But when called from the CLR I get the following exception.. What am I doing wrong ? Msg 6522, Level 16, State 1, Procedure PrintOa, Line 0 A .NET Framework error occurred during execution of user-defined routine or aggregate "PrintOa": System.Security.HostProtectionException: Attempted to perform an operation that was forbidden by the CLR host. The protected resources (only available with full trust) were: All The demanded resources were: Synchronization System.Security.HostProtectionException: at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData) at System.Diagnostics.TypedElement.BaseGetRuntimeObject() at System.Diagnostics.ListenerElement.GetRuntimeObject() at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject() at System.Diagnostics.TraceInternal.get_Listeners() at System.Diagnostics.TraceInternal.WriteLine(Object value) at System.Diagnostics.Debug.WriteLine(Object value) at BaaNOA.PrintOA(String trid)

    Read the article

  • SOAP: JWSDP Webservice and Axis2 Client?

    - by Sophomore
    Just a plain simple question to which I could'nt find a straight answer... I'm building a SOAP webservice which is supposed to deliver some data to a client. (Actually it's RDF parsed/stripped to XML)... I'd like to use JWSDP which will generate WDSL specification. Are there any downfalls when the client is using axis2 instead of JWSDP? My intention was, that this shouldn't matter, as this is what WSDL is meant for, but I wanted to check before there arise any incompatibilities or problems...

    Read the article

  • Java Webservice with generic methods

    - by danby
    Hi, I was wondering if it is possible to make a generic webservice method in java like this: @WebMethod public <T extends Foo> void testGeneric(T data){ However when I try to consume this with a Java client I get an error stating: [ERROR] Schema descriptor {http://####/}testGeneric in message part "parameters" is not defined and could not be bound to Java. I know it is possible to make a method that takes a parameter such as List and this generates correctly using JAX-WS. I don't mind if there is a solution that means I am tied to using only a particular technology. Thanks, Dan.

    Read the article

  • Display loading while webservice is running

    - by poseid
    On the initial request to a page, I trigger a webservice and want to display a loading message. When the page has finished loading, I want to remove the waiting message from screen, but display it again when a change event in a checkbox triggers an Ajax call with another loading message. This code is not behaving to the given spec: $(document).ready( $(function() { $('#loadingDiv').hide(); $('#productsDropDown') .change(function() { var prodValue = $(this).val(); $('#proddate').load('getpdate.php', {prod: prodValue }); }); $('#loadingDiv') .ajaxStart(function() { $(this).show(); }) .ajaxStop(function() { $(this).hide(); }) ; }); ); what am I doing wrong?

    Read the article

  • Calling a WCF WebService in PHP via wsHttpBinding.

    - by Justin Dearing
    I have a WCF webservice I can connect to it via basicHttp, but not wsHttp. I try to conenct to it via wshttp via the following: $service = new SoapClient ("http://service.companyname.local:6666/Service/?wsdl", array( "location" => "http://service.companyname.local:6666/Service/WCF", "trace" => true, 'soap_version' => SOAP_1_2 ) ); The call to the SoapClient constructor returns fine. When I try to call one using $client-FunctionName, the page just sits there loading for quite a while, and eventually returns the error "Error Fetching http headers". What exactly is this supposed to mean and how do I fix it? (Consuming the service from .Net client works perfectly.)

    Read the article

  • Webservice for serial port devices

    - by camx
    Hi I want to create a remote webservice for an application that is now avaliable only localy. This application controlls three devices (each is controlled separately) connected on serial port. The problem is that I don't know how to take care of passing back information that a device return requested data. For example - I send move command to the motion device (which is very slow and can take a minute or more). Can I just set a big timeout on the client side (and server side) and return for example a true/false if operation is completed or is this a bad idea? Is SOAP with big timeouts ok? And the other question is if Mono on Linux (Ubuntu 9.10, Mono 2.4) is stable enought for making a web service or should I chose Java or some other language? I'm open for recommendations. Thanks for your help!

    Read the article

  • asp.net mvc ignoreRoute with webservice

    - by boz
    Howdy, Im adding the filevistacontrol to my asp.net MVC web application. I have a media.aspx page that is ignored in the routing with routes.IgnoreRoute("media.aspx"); This works successfully and serves a standard webforms page. Upon adding the filevistacontrol, I can't seem to ignore any calls the control makes to it's webservice. Eg the following ignoreRoute still seems to get picked up by the MvcHandler. routes.IgnoreRoute("FileVistaControl/filevista.asmx/GetLanguageFile/"); The exception thrown is: 'The RouteData must contain an item named 'controller' with a non-empty string value' Thanks in advance.

    Read the article

  • INDY WebService over SSL contains link with HTTP protocol instead of HTTPS in WSDL

    - by user1437820
    When creating new SOAP WebService server project using Delphi XE2 the wizard allows to set change port and HTTPS properties. Port is set to 443, HTTPS flag is checked, but when trying to connect to created server it returns incorrect transport (HTTP instead of HTTPS) in WSDL and generates HTTP links on the Service Info Page. The auto-generated page is not so important, but wrong information in WSDL file is a problem. Below you can see the returned WSDL - there are no HTTPS: <?xml version="1.0"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Itest123service" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="urn:test123Intf"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test123Intf"> <simpleType name="TEnumTest"> <restriction base="string"> <enumeration value="etNone"/> <enumeration value="etAFew"/> <enumeration value="etSome"/> <enumeration value="etAlot"/> </restriction> </simpleType> <complexType name="TDoubleArray"> <complexContent> <restriction base="soapenc:Array"> <sequence/> <attribute ref="soapenc:arrayType" n1:arrayType="xs:double[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/> </restriction> </complexContent> </complexType> <complexType name="TMyEmployee"> <sequence> <element name="LastName" type="xs:string"/> <element name="FirstName" type="xs:string"/> <element name="Salary" type="xs:double"/> </sequence> </complexType> </schema> </types> <message name="echoEnum0Request"> <part name="Value" type="ns1:TEnumTest"/> </message> <message name="echoEnum0Response"> <part name="return" type="ns1:TEnumTest"/> </message> <message name="echoDoubleArray1Request"> <part name="Value" type="ns1:TDoubleArray"/> </message> <message name="echoDoubleArray1Response"> <part name="return" type="ns1:TDoubleArray"/> </message> <message name="echoMyEmployee2Request"> <part name="Value" type="ns1:TMyEmployee"/> </message> <message name="echoMyEmployee2Response"> <part name="return" type="ns1:TMyEmployee"/> </message> <message name="echoDouble3Request"> <part name="Value" type="xs:double"/> </message> <message name="echoDouble3Response"> <part name="return" type="xs:double"/> </message> <portType name="Itest123"> <operation name="echoEnum"> <input message="tns:echoEnum0Request"/> <output message="tns:echoEnum0Response"/> </operation> <operation name="echoDoubleArray"> <input message="tns:echoDoubleArray1Request"/> <output message="tns:echoDoubleArray1Response"/> </operation> <operation name="echoMyEmployee"> <input message="tns:echoMyEmployee2Request"/> <output message="tns:echoMyEmployee2Response"/> </operation> <operation name="echoDouble"> <input message="tns:echoDouble3Request"/> <output message="tns:echoDouble3Response"/> </operation> </portType> <binding name="Itest123binding" type="tns:Itest123"> <binding xmlns="http://schemas.xmlsoap.org/wsdl/soap/" style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="echoEnum"> <operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:test123Intf-Itest123#echoEnum" style="rpc"/> <input> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </input> <output> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </output> </operation> <operation name="echoDoubleArray"> <operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:test123Intf-Itest123#echoDoubleArray" style="rpc"/> <input> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </input> <output> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </output> </operation> <operation name="echoMyEmployee"> <operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:test123Intf-Itest123#echoMyEmployee" style="rpc"/> <input> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </input> <output> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </output> </operation> <operation name="echoDouble"> <operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:test123Intf-Itest123#echoDouble" style="rpc"/> <input> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </input> <output> <body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test123Intf-Itest123"/> </output> </operation> </binding> <service name="Itest123service"> <port name="Itest123Port" binding="tns:Itest123binding"> <address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost:443/soap/Itest123"/> </port> </service> </definitions> When I'm trying to import WSDL to soapUI tool to check WebService work I need to change manually binding link to "https://" and only then RPCs will work. I will be very grateful for any idea how to force INDY to return links in WSDL with HTTPS protocol. Thanks in advance!

    Read the article

  • Trying to get around this Webservice call from Android using AsycTask

    - by Kevin Rave
    I am a fairly beginner in Android Development. I am developing an application that extensively relays on Webservice calls. First screen takes username and password and validates the user by calling the Webservice. If U/P is valid, then I need to fire up the 2nd activity. In that 2nd activity, I need to do 3 calls. But I haven't gotten to the 2nd part yet. In fact, I haven't completed the full coding yet. But I wanted to test if the app is working as far as I've come through. When calling webserivce, I am showing alert dialog. But the app is crashing somewhere. The LoginActivity shows up. When I enter U/P and press Login Button, it crashes. My classes: TaskHandler.java public class TaskHandler { private String URL; private User userObj; private String results; private JSONDownloaderTask task; ; public TaskHandler( String url, User user) { this.URL = url; this.userObj = user; } public String handleTask() { Log.d("Two", "In the function"); task = new JSONDownloaderTask(); Log.d("Three", "In the function"); task.execute(URL); return results; } private class JSONDownloaderTask extends AsyncTask<String, Void, String> { private String username;// = userObj.getUsername(); private String password; //= userObj.getPassword(); public HttpStatus status_code; public JSONDownloaderTask() { Log.d("con", "Success"); this.username = userObj.getUsername(); this.password = userObj.getPassword(); Log.d("User" + this.username , " Pass" + this.password); } private AsyncProgressActivity progressbar = new AsyncProgressActivity(); @Override protected void onPreExecute() { progressbar.showLoadingProgressDialog(); } @Override protected String doInBackground(String... params) { final String url = params[0]; //getString(R.string.api_staging_uri) + "Authenticate/"; // Populate the HTTP Basic Authentitcation header with the username and password HttpAuthentication authHeader = new HttpBasicAuthentication(username, password); HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.setAuthorization(authHeader); requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); // Create a new RestTemplate instance RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter()); try { // Make the network request Log.d(this.getClass().getName(), url); ResponseEntity<Message> response = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<Object>(requestHeaders), Message.class); status_code = response.getStatusCode(); return response.getBody().toString(); } catch (HttpClientErrorException e) { status_code = e.getStatusCode(); return new Message(0, e.getStatusText(), e.getLocalizedMessage(), "error").toString(); } catch ( Exception e ) { Log.d(this.getClass().getName() ,e.getLocalizedMessage()); return "Unknown Exception"; } } @Override protected void onPostExecute(String result) { progressbar.dismissProgressDialog(); switch ( status_code ) { case UNAUTHORIZED: result = "Invalid username or passowrd"; break; case ACCEPTED: result = "Invalid username or passowrd" + status_code; break; case OK: result = "Successful!"; break; } } } } AsycProgressActivity.java public class AsyncProgressActivity extends Activity { protected static final String TAG = AsyncProgressActivity.class.getSimpleName(); private ProgressDialog progressDialog; private boolean destroyed = false; @Override protected void onDestroy() { super.onDestroy(); destroyed = true; } public void showLoadingProgressDialog() { Log.d("Here", "Progress"); this.showProgressDialog("Authenticating..."); Log.d("Here", "afer p"); } public void showProgressDialog(CharSequence message) { Log.d("Here", "Message"); if (progressDialog == null) { progressDialog = new ProgressDialog(this); progressDialog.setIndeterminate(true); } Log.d("Here", "Message 2"); progressDialog.setMessage(message); progressDialog.show(); } public void dismissProgressDialog() { if (progressDialog != null && !destroyed) { progressDialog.dismiss(); } } } LoginActivity.java public class LoginActivity extends AsyncProgressActivity implements OnClickListener { Button login_button; HttpStatus status_code; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); login_button = (Button) findViewById(R.id.btnLogin); login_button.setOnClickListener(this); ViewServer.get(this).addWindow(this); } public void onDestroy() { super.onDestroy(); ViewServer.get(this).removeWindow(this); } public void onResume() { super.onResume(); ViewServer.get(this).setFocusedWindow(this); } public void onClick(View v) { if ( v.getId() == R.id.btnLogin ) { User userobj = new User(); String result; userobj.setUsername( ((EditText) findViewById(R.id.username)).getText().toString()); userobj.setPassword(((EditText) findViewById(R.id.password)).getText().toString() ); TaskHandler handler = new TaskHandler(getString(R.string.api_staging_uri) + "Authenticate/", userobj); Log.d(this.getClass().getName(), "One"); result = handler.handleTask(); Log.d(this.getClass().getName(), "After two"); Utilities.showAlert(result, LoginActivity.this); } } Utilities.java public class Utilities { public static void showAlert(String message, Context context) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); alertDialogBuilder.setTitle("Login"); alertDialogBuilder.setMessage(message) .setCancelable(false) .setPositiveButton("OK",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int id) { dialog.dismiss(); //dialog.cancel(); } }); alertDialogBuilder.setIcon(drawable.ic_dialog_alert); // create alert dialog AlertDialog alertDialog = alertDialogBuilder.create(); // show it alertDialog.show(); } }

    Read the article

  • What decryption should i use between my Android app and ASP.NET Webservice?

    - by RickardP
    I am searching a good way to encrypt and decrypt user authentication data between my Android app and my ASP.NET Webservice built in C#. I want to do a user registration on my Android app and send the authentication to the back-end server that is a ASP.NET Webservice built in C# and then every time the app calls the webservice it should send a hashed string with authentication information so webservice now what user it is. What is the best practice for this and have i missed something, give me some ideas please!

    Read the article

  • Posting a JSON array to webservice in Android

    - by Sam
    I am having some problems with what should be a rather simple task. I simply need a JSON array with a single JSON object within it to be posted to my webservice. The entire URL request needs to be formatted like this: http://www.myserver.com/myservice.php?location_data=[{"key1":"val1","key2":"val2"....}] I cannot for the life of me figure out how to append the 'location_data' bit using HttpPost. Here is a code snippet to demonstrate the HTTP connection method I am using: HttpClient hClient = new DefaultHttpClient(); HttpPost hPost = new HttpPost(url); try { hPost.setEntity(new StringEntity(string)); hPost.setHeader("Accept", "application/json"); hPost.setHeader("Content-type", "application/json"); //execute request HttpResponse response = (HttpResponse) hClient.execute(hPost); HttpEntity entity = response.getEntity(); I don't have any syntax errors, and my code is accessing the server fine, just not in the exact format the server needs. Any help on how to format my request to look like how I need it would be greatly appreciated!

    Read the article

  • How do I fix: InvalidOperationException upon Session timeout in Ajax WebService call

    - by Ngm
    Hi All, We are invoking Asp.Net ajax web service from the client side. So the JavaScript functions have calls like: // The function to alter the server side state object and set the selected node for the case tree. function JSMethod(caseId, url) { Sample.XYZ.Method(param1, param2, OnMethodReturn); } function OnMethodReturn(result) { var sessionExpiry = CheckForSessionExpiry(result); var error = CheckForErrors(result); ... process result } And on the server side in the ".asmx.cs" file: namespace Sample [ScriptService] class XYZ : WebService { [WebMethod(EnableSession = true)] public string Method(string param1, string param2) { if (SessionExpired()) { return sessionExpiredMessage; } . . . } } The website is setup to use form based authentication. Now if the session has expired and then the JavaScript function "JSMethod" is invoked, then the following error is obtained: Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'Method' failed with the following error: System.InvalidOperationException-- Authentication failed. This exception is raised by method "function Sys$Net$WebServiceProxy$invoke" in file "ScriptResource.axd": function Sys$Net$WebServiceProxy$invoke { . . . { // In debug mode, if no error was registered, display some trace information var error; if (result && errorObj) { // If we got a result, we're likely dealing with an error in the method itself error = result.get_exceptionType() + "-- " + result.get_message(); } else { // Otherwise, it's probably a 'top-level' error, in which case we dump the // whole response in the trace error = response.get_responseData(); } // DevDiv 89485: throw, not alert() throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); } So the problem is that the exception is raised even before "Method" is invoked, the exception occurs during the creation of the Web Proxy. Any ideas on how to resolve this problem

    Read the article

  • How to debug jQuery ajax POST to .NET webservice

    - by Nick
    Hey all. I have a web service that I have published locally. I wrote an HTML page to test the web service. The webservice is expecting a string that will be XML. When I debug the web service from within VS everything works great. I can use FireBug and see that my web service is indeed being hit by they AJAX call. After deploying the web service locally to IIS it does not appear to be working. I need to know the best way to trouble shoot this problem. My AJAX js looks like this: function postSummaryXml(data) { $.ajax({ type: 'POST', url: 'http://localhost/collection/services/datacollector.asmx/SaveSummaryDisplayData', data: { xml: data }, error: function(result) { alert(result); }, success: function(result) { alert(result); } }); The web method looks like so: [WebMethod] public string SaveSummaryDisplayData(string xml) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(xml); XmlParser parser = new XmlParser(xmlDocument); IModel repository = new Repository(); if(repository.AddRecord("TestData",parser.TestValues)) { return "true"; } return "false"; } } I added the return string to the web method in an attempt to ensure that the web-service is really hit from the ajax. The problem is this: In FF the 'Success' function is always called yet the result is always 'NULL'. And the web method does not appear to have worked (no data saved). In IE the 'Error' function is called and the response is server error: 500. I think (believe it or not) IE is giving me a more accurate indication that something is wrong but I cannnot determine what the issue is. Can someone please suggest how I should expose the specific server error message? Thanks for the help!

    Read the article

  • Using complex data types from Java in Axis webservice

    - by Manuel Ferreria
    I am currently developing a Java app which handles a SOAP webservice. The problem lies after I parse the WSDL [the Parser object from Apache Axis does it for me], and I create the call. When I try to invoke it, I have to pass a Object[] to assign the parameters [taken from the Action of the WSDL]. A normal action is easy, but when I have custom datatypes, I can't get it to fill it out for me. I try to pass Object[]{ new Object { }}, but it assigns the first field instead. I can't pass it already processed, because it changes the '< ' to '--lt --gt', and the server doesn't recognize it'. This is a fragment of the WSDL. <s:element name="FERecuperaQTYRequest"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="argAuth" type="tns:FEAuthRequest" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="FEAuthRequest"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Token" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Sign" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="cuit" type="s:long" /> </s:sequence> </s:complexType> And this is the troublesome Java Fragment QTY = (String) call.invoke ( new Object[]{ new Object[]{ tokenConexion.getToken (), tokenConexion.getSign (), tokenConexion.getCUIT () } });

    Read the article

  • C# Client to Consume Google App Engine RESTful Webservice (rpc XML)

    - by Ngu Soon Hui
    I think I hit a problem when using C# client to consume Google App Engine Webservice. The Google App Engine code I use is here. This is how the python script on server would look like: from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app import logging from StringIO import StringIO import traceback import xmlrpclib from xmlrpcserver import XmlRpcServer class Application: def __init__(self): pass def getName(self,meta): return 'example' class XMLRpcHandler(webapp.RequestHandler): rpcserver = None def __init__(self): self.rpcserver = XmlRpcServer() app = Application() self.rpcserver.register_class('app',app) def post(self): request = StringIO(self.request.body) request.seek(0) response = StringIO() try: self.rpcserver.execute(request, response, None) except Exception, e: logging.error('Error executing: '+str(e)) for line in traceback.format_exc().split('\n'): logging.error(line) finally: response.seek(0) rstr = response.read() self.response.headers['Content-type'] = 'text/xml' self.response.headers['Content-length'] = "%d"%len(rstr) self.response.out.write(rstr) application = webapp.WSGIApplication( [('/xmlrpc/', XMLRpcHandler)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() The client side ( in Python) is this: import xmlrpclib s = xmlrpclib.Server('http://localhost:8080/xmlrpc/') print s.app.getName() I have no problem in using Python client to retrieve values from Google App Engine, but I do have difficulties in using a C# client to retrieve the values. The error I got was 404 method not found when I am trying to GetResponse from the web request. This is my code var request = (HttpWebRequest)WebRequest.Create("http://localhost:8080/xmlrpc/app"); request.Method = "GET"; request.ContentLength = 0; request.ContentType = "text/xml"; using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) //404 method not found error here. { } I think it must be that the url is wrong, but I don't know how to get it right. Any idea?

    Read the article

  • Design: Website calling a webservice on the same machine

    - by Chris L
    More of a design/conceptual question. At work the decision was made to have our data access layer be called through webservices. So our website would call the webservices for any/all data to and from the database. Both the website & the webservices will be on the same machine(so no trip across the wire), but the database is on a separate machine(so that would require a trip across the wire regardless). This is all in-house, the website, webservice, and database are all within the same company(AFAIK, the webservices won't be reused by another other party). To the best of my knowledge: the website will open a port to the webservices, and the webservices will in turn open another port and go across the wire to the database server to get/submit the data. The trip across the wire can't be avoided, but I'm concerned about the webservices standing in the middle. I do agree there needs to be distinct layers between the functionality(such as business layer, data access layer, etc...), but this seems overly complex to me. I'm also sensing there will be some performance problems down the line. Seems to me it would be better to have the (DAL)assemblies referenced directly within the solution, thus negating the first port to port connection. Any thoughts(or links) both for and against this idea would be appreciated P.S. We're a .NET shop(migrating from vb to C# 3.5)

    Read the article

  • Access problems with System.Diagnostics.Process in webservice

    - by Martin
    Hello everyone. I have problems with executing a process in a webservice method on a Windows Server 2003 machine. Here is the code: Dim target As String = "C:\dnscmd.exe" Dim fileInfo As System.IO.FileInfo = New System.IO.FileInfo(target) If Not fileInfo.Exists Then Throw New System.IO.FileNotFoundException("The requested file was not found: " + fileInfo.FullName) End If Dim startinfo As New System.Diagnostics.ProcessStartInfo("C:\dnscmd.exe") startinfo.UseShellExecute = False startinfo.Arguments = "\\MYCOMPUTER /recordadd mydomain.no " & dnsname & " CNAME myhost.mydomain.no" startinfo.UserName = "user1" Dim password As New SecureString() For Each c As Char In "secretpassword".ToCharArray() password.AppendChar(c) Next startinfo.Password = password Process.Start(startinfo) I know the process is being executed because i use processmonitor.exe on the server and it tells me that c:\dnscmd.exe is called with the right parameters Full command line value from procmon is: "C:\dnscmd.exe" \MYCOMPUTER /recordadd mydomain.no mysubdomain CNAME myhost.mydomain.no The user of the created process on the server is NT AUTHORITY\SYSTEM. BUT, the dns entry will not be added! Here is the weird thing: I KNOW the user (user1) I authenticate with has administrative rights (it's the same user I use to log on the machine with), but the user of the process in procmon says NT AUTHORITY\SYSTEM (which is not the user i use to authenticate). Weirdest: If i log on to the server, copy the command line value read from the procmon logging, and paste it in a command line window, it works! Reading procmon after this shows that user1 owns the dnscmd process. Why doesn't user1 become owner of the process started with system.diagnostics.process? Is the reason why the command doesn't work?

    Read the article

  • Call Webservice using Javascript

    - by ajithperuva
    I am trying to call a webservice using javascript.But it shows an error like selectSingleNode() is not a method.I am trying it in mozilla firefox.Which is perfectly working in explorer when i change XMLHttpRequest to ActiveXObject.here i am adding my source code which i am tried in firefox. // Web Service functionality // Global vars var xmlDoc = null; var _serviceCallback = null; // Calls web service, web service url and parms, and callback function or null must be provided. // Callback function receives a true or false based on success of call to host function callWebService(url, callback) { _serviceCallback = callback; if(xmlDoc == null) { // xmlDoc = new XMLHttpRequest(); xmlDoc = new XMLHttpRequest(); } xmlDoc.onreadystatechange = stateChange; //callback for readystate xmlDoc.async = true; //do background processing //xmlDoc.load(url); xmlDoc.open('GET', url); xmlDoc.send(); //var doc= xmlDoc.responseXML; } // Updates readystate by callback function stateChange() { if (xmlDoc.readyState == 4) { var err = xmlDoc.parseError; var result = false; var nd; if(err.errorCode == 0) { nd = xmlDoc.selectSingleNode("//envelope/date_time"); if(nd.text != "") result = true; } // perform callback if provided if(_serviceCallback != null) _serviceCallback(result, nd == null ? "" : nd.text); } } // Callback supplied to XMLHttpRequest call function callbackTest(result, data) { obj = document.getElementById("txtOuput"); if(result) obj.value = "Success " + data; else obj.value = "Web Service Call Failed"; } Please help me...Already which kill my 8 more hours...

    Read the article

  • Add webservice reference, the classes in different file

    - by ArunDhaJ
    Hi, When I add webservice as service reference in my .Net project, it creates a service folder within "Service References". All the interfaces and classes are contained within that service folder. I wanted to know how to split the interface's method and classes. Actually I wanted the web service reference to import classes defined in different dll. I wanted to define this way because of my design constraints. I've 3 layered application. Of which third layer is communication layer which holds all web service references. second is business layer and first is presentation layer. If the class declarations are in layer-3 and I'm accessing those classes from presentation layer, it is logically a cross-layer-access-violation. Instead, I wanted a separate project which holds only the class declarations and this would be used in all 3 layers. I didn't faced any problems to achieve this with layer-1 and layer-2. But, I'm not sure how to make communication layer to use this common declaration dll. Your suggestion would help me to design my application better. Thanks in advance Regards ArunDhaJ

    Read the article

  • PHP webservice for c# application

    - by user293995
    Hi, I want to create a php webservice server to be used from a C# application. I want to have a library who autogenerate wsdl file for easy management (That's the reason why I choosed NuSoap). I tried to use nusoap on PHP5. I have some problems with charset and Content-Type. Visual Studio gives this error : The HTML document does not contain Web service discovery information. Metadata contains a reference that cannot be resolved: 'https://www.xxx.yy'. There is a problem with the XML that was received from the network. See inner exception for more details. The encoding in the declaration 'ISO-8859-1' does not match the encoding of the document 'utf-8'. If the service is defined in the current solution, try building the solution and adding the service reference again. $soap= new soap_server(); $soap-xml_encoding = 'utf-8'; $soap-configureWSDL('Bonjour', 'https://www.xxx.yy'); $soap-wsdl-schemaTargetNamespace = 'http://soapinterop.org/xsd/'; $soap-register('bonjour', array('prenom' = 'xsd:string')); $HTTP_RAW_POST_DATA = file_get_contents("php://input"); $soap-service($HTTP_RAW_POST_DATA); header('Content-Type: application/soap+xml; charset=utf-8'); function bonjour($prenom) { return "Bonjour ".$prenom; } ? Does someone knows how to change that to make it compliant and working ? Thanks

    Read the article

  • Getting response status code 0 in SmartGWT webservice call using json

    - by Girish
    I have developed application using SmartGWT, now i need to call webservice using json to another application which is deployed in another server for submitting username and password. When i make a request with url and POST method, getting the response status code as 0 and response text as blank. Here is my code, public void sendRequest() throws Exception { // Get login json data to be sent to server. String strData = createLoginReqPacket(); String url = "some url"; RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader("Content-Type", "application/json"); builder.setHeader("Content-Length", strData.length() + ""); Request response = builder.sendRequest(strData, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { int statusCode = response.getStatusCode(); System.out.println("Response code ----"+response.getStatusCode()+""); if (statusCode == Response.SC_OK) { String responseBody = response.getText(); System.out.println("Respose :" + responseBody); // do something with the response } else { GWT.log("Response error at server side ----",null); // do in case of server error } }// end of method. @Override public void onError(Request request, Throwable exception) { GWT.log("**** Error in service call ******",null); }// end of method. }); builder.send(); }// end of send request. Please anybody knows the solution?? Give some reference code or links for this. Thanks.

    Read the article

  • Consume a JSON webservice and process data in Android

    - by user1783391
    I am trying to consume a the webservice below http://62.253.195.179/disaster/webservices/login.php?message=[{"email":"[email protected]","password":"welcome"}] This returns a JSON array [{"companyuserId":"2","name":"ben stein","superiorname":"Leon","departmentId":"26","departmentname":"Development","companyId":"23","UDID":"12345","isActive":"1","devicetoken":"12345","email":"[email protected]","phone":"5456465465654","userrole":"1","chngpwdStatus":"1"}] My code is below try{ String weblink = URLEncoder.encode("http://62.253.195.179/disaster/webservices/login.php?message=[{\"email\":\"[email protected]\",\"password\":\"welcome\"}]"); HttpParams httpParameters = new BasicHttpParams(); int timeoutConnection = 7500; HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection); int timeoutSocket = 7500; HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket); HttpClient client = new DefaultHttpClient(httpParameters); HttpGet request = new HttpGet(); URI link = new URI(weblink); request.setURI(link); HttpResponse response = client.execute(request); BufferedReader rd = new BufferedReader(new InputStreamReader( response.getEntity().getContent())); result = rd.readLine(); JSONObject myData = new JSONObject(result); JSONArray jArray = myData.getJSONArray(""); JSONObject steps = jArray.getJSONObject(0); String name = steps.getString("name"); } catch (JSONException e) { e.printStackTrace(); } But its not working and I am not 100% sure this is the best way to do it. 11-10 10:49:55.489: E/AndroidRuntime(392): java.lang.IllegalStateException: Target host must not be null, or set in parameters.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >