WebSphere - MQ Status - c#

I am trying to fetch some information/data from (IBM) Websphere MQ using C#.
I did manage to get a message, but i can't figure out how to get details about the queue (e.g. are there any items, how many items are contained, etc).
Not Sure if it matter, but i use MQ 6.1 - the online API for c# provided by IBM is quite empty.
Any suggestions welcome.

The information you want is available as queue object properties. Some properties are settable, all are gettable. The app needs to have inquire and/or set rights on the queue in order for these to work.
The link you provided in the comment to Stephen's response is to a different section of the WMQ .Net manual. I suspect you are viewing it with curl or otherwise have script disabled or else you would have easily found the section I linked to above in the navigation panel. Any page loaded in a suitable browser will reload itself inside the navigation frame and display a table of contents on the left. The table of contents will be positioned on the page opened. The section you referenced was to compiling the .Net app but there is a complete API reference elsewhere.
I would recommend viewing the Infocenter in a Javascript-enabled browser with cookies, or else installing the local version of the Infocenter as an Eclipse workbench. The local version has the ability to pull down updates when the online manuals are updated. In either case, a navigation panel is provided which includes the complete set of WMQ manuals and is searchable across all of them, by individual book or by section within a book.
The landing page for WMQ documentation is here. This page contains links to the online Infocenters for v6 and v7, the downloadable Infocenters for v6 & v7 and the PDF versions of the older documentation.
EDIT - The drill-down path to definitions of the constants
From the MQC page readers are directed to the Application Programming Reference manual rather than directly to the MQC docs. However, the page displayed does not represent the whole APRM content! Click the plus sign in the navigation frame to open the TOC for the book.
The page Constants has no content other than to direct the reader to the Constants manual. Unfortunately, it's not linked but the manual is listed in the navigation frame simply as "Constants". Click the plus sign to expand the TOC.
This level contains the major sections of the book, one of which is the detail of all the constants under the heading of "Constants". Clicking that link opens an index page with all of the constants listed and links to a dedicated page for each.

In the past I have used XMS: The IBM Message Service Client for .NET. The current version can be found at: IBM Message Service Client. You can also find a quick tutorial at C# Corner
In general you want to follow the pattern:
MQCONN
MQOPEN the queue
loop
MQGET from the queue
Process the message
end loop
Make sure you specify MQGMO_WAIT on the MQGET call. You don't want to just poll the queue.
I'll try to find some source code when I get to the office.

Related

Google Tag Manager .NET event tracking?

I've found a .NET library to query/write information to Google Tag Manager here:
https://developers.google.com/resources/api-libraries/documentation/tagmanager/v1/csharp/latest/annotated.html
The javascript version goes like this:
Google Tag Manager takes a GTM-id and you push events to a dataLayer array. I'm looking for the same thing, but in .NET, but can't seem to find it.
Does such a thing exist in .NET or does it seem i just can't find it in the documentation?
I'm asking this, because we'd like to send some information to GTM which should not be visible with google chrome's inspect element function or console. This information is private to our company (and GTM). We cannot allow the risk for people to inspect the page source and find revenue values per product (for example)

Creating SharePoint-linked forms in WPF

Can anyone point me in the direction of some potted WPF controls for interacting with SharePoint fields? Ideally, they should have comparable functionality to the HTML fields defined in the SharePoint XML namespace used in SharePoint designer. An ideal scenario would be to include similar syntax to the server-side defined HTML elements referencing a field in a list, and let the control decide what sort of data it needs to represent, and whether it needs to be editable or not.
In particular, I need it to support:
A people finder field that allows people to be identified from their names, email addresses, or usernames, much like the default HTML form element.
A formatted text field that provides basic formatting tools in the ribbon, as well as being able to provide the formatted text back as HTML (because this is how it seems to get stored in SharePoint).
Text boxes (single/multiline), combo boxes, and radio buttons (but these are all relatively easy, because they already exist as WPF controls)
In addition, values need to available in a way that allows me to push them back to the server and expect items to update. This is most important for formatted text and user "people" fields, since their displayed value is often quite different from the actual value (e.g. includes indexes to the UID for the user, or includes HTML respectively).
At present, following a lack of responses to a similar question on SharePoint StackExchange, I'm hosting the existing SharePoint forms in a WebBrowser control, which is, fairly obviously a pretty sub-optimal solution (mostly for UX and stability reasons); worst case, I can inject some CSS into the pages being displayed to hide them, but I'd really rather be abel to build something that's relatively robust.
SharePoint 2010 has provided both the Server Object and Client Object model using which a developer can use a client interface like WinForm or WPF and interact with SharePoint 2010 Web Applications, as well as work with SharePoint Objects. SharePoint 2010 has also provided Web Services and WCF services using which any client UI application can interact with it.
To use client object model, SharePoint 2010 has provided the following assembly references:
Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll
You can find these references from the following path:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI
And for 2013:
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
Sources:
http://www.dotnetcurry.com/showarticle.aspx?ID=761
http://www.dotnetcurry.com/showarticle.aspx?ID=758
This said, have you considered to do this using the content editor web part and JavaScript / jQuery and incorporate the app into the SharePoint stack?
Here is a similar question answered
Hope this helps!

Using the right search method in windows 8 app

I'm creating a Windows 8 app that can upload content from the local machine into the app (for local storage). I need to search through this content. What is the preferred strategy to use to incorporate this search functionality?
I have been trying to use the SampleData.json and SampleDataSource.cs from the grid template app as a starting point, but to me, it seems like the SampleData.json file will need to be updated each time new content is added to the app, seeing that data is populated from the SampleData.json file.
I have been going through the tutorial from MSDN:
Is there any other tutorials or advice anyone has for me? I need to incorporate this asap
Windows can index files for you, and then you can use the StorageFolder.CreateFileQuery[WithOptions] APIs to search via properties. If you place content inside a folder called "Indexed" in local or roaming app data, then indexing happens automatically and queries execute very quickly. You can also store the content in "appcontent-ms" files if that works better.
There's also the [Windows.Storage.Search.ContentIndexer][2] API for nonfile content or content that can't live in Indexed appdata folders. The ContentIndexer has its own query methods.
For all the details, see the section "Indexing and Searching Content" in Chapter 15 of my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition. Even though it's using JS as the language, much of the book is just about WinRT so it's entirely useful even if you're working with C#. And it's free, so there's nothing to lose!

Fiddler/C#: search content of request/response for special phrases

this is my first visit to stackoverflow and right now I feel very comfortable with this site.
It already helped me to get the FiddlerCore embedded into MS Visual C# 2008 Express Edition.
Just needed to create a reference(Verweis) to the fiddlercore dll from Project Explorer(Projektmappenexplorer) in MS Visual C# EE. Hope this are the names for it in the english version. After this you can use Fiddler.FiddlerApplication stuff etc.
What is my task?
I want to create a small program which is able to use the FiddlerCore to check the bodies of requests/responds for special JavaScript Code.
This enables the developers to check wether their code is valid in another versions of there Browser (especially from IE 6.x to IE 8.x) or not. To be able to do so, I need to know:
How can I check the content of a requested or responded file for a String?
This must have something to do with the Text View Inspector (Fiddler), but I cannot find a possibility to access it with .net code or within Fiddler which would also help a lot already.
I should be able to finish the remaining stuff with some search by google or stackoverflow.
As this is my first time with .net languages this will be very interesting and demanding.
Take a look at this example. In the BeforeResponse callback a Fiddler.Session is passed as argument. This object has a method called GetResponseBodyAsString. As its name suggest you may try using it to get the response text. There's also a GetRequestBodyAsString method for the request.

MOSS : Running code when creating a site from a template?

In MOSS 2007, is there a way I can insert a piece of code I wrote to run every time I create a site from a ready made template ??
You should do it with a feature, and give it a feature receiver that contains your code. Attach the feature to the site template. If you've made the template yourself, you can simply add it to its onet.xml. If it's a standard template, you can use feature stapling, which connects your new feature to an existing site template.
Note that in either case, your code will not run for sites that exist already, (unless you manually activate the feature there.)
Yes, you certainly can. I wrote a post on this a few months back. You have two options, either a feature with a feature activated handler, or using a ProvisionAssembly in your site defintions webtemp*.xml file. The latter is also how MOSS does the Publishing portal multi-site setup.
I wrote a short article on this a few months back:
http://furuknap.blogspot.com/2008/06/question-from-forum-post-at-httpwww.html
.b

Categories

Resources