w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Getting error in fiddler when returning datatable from WCF service
I managed to find another way. I am not sure if thats clever. What i did is to convert that datatable to list and return list. So i added below code in my service foreach (DataRow row1 in dt.Rows) { var list = new LookUpTable(); list.Name = (string) row1["Name"]; list.Id = row1["Id"]; myReturnList.Add(list); } return myReturnList.ToList();

Categories : Knockout Js

PayPal Sandbox returning Internal Service Error
Do you have 'Negative testing' enabled on your sandbox account(s) by any chance? https://developer.paypal.com / > Applications > Sandbox accounts > Find your account > Click 'Profile' > Settings. Negative testing lets you test specific error conditions for our classic API's by triggering a specific error code by passing them as 'AMT' value. For example, for API error code 12345, you would set AMT=123.45. For your error scenario I see us returning API error code 10500 internally. Which makes me strongly suspect you've got 'Negative testing' turned on for one of your sandbox accounts.

Categories : Paypal

Jquery ajax call returns error when the rest service is returning a string
try setting your datatype to text jsonp dataType: 'jsonp', http://api.jquery.com/jQuery.ajax/ You will have to do one of two things to go with this to resolve the error further; making changes on the server side to pass the data back as json and not as text retun the string encoded in json return "{"text":"abc"}"; //or something like this Why? jquery cross-domain requests are only allowed for dataTypes "script" and "jsonp". I have updated your fiddle it still throws an error but that is related to a parse json error

Categories : Java

QuickBooks Webconnector Error - Django Soap Web Service - Actual error received from web service for serverVersion call
It looks like your web server is closing the connection, when it shouldn't be: The underlying connection was closed: An unexpected error occurred on a receive. Are you sure your SOAP service actually works, and that your web server isn't crashing, throwing an error, or closing the connection for no reason? Another thing I wonder about - you have the Web Connector pointed to your WSDL. Shouldn't it be pointed as the actual web service, not at the WSDL definition? AppURL: http://test:8000/qwc/qwcintegration/service.wsdl

Categories : Django

How to set default value of Drop down while returning on service?
I'm guessing you're using the same event in both directions, so each Dropdown is being reset for selecting the other one. I'm not sure you will need custom events in order to do so, unless you're using additional information. Simply separate the code for your two Dropdown ListEvent.CHANGE events: When the selected item of the Branch is changing, get the corresponding Employee item and apply the index to the Employee Dropdown. When the selected item of the Employee is changing, either set the Branch Dropdown index to -1 or the corresponding employee's index, up to you.

Categories : Java

Returning a List of type from web service
In the "Add Service Reference" dialog, click "Advanced" and choose to use List<T> as the collection type.

Categories : C#

Returning an XElement from a .ASMX Web Service
The place to start with would be the stack trace, which indicates the place where the exception occured: at System.Xml.Serialization.XmlSchemaExporter.ExportElement(ElementAccessor accessor) at System.Xml.Serialization.XmlSchemaExporter.ExportTypeMapping(XmlTypeMapping xmlTypeMapping) at System.Web.Services.Description.MimeXmlReflector.ReflectReturn() at System.Web.Services.Description.HttpProtocolReflector.ReflectMimeReturn() at System.Web.Services.Description.HttpPostProtocolReflector.ReflectMethod() By using ILSpy we may observe the conditions which trigger the exception: // System.Xml.Serialization.XmlSchemaExporter private XmlSchemaElement ExportElement(ElementAccessor accessor) { if (!accessor.Mapping.IncludeInSchema && !accessor.Mapping.TypeDesc.IsRoot) {

Categories : C#

iOS: HTTP service returning , how to test for this?
Have you tried using the below code to test for it if (myObject == [NSNull null]) { // handle it } else { // } "The NSNull class defines a singleton object you use to represent null values in situations where nil is prohibited as a value (typically in a collection object such as an array or a dictionary)." - Apple

Categories : IOS

Using a Service Account, getAccessToken() is returning null
For some reason, this seemed to work: require_once 'google-api-php-client/src/Google_Client.php'; const CLIENT_ID = 'blahblahblah'; const SERVICE_ACCOUNT_NAME = 'blahblahblah@developer.gserviceaccount.com'; const KEY_FILE = 'path/to/privatekey.p12'; const CALENDAR_SCOPE = "https://www.googleapis.com/auth/calendar"; $key = file_get_contents(KEY_FILE); $auth = new Google_AssertionCredentials( SERVICE_ACCOUNT_NAME, array(CALENDAR_SCOPE), $key ); $client = new Google_Client(); $client->setScopes(array(CALENDAR_SCOPE)); $client->setAssertionCredentials($auth); $client->getAuth()->refreshTokenWithAssertion(); $accessToken = $client->getAccessToken(); $client->setClientId(CLIENT_ID); If someone can explain why this worked, please edit this answer or comment!

Categories : PHP

WCF Data Service not returning detailed errors
You might try adding this to your WCF service code at the startup on the host. It causes exception details to be included in faults that are thrown to, and caught by, the client. Without this, details of the exceptions are hidden. And make sure that, when you're catching those internal exceptions, that you throw a generic "fault" object to the client using the WCF System.ServiceModel.CommunicationObjectFaultedException object. Dot NET exceptions are Microsoft centric, so if you're throwing errors to non-MS devices like Android or iPhone, you need to use the CommunicationObjectFaultedException. ServiceDebugBehavior debug = ServiceHost.Description.Behaviors.Find<ServiceDebugBehavior>(); if (debug == null) { ServiceHost.Description.Behaviors.Add(new ServiceDebugBehavior { I

Categories : Wcf

web service returning xml although return format is json
Try using [ScriptMethod(UseHttpPost=true, ResponseFormat=ResponseFormat.Json)] Also return an object from your service so that it can be used more predictably by the client. return new Result() { Value = "some string" };

Categories : C#

What causes the error that says "Could not find the Service Class" for a service wrapped by WinRun4j
I believe you are using two incompatible parameters in your service.ini. You must introduce either service.class or main.class, but not both. If you want your .exe to be executed always as a service, you must use service.class and register it in the Windows Service Manager, like so: executable.exe --WinRun4J:RegisterService If you want it to be a normal application, you must use main.class and call it normally. If you want to execute it in both ways, you have to fall back to some roundabout like the one here. CopyPasting from the link: I have the same requirement, for what will be around 10 or so services. Each must also be available to support people for command line execution, passing optional parameters for a "single run" mode of operation. I have simply created a p

Categories : Java

Invocation of TIBCO web service from HP Service Manager is causing error
I have resolved this issue. Issue was with SOAP Version. SOAP Version of wsdl provided by TIBCO was 1.2 and HP SM was expecting 1.1 SOAP 1.2 supports application/soap+xml, while SOAP 1.1 supports text/xml. That is why I was getting content-type error.

Categories : Web Services

Error 1001. The specified service already exists. Existing service can't removed
The best solution I have found to "Error 1001. The specified service already exists" when installing/upgrading/repairing a Windows Service project is to modify the ProjectInstaller.Designer.cs. Add the following line to the beginning of InitializeComponent() which will trigger an event before your current installer tries to install the service again. In this event we will uninstall the service if it already exists. Be sure to add the following to the top of the cs file to implement the following namespaces... using System.Collections.Generic; using System.ServiceProcess; Then use the following as show below in the example... this.BeforeInstall += new System.Configuration.Install.InstallEventHandler(ProjectInstaller_BeforeInstall); Example: private void InitializeComponent() {

Categories : C#

Visual Studio Express 2012 for Web: Creating Service Reference to WCF Data Service 5.0.0.0 Causes Custom Tool Error
I resolved issues two and three by installing WCF Data Services 5.3.0 RTM Tools. Hope this helps.

Categories : Visual Studio 2012

Bind visibility to checkable menu item shows error "Service provider is missing the INameResolver service" in WPF
Here is the explanation from Adam Nathan's WPF 4 unleashed book (I advise everyone to read): The x:Reference markup extension is often mistakenly associated with the XAML2009 features that can only be used from loose XAML at the time of this writing. Although x:Reference is a new feature in WPF 4, it can be used from XAML2006 just fine as long as your project is targeting version 4 or later of the .NET Framework. One glitch is that the XAML designer in Visual Studio 2010 doesn't properly handle x:Reference, so it gives the following design-time error that you can safely ignore: Service provider is missing the INameResolver service. In any case, this message can be ignored. For my Visual Studio 2010, it sometimes appears, sometimes not. EDIT: I found one more quote (source), but

Categories : C#

Returning JSON Objects from jeJSrsey Rest Service
Remove the resourceConfig.getClasses().add(JSONArrayProvider.class); lines from your code. Providers for JSONObject and JSONArray are found automatically via META-INFservices mechanism. Everything you need to do to use these Jettison classes is to put jersey-json.jar and jettison.jar on your classpath.

Categories : Json

WCF Service returning 502 Http Code (The specified network name is no longer available.)
The default limit is 4mb. You either need to split the file into smaler parts. http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f6541134-2e08-4eb9-987b-2158fb99b403/ Or change MaxMessageLength Large Binary (byte[]) File transfer through WCF

Categories : C#

Returning specific columns using ViewFields in SharePoint web service
This is to help people who are looking for an answer to this question, the solution we found most effective: We took the node idea from here: How to Return Only Certain Columns of a List When using the SharePoint Web Service? Then we went through the process of extract the fields that we want into a datatable. Firstly we create an appropriate amount of columns to fields. Then going through the child nodes to extract all the row data. Doing this for each of the fields that we have requested. var myData = new DataTable(); foreach (string field in fields) { myData.Columns.Add(field); } foreach (XmlNode node in nodeListItems) { // rs = RowSet if (node.Name == "rs:data") { for (int i

Categories : C#

Bing translation Service returning first response to every request
I have resolved these issues explained below: 1) My own fault for trying to reassign configuration object properties to themselves with varied data. This set my configuration file to retain the data of the previous service call. Causing it to parse the same data and return it as new data. 2)My belief is that when passing malformed html script tags are translated. Also please note that in your configuration of your web service call your content type parameter should be set to "text/html" Hope this helps someone down the road. Thanks!

Categories : Dotnet

Returning a value from 'success' block in JS (Azure Mobile Service)
I found a solution to this elsewhere. In practice (to the best of my understanding), it is not possible to do this within a JavaScript with asynchronous functions. What you need to do is create a recursion instead from inside the success handler.

Categories : Javascript

angularjs: returning json data from service to controller
Sure. Try this code function init(){ customersService.getCustomers().then(function(response){ $scope.customers = response.data; }); } this.getCustomers = function() { var promise = $http({ method : 'POST', url : '/CustomerManagementApp/customers/all' }).success(function(data, status, headers, config) { $log.log('Done'); angular.forEach(data, function(c) { $log.log(c.firstName); }); customers = data; return customers; }); return promise; }; promise - as an interface for interacting with an object that represents the result of an action that is performed asynchronously, and may or may not be finished at any given point in time.

Categories : Angularjs

Jersey service returning 400 Bad Request with Must specify a non-null value for the 'to' index in a Range
After 5 hours, I found the answer. I was looking in the wrong place. Turns out, Runtime exceptions are turned into 400 Bad Request by Jersey response handler. I was focused on other services when the issue was my own service throwing an IllegalArgumentException from a loop. Place a try catch (Exception e) around your service impl and find the issue quickly. Jersey strips the stack trace when returning this error and it may not be from a remote service, might be your own code. Placed here for posterity for any others so afflicted. I did not know where else to note this.

Categories : Java

WCF REST Service not returning data from POST in FireFox and Chrome
I faced a multitude of problems making WCF work properly with JSON/REST.. so instead I learned about the new ASP.NET Web API which makes this much simpler. For any new web services I will likely be using this instead of WCF.

Categories : Json

ASP.NET Rest Service returning 500 errors on return when hosted in IIS 7.5, but works in VS Debug Server
Its always after asking for help I seem to find an answer.... Turns out having <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Content-Type" /> </customHeaders> </httpProtocol> in in the main web.config, and within the web.config in the service's folder will cause this behavior. Amazing it works in IIS Express, however. The service executes just fine, but there is a 500 error AFTER the return.

Categories : Asp Net

My .NET web service method needs to return a JSON result to the calling client (an iOS device), but is returning a bunch of 's
You should use the overload of ToString() that takes the formatting parameter: return val.ToString(Formatting.None, yourJsonFormatters);

Categories : C#

RESTEasy service for producing xml and returning array/list of JAXB objects giving empty collection
I was able to make the serialization work with your Customer POJO by making the following changes: Moved the @XmlElement annotations to the fields Added @XmlAccessorType(XmlAccessType.FIELD) annotation to tell JAXB to bind by fields and ignore getters/setters. Method: @GET @Path("/customers") @Produces(MediaType.APPLICATION_XML) public List<Customer> getCustomer() { List<Customer> customers = new ArrayList<Customer>(); customers.add(new Customer("1", "customer1", "some address 1", 20)); customers.add(new Customer("2", "customer2", "some address 2", 45)); customers.add(new Customer("3", "customer3", "some address 3", 36)); return customers; } Customer POJO: @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement public class Customer { @Xml

Categories : Xml

Error in Hibernate Tool in Eclipse Unable to create requested service [org.hibernate.service.jdbc.connections.spi.ConnectionProvider]
I write here as in comments is difficult to be clear. In the class org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator put a breakpoint in the method below, in the return statement. It causes the exception thrown in your runtime. In debug mode we will understand what is happening and ,hopefully, complete this reply: private ConnectionProvider More ...instantiateExplicitConnectionProvider( String providerClassName, ClassLoaderService classLoaderService) { try { LOG.instantiatingExplicitConnectionProvider( providerClassName ); return (ConnectionProvider) classLoaderService.classForName( providerClassName ).newInstance(); } catch ( Exception e ) { throw new HibernateException( "Could not instantiate connect

Categories : Java

While returning a DataContract from a WCF function, I'm getting this error: "An error occurred while receiving the HTTP response"
That's a pretty generic exception in WCF so you'll need to enable WCF tracing to get more detailed info. Just guessing but look at this MSDN forum thread where the list contained complex objects that exceeded the default internal object limits in WCF. Once you enable WCF tracing, you should have a better idea of what's going on.

Categories : C#

Its returning a error, but its in try-catch. Whats the error?
Your code is only catching ParseException, so a NullPointerException won't be handled by the catch clause. My guess would be that either sdf is null when this code executes, or dataUltima is null when it is passed into the parse method (I don't exactly remember how parse() responds to null arguments). You can solve this in a number of ways. Check to see if the variable causing the exception is null before executing the try block, add a catch for NullPointerException to your try/catch, or make the ParseException block catch a more generic exception (like Exception) to handle both cases (although I personally would not recommend it).

Categories : Android

Error 500 when posting data to ASMX web service via jQuery "Error 500 Invalid Response Format"
Try this, presuming it's the params names : ( i figured out visiting your link ) before : data: {pickup_name: Name, pickup_email: Email, pickup_message: Message, pickup_date: Date}, after : data: {_name: Name, _email: Email, _message: Message, p_date: Date},

Categories : Jquery

Azure table storage service context continues to throw up the same error if it encounters one error
It appears that the context that contains your entities (audioRecordServiceContext) is declared at the class level and it is not clear if/when it is cleared out. Table Storage Contexts follow a "Unit of Work" design pattern. They are designed to track entities. If you've added a "bad" entity to your context and tried to persist, you'd obviously get an error. However, what you need to be aware of, is that your context did not throw away the bad entity. It is still tracking it and it still thinks you want to save it. So, next call to SaveChanges will attempt to save it again. Suggestion: put a "using" statement around your context and declare it inside a function only when you need to save entities - do not let it sit on a class level - unless you have a specific use case that require

Categories : C#

Error consuming Web Service: SOAP-ENV:Client Internal Server Error SoapDoc::CheckNameSpace: Wrong xml name space
After hours of investigation, i solved it, the problem was the Soap version, by default, Zend uses Soap 1.2. When i changed it to the 1.1 version, everything works perfectly. $params = array( 'soapVersion' => SOAP_1_1 ); $client = new Zend_Soap_Client($url, $params); I hope help somebody with this :D Greetings

Categories : PHP

.NET web service returning valid date in JSON, js says invalid date
JavaScript's support for parsing and formatting Date varies wildly between implementations. You can refer to this chart for some of the details. To work around these inconsistencies, use the moment.js library. On the .Net side, it looks like your service is translating the local time of the server to a UTC timestamp. If this is isn't the behavior you were looking for, you need to pay closer attention to the .Kind property of the DateTime you are working with. Avoid the Local kind, especially DateTime.Now. You can read more here.

Categories : Dotnet

Error consuming web service (There was an error reflecting 'inputParamName')
It looks like the WSDL generated by the service provider has some inconsistency, and not the .NET consumer. Anyway, I managed to create a workaround by editing manually the Reference.cs VS generated and removing the attributes that correspond to the WSDL namespaces. By the way, the certificate has nothing to do with this.

Categories : C#

Correct fix for 404 error? .net 4.5 MVC error loading web service URL
In your RouteConfig.cs file add below line routes.IgnoreRoute("{*x}", new { x = @".*.asmx(/.*)?" }); i got solutions from http://stackoverflow.com/a/17058251/2318354 That's working fine

Categories : Asp Net Mvc

Error when returning a pointer
That code compiles and runs just fine in gcc in both c90 and c99 mode, so there's a couple of things you can do. First and foremost, you should show us the actual error (that should have come with the original question). Second, get a hex dump of the file to make sure there's no funny characters in it, such as with the command od -xcb myprog.c. Thirdly, it's also good practice to return values from functions where you specify a non-void return type. Later iterations of C make this unnecessary for main but earlier iterations could result in random values being passed back to the environment. I still return zero from main even though I no longer have to (it's hard to break a thirty-year habit). That last point may be what's happening here, depending on which compiler and version you're u

Categories : C

Error in Returning Value of Function
Use a callback function : db_Save(req.session.user,function(x){ console.log('x is ' + x); }); var db_Save= function (user,callback) { userProfile.find({Email: profileInstance.Email}, function(err, doc){ callback(2); }); };

Categories : Javascript

Why this command in ggplot is returning an error?
Generally you don't use layer to build up a plot. Instead, you use geom or stat. p + geom_point() will plot what you're looking for. I'd suggest working through some of the examples in the gplot2 documentation.

Categories : R

locationManager returning 0.0000, where is the error?
You are not updating your labels. You should move the following to another method and invoke it in locationManager:didUpdateLocations:. _Breddegrad.text = [NSString stringWithFormat:@"%1.6f", Breddegrad]; _Lengdegrad.text = [NSString stringWithFormat:@"%1.6f", Lengdegrad];

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.