w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Adding service reference for WF4 workflow service doesn't create client (ClientBase)
For anyone caught in this one, here's the issue. I had generated the web references for a console service app. By default, these are implemented as workflow activities, not as part of a client wrapper. Once I realized my misunderstanding, instantiating was simple.

Categories : Visual Studio 2012

MvvmCross syntax to consume a service defined in a plugin and the lifetime of that service within the application
1. The syntax you are using for CreatableTypes looks OK to me. When not using it inside App then the documented syntax is: " And you can also, of course, use the same type of registration logic on assemblies other than Core - e.g.: typeof(Reusable.Helpers.MyHelper).Assembly.CreatableTypes() .EndingWith("Helper") .AsInterfaces() .RegisterAsDynamic(); " from https://github.com/slodge/MvvmCross/wiki/Service-Location-and-Inversion-of-Control#bulk-registration-by-convention CreateableTypes(), EndingWith(), etc are all just fairly short extension methods acting on System.Type - you can see them in IoC/MvxTypeExtensions.cs - e.g. public static IEnumerable<Type> CreatableTypes(this Assembly assembly) { return assembly .ExceptionS

Categories : C#

Tanuki service-wrapper application works in console, fails as service with 1053
I found out what I did wrong. I created the service through the sc create command, rather than using the build in options of the java service wrapper executables. This resulted in the service wrapper executable not being able to start correctly, because of missing command-line parameters.

Categories : Java

Symfony2 service container: Inject array of services parameter as an argument to another service using XML
So, you inject array of parameters no array of services. You can inject service by service via: <services> <service id="notifications_decorator" class="NotificationsDecorator"> <argument type="service" id="decorator1"/> <argument type="service" id="decorator2"/> <argument type="service" id="decorator3"/> </service> </services> Or (in my opinion better way) tag decorators services and inject them to notifications_decorator during compilation passes. UPDATE: Working with Tagged Services In your case you have to modify your services like this: <services> <service id="decorator1" class="FirstDecorator"> <tag name="acme_decorator" /> </service> <service id="decorator2"

Categories : Symfony2

symfony2 service tagged as doctrine.event_subscriber not receiving events when using service with arguments
You have circular references. To create EntityManager, all event listeners must be created first. Now as your listener has dependency on a service, which has dependency on entity manager, you get circular reference. Best way to fix it would be avoid creating these references - you can get entity manager to listener by event arguments, passed to it. Another way would be to inject service container into listener and get the service only when it's needed.

Categories : PHP

android:how to ensure only one process(of a remote-service) running even all APPs integrated this service in the apk
You could write some resource locking mechanism. If you're already handling a call from app A, and app B wants the same call, return an error code that isn't fatal, rather tells the app to try back at another time. Or you could create a queue with a callback to app B that fires when app A is done.

Categories : Android

Unable to authorize access to a Service Bus Namespace for service running as LocalSystem or NetworkService?
suggest to use shared access key. To get the connection string with shared access key, run PowerShell cmd: $authRule = Get-SBAuthorizationRule -NamespaceName ServiceBusDefaultNamespace $authRule[0].ConnectionString

Categories : Misc

Adding manually defined service operations inside initService for odata service
Thanks @robesz - there were some subtleties in creating parameterized odata actions in .net and this is what has been plaguing me (I have tried actions before just couldn't get it to work), but this time I got it: [Queryable] [HttpPost] public IQueryable<Airport> GetAirportsWithinRadius([FromBody] ODataActionParameters parameters) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var radius = (int)parameters["radius"]; var airportId = (int)parameters["airportId"]; var resultAirports = GetAirportsWithinRadius2(airportId, radius); return resultAirports; } ActionConfiguration getAirportsWithinRadius

Categories : Misc

Get user appdata path from windows service by running service under local profile
I have also encountered in that problem and looked at your question but i at first sight didnot find an answer in it. This is the Mohit shah Answer "I found out that is not possible to get user appdata path from windows service by running service under profile "LocalSystem". So I used Environment.SpecialFolder.CommomAppData which gives me app data path C:ProgramData when run on windows 7 and when used same thing in windows service, it also gived the same path and i also ran the service under profile "LocalSystem" so it did not prompt me for credentials. So this solved my problem." @Mohit Shah Please mark this is as answer so that other can take help from that.

Categories : C#

Create C# client consumes SOAP service without using built-in 'Add Service Reference...'
You can do it by creating SOAP message and sending web request Like in this SOAP client web request

Categories : C#

Unable to create requested service [org.hibernate.service.jta.platform.spi.JtaPlatform]
I can try to answer your problem, but your question should include more information: You should include a full stacktrace. There is not enough information in the error you put in your question. The full stacktrace will add some necessary information to help us figure out what's going on. You post one configuration file, but it refers to other files, like hibernate.properties. You should include these files so that we can check the correct configuration of your application. Without this information, I can just suggest the following: You are using Atomikos as transaction manager. You must include a Maven dependency to Atomikos (you say in your post that you are using Maven). In the declared bean usermanagementSessionFactory, you should have properties in relation with Atomikos, as it i

Categories : Spring

Custom Linux service status message using Java Service Wrapper
I got a half-solution. Inspecting the wrapper script code, as suggested by @Naytzyrhc, I found that the wrapper lib reads 3 files to create the status message: bin/my-app.pid to print the PID of the running process; bin/my-app.status to print the status of the wrapper itself; bin/my-app.java.status to print the status of the wrapped application. So, in the application code, to override the status message, just write the message in the my-app.java.status file. There's only one gotcha: if the status message contains line breaks, the service my-app status doesn't print them, because it uses the echo command (as stated in this question Capturing multiple line output to a bash variable). To solve this problem, just change the line from: eval echo `gettext '$APP_LONG_NAME is running: PID:$

Categories : Java

Is there any way to automatically generate proxy class for android in eclipse for web service if I have web service url?
When you say "for android" you mean for use in an android app? I haven't used it in some time, but I think you can use SoapUI. That article is a few years old, but should still be possible. There are also tools (wsdl2java) that come with Apache axis, and cxf that you can use.

Categories : Java

Changing binding of WCF service hosted in Web role in azure cloud service
You're probably using basicHttpBinding now - that's what WCF defaults to for HTTP. The reason you don't see a reference to your service in web.config is because of the simplified configuration that was introduced in .NET Framework 4.0. You can still explicitly configure the service in web.config like you had to in earlier versions if you want, but it's not necessary. To do what you're asking, here's what you need to do: Change the protocolMapping to use webHttpBinding instead of basicHttpBinding. Add a webHttp endpoint behavior and set the DefaultOutgoingResponseFormat to "Json". Change your .svc markup file to include the Factory attribute and specify the WebServiceHostFactory. For example: Factory="System.ServiceModel.Activation.WebServiceHostFactory" Finally, add the [WebGet

Categories : Wcf

WCF service Process.Start under network service account impersonating as a different user
I had to add a reference to AsproLock.dll and associated code in order to permit the user account to have access to the running resource. //The following security adjustments are necessary to give the new //process sufficient permission to run in the service's window station //and desktop. This uses classes from the AsproLock library also from //Asprosys. IntPtr hWinSta = NativeMethods.GetProcessWindowStation(); WindowStationSecurity ws = new WindowStationSecurity(hWinSta, System.Security.AccessControl.AccessControlSections.Access); ws.AddAccessRule(new WindowStationAccessRule(userPassDto.Usuario, WindowStationRights.AllAccess, System.Security.AccessControl.AccessControlType

Categories : C#

ScriptManager service reference generates JS code that forgets about the service host name
From Exposing Web Services to Client Script: The ServiceReference object can reference a Web service only in the same domain as the page. The Web service path can be relative, application relative, domain relative, or absolute. For absolute paths, you must make sure that the path is in the same domain. So you can't call your web service method which is in another domain. What you can do is create another service in your asp.net project to call the original web service. then you can call newly created web service method from script manager

Categories : Asp Net

Materializing a 'WCF Data Service' service operation that calls a Stored Procedure
I had a problem very similar to this. The solution was to create a property within the DataContext which returned the type in question. To make that a little clearer, I had a method on the service like this: [WebGet()] public IQueryable<VolumeSlaReportSummary> GetVolumeSlaSummary(...) { ... return this.CurrentDataSource.GetVolumeSlaSummary(...); } When I called that method I got XML in the form <GetVolumeSlaSummary...., instead of the expected <feed... So, in the DataContext, I created a property like this: public IQueryable<VolumeSlaReportSummary> VolSlaSummary { get { return this.GetVolumeSlaSummary(...); } } Calling the method now returns the expected <feed... style XML.

Categories : Dotnet

What guarantees does the service control manager (SCM) make about the method calls on the service?
Michael Taylor provided a good answer to this question on the MSDN forums referencing the Win32 API which documents what the SCM will do in response to invalid control codes (reject them in various ways). State change methods are called only when the SCM believes the service is in the appropriate state and assuming that the service says it can handle the state (pause/continue). OnStart will be called if the service is stopped. OnPause is called if the service is running. OnContinue if the service is paused. A paused service can only be resumed or stopped. A running service can only be paused or stopped. SCM serializes commands to a service so only a single command will be running at a time. Refer to the Win32 documentation on how services work fo

Categories : C#

Android activity accessing service's static reference before the service is ready
So how should I make my activity wait till the TTSService is ready to be used? You don't. Most likely, you get rid of the service entirely, as it does not appear to be necessary. Have the activity use TextToSpeech directly. If you have a demonstrable reason why your app needs this to be in a service: Step #1: Delete public static TTSService sInstance and the sayHello() method. Step #2: Get rid of your existing startService() call. Step #3: Replace TTSService.sInstance.sayHello(Float.valueOf(distance).toString()); with a startService() call, to send a command to the service, where the message to be said is added as a String extra. Step #4: In onStartCommand() of your service, if the TTS initialization is complete, call speak() to speak the requested string (pulled from the extra).

Categories : Java

Resource based routing module used in a Node.js REST API service, or other useful modules for this type of service
RESTfull API get and post data through HTTP protocol. A more progressive approach is to use WebSocket [Wikipedia] npm link. Try to play with Sails.js framework build on Express.js that use Socket.IO for flash data transfering

Categories : Javascript

Associate two activities with a service. Terminate the service if the application is put in the background
I ended up doing this with a bound service. I still don't know if this is best way to do something like this but it has the desired effect. Activity A binds to the MusicService on the button click. In the MusicService we set the bind to start playing the music. Activity A unbinds when either the button is reclicked or Activity A is stopped. Activity B binds onCreate() and unbinds when onStop(). For sure I could probably tweak the code so that the correct lifecycle pairs are selected but this works for my use case.

Categories : Android

Start an android service inside the same service to make a loop
You could create a thread in your service and put while loop there like this: new Thread(new Runnable(){ public void run() { // TODO Auto-generated method stub while(true) { Thread.sleep(60000) //REST OF CODE HERE// } } }).start(); But this is an easy quick fix, overall, creating a thread that sleeps all the time is not a good solution for mobile devices. You should consider using AlarmManager instead. It handles recurring events very well and was specifically designed for similar scenarios.

Categories : Android

Ruby: gem win32-service: Create a service with Admin privileges
The underlying CreateService Windows API function requires an account domain on the lpServiceStartName field, so you probably need to set the :service_start_name field to 'domainAdministrator', where the account domain is usually the computer name.

Categories : Ruby

wso2 governance registry - client looks up service and call service
yes that would be an valid reason to use the governance registry and what you have mentioned can be done using the WSO2 GREG. take a look at the following sample i think it should help you[1] [1] http://docs.wso2.org/wiki/display/Governance452/Endpoint+Look-up+Sample

Categories : Api

Testing Windows DOTNET Service on Linux using mono-service
If you have installed mono using sudo apt-get install mono-complete, you might want to look at the mscorlib. Mono take mscorlib.dll 2.0 instead of 4.0 Unable to run .net app with Mono - mscorlib.dll not found (version mismatch?) might be of use.

Categories : C#

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

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

Failed to invoke the service. Possible causes: The service is offline or inaccessible while Invoking
Maybe not the answer you are looking for, but for development on the local machine I always use an HTTP endpoint. I find Net.TCP will only play nice when it is hosted on a server in IIS. It is easy enough to add the NET.TCP endpoints once you deploy to an IIS server. Note: that the base address no longer has any affect as that is set in IIS. To test the new endpoints it is best to start by opening the service in a browser while remoted into the server, that way you get the best error messages. If i understand correctly you are trying to select the endpoint when creating the service reference? Thats now how it works. If you create your service reference using 127.0.0.1/service/Service1.svc You should see in your config file something like the following. (When I create my service endpo

Categories : C#

Hosting WCF Service in a Windows Service - and start some stuff at the beginning
Whether this is viable in your circumstance or not will depend on your service design but the two general approaches I would consider for exposing service A to B with the overall design you've presented: pass a reference to the main service instance to the WCF / monitoring service in the constructor if using something like Castle Windsor, register your main service as a singleton so the monitoring service can access the main service instance from various points It's fine It's not necessary at all, but depending on the nature of the main service it might make sense to expose the monitoring functionality in a consistent manner with the primary functionality.

Categories : C#

How to call a wcf service without adding service reference at design time
As Grant said above, as long as the service contracts don't change, you can change the endpoint address without recompiling the application itself. Check your solution explorer for a file called App.config. (It may be called Web.config if you're making some kind of web app.)

Categories : C#

Angularjs how can I unit test a Service which depends on another Service with promises?
If you are just testing Service2 then you should try to eliminate any dependency on Service1 in the test. Your test could have something like: module('foo.services', function($provide) { $provide.value('Service1', MockService1()); }); This will give the return value from the function MockService1 instead of actually using the service, whenever it is injected. Then you have MockService1 function return a skeleton of the actual service with the same function. In your test you can then wait for the promise to be resolved by doing something like this: bar: function(...) { var def = $q.defer(); $timeout(function() { def.resolve('test'); }); return def.promise; } // This is in your test bar.then( // .... some tests); // This executes the timeout and therefor the resolve $root

Categories : Unit Testing

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#

Calling a web service that depends on a result from another web service in play framework
WS.url(url1).get returns Future[Response] so all your generators in the for comprehension should be futures. In your code snippet, you are mixing Array[String] and Future[Response]. See Type Mismatch on Scala For Comprehension for some background on for comprehension. So I would try something like this: for { respA <- WS.url(url1).get ids = respA.body.split(",").take(2) responsesB <- Future.sequence(ids.map(id => WS.url(url2 + id).get)) } yield { responsesB.map(respB => getMyObjects(respB.xml)) } So the types are: respA: Response ids: Array[String] ids.map(id => WS.url(url2 + id).get): Array[Future[Response]] Future.sequence(ids.map(id => WS.url(url2 + id).get)): Future[Array[Response]] responsesB: Array[Response] And the return type of the for comprehensio

Categories : Web Services

Validating Azure Mobile Service token in a WebApi service
The post at http://www.thejoyofcode.com/Generating_your_own_ZUMO_auth_token_Day_8_.aspx shows how to generate an Azure Mobile Service token, but that has the information you need to validate it as well. Basically, the key you need to use to validate it is the master key from the service (do not distribute that key to any clients, but if it's coded securely in your service, that should be fine). The audience depends on the provider which created the token (e.g., for FB, it's the string "Facebook"). The issuer is set to urn:microsoft:windows-azure:zumo.

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#

Failed to invoke the service. Possible causes: The service is offline or inaccessible
By seeing your comment (error in detail) I can suggest you to increase the max buffer size & MaxReceivedMessageSize in SvcConfigEditor (through VS command prompt or Wcf Test Client)

Categories : Wcf

Unable to start service when service in separate package
Bit the bullet and merged the packages into 1 - and still got the error! I know the line causing the problem (though don't yet know why), but I'm closing this question as it isn't the right question and I don't want to waste people's time.

Categories : Android

Windows service calling WCF service (web http configuration)
In you WCF Service configuration you forgot to add the behaviour configuration(you named it "WebHttp") to the endpoint try this : <endpoint address="" binding="webHttpBinding" bindingConfiguration="basicWebHttp" contract="Classes.IVisService" name="BasicHttpBinding_IVisService" behaviorConfiguration="WebHttp" />

Categories : C#

Call Method In Windows Service from WCF Service (Self Hosted)
If the window service is to host WCF service, that is all what it should do (SRP). However, WCF can interact with another Project (say Business service that Process your business rules). So what I am saying is Windows service only host wcf, wcf service delegates the request to the Business service for processing

Categories : C#



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