k5tm,
Thanks a lot for pointing me to the documentation - I've seen this document before but I didn't read all of it (that's a lot to go through and I wouldn't probably know what they are talking about until I actually have an issue, like right now).
tsuji,
Thank you so much for the code - it...
I forgot to mention that I'm using a template already, but it matches everything:
<xsl:template match="@* | node()">
I'm not sure how I can fit
<xsl:template match="From">
into that. The reason I'm using match="@* | node()" is the resulting doc B is almost identical to doc A (there are only...
I'm using a transform stylesheet to convert xml doc A into xml doc B. This is what's part of doc A:
<From>
<PartnerInformation>
<PartnerName>Company A</PartnerName>
<PartnerIdentifier Agency="ID">1</PartnerIdentifier>
</PartnerInformation>
</From>
<To>
<PartnerInformation>...
I know very little about xslt.
Here's my .xslt that transforms xml doc A into xml doc B:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output version="1.0" encoding="UTF-8" indent="yes" method="xml"...
I would like to replace the 'OrderCreate' with a parameter called myParam (sometimes the parameter will be "OrderCreate", sometimes "OrderChange").
Here's the code where the value is hardcoded - it works:
<xsl:if test="(position() = last()) and...
The code below is what I use for posting an xml file to the remote server. It works fine. However, there are times when I just want to test if the server is down without actually sending any file. How can I do that?
public void PostResponse(String fileName, String uploadUrl)
{
ASCIIEncoding...
Ok, but must the file reside under your installation directory (=where you installed your Windows service) or can you point the service to look for the settings file in another location?
Oh, I used it before, I just didn't realize I can change the settings values this way.
I'm not sure about the location of this Settings file though. My Windows Service gets installed under C:\windows\system32. But I would like the settigns file to reside in a specific folder. How do I do let...
I have a Windows Service that reads the settings from the App.config file. If I need to make a change to one of the settings, I have to rebuild the app and reinstall the service. Is it possible to have this App.config file sitting in some directory and let the service know where it is so the...
In my OnStop() event, I do this:
// Block the thread until the thread terminates
// or the specified time elapses.
while (!fpThread.Join(500)) // 500 ms
{
// Request additional time to stop the service
// to prevent the Service Control Manager from
// marking the service as not...
Having a flag that says the thread is currently executing is better than stoping the timer when the thread starts executing and starting the timer once it's done?
I looked at BackgroundWorker thread and it looks like that's what I'm going to use.
I realize while(true) is not good, but what else can I use if I need my service to execute some logic every 15 seconds? Do I really have any other choice?
I have a Windows Service which processes some files every X seconds. The service should run 24/7 unless there is an exception, in which case I stop the service. However, there are times when I would want to stop the service manually (through Admin Tools/Services). How do I ensure that when I do...
I thought of another solution, which I think is a better approach. Rather than having a timer kick off the function, I would have a loop and inside the loop I would call the function, after the function finished executing, I sleep for 15 seconds. Here's some pseudocode:
while (1)
{
try
{...
I have a Windows Service with the timer - every 15 seconds I'm calling a function. I need to add some logic to tell the timer to "wait" until the function is done executing its code (which can exceed 15 seconds) because I don't wait the timer to "hit" the function while it's still executing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.