Add reference to server for CLR stored procedure in VS2010 - sql

I need to add a reference to a CLR stored procedure that I have not deployed yet. The dll I need is on a remote server that I am connected to, according to the Database section under the solution properties. If I simply select References->Add Reference I cannot see the dll I need. I tried "Add Service Reference" and entered "jdbc:sqlserver://serverName\instanceName, however that gave me the following message:
"The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme 'jdbc'. You can supply a Binding in the constructor, or specify a configurationName.
Parameter name: scheme
If the service is defined in the current solution, try building the solution and adding the service reference again."
This is the first time I've done this, so I could also be going in the completely wrong direction :)

Looks like this was just an access/location issue. The dll was not showing up because it was in the wrong folder.

Related

BizTalk: How to get all dlls from an application?

I would like to build an external app (console application) which inform me for the DLLs versions that are used in an BizTalk application.
Of course with a quick search I find some examples which are use the Microsoft.BizTalk.ExplorerOM DLL,
but these examples shows only the DLLs that exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table which when I see them in BizTalk health monitor they have type System.BizTalk:BizTalkAssembly.
I would like also to add in my app (Console application) the DLLs of type System.BizTalk:Assembly which for example can be a helper class which are not listed by Microsoft.BizTalk.ExplorerOM because, I guess, they not exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table
Have someone any idea how I can achieve what I want?
I found them, these assembles exists in managmentDB in table [BizTalk_Local_MgmtDb].[dbo].[adpl_sat]
So if I understand the question correctly:
You are creating a utility console application, which uses "Microsoft.BizTalk.ExplorerOM". And your "helper class Assembly" is not being listed in your "Console application" because it is not of type "System.BizTalk:BizTalkAssembly".
I'm afraid that you won't be able to do so, as you can't add a class library as "System.BizTalk:BizTalkAssembly". Here is the error we get when try to do so:
You can make try using "System.Reflection".
For your components to be considered as BizTalk Artefacts, your project should be .btproj
Then deploy your components same way you deploy your biztalk applications.

Is it possible to use regfree COM from registered COM?

I've been trying to implement following scenario:
Application [C++] uses CoCreateInstance on registered COM class (CReg/Reg.dll)
CReg class uses CoCreateInstance on regfree/SxS COM class (CFree/Free.dll).
CoCreateInstance returns REGDB_E_CLASSNOTREG.
Problem doesn't seem to be with manifests, because if I try to instantiate CFree directly via application, object is created with no problem.
I have checked and scenario above triggers Activation Context of CReg (I have checked with sxstrace) and even manifest of the CFree is loaded successfully (!) which should effect in correct regfree COM. If I change manifest of the CFree then Activation Contexts fails (which I believe is proof for me that it was correctly triggered and loaded before the change).
Is scenario with using registered COM [CReg] not possible to access CFree object? If it is possible, are there some special work in order to load it properly?
EDIT
With Joe's help, we worked out that the problem is where Free.dll is located.
Main application is (for example) in C:\Proj\App, both Reg.dll and Free.dll are in C:\Proj\Libs. Is there possibility to load regfree Free.dll which is in different location than application? Problem is that I can't place it in application directory or in application child directory (it has to be in external location).
I have tried to use ISOLATION_AWARE_ENABLED preprocessor definition on Reg.dll project, to trigger Activation context from Reg.dll directory. Manifest from Free.dll is loaded properly (sxstrace logs that) but CoCreateInstance call is still returning REGDB_E_CLASSNOTREG. This blog article points that it may be possible with this definition (but is not giving definite answer on this matter).
Anyone can help me solve this problem or at least point to the documentation that may give me an answer, whether it is possible or not, to load regfree dll from an external location?

How to Create proxy class from WSDL File in .net

I have to use WSDL file to create proxy class.
For this purpose, I have created one simple service and got the WSDL for the same, and saved into my disk by using Save as... in Internet Explorer. (I hope I'm doing right here).
With the above procedure, I got WSDL file.
If I use the following command:
D:\Ashok>wsdl CalculatorService.wsdl
I am getting some error like shown below:
Error: Unable to import binding 'BasicHttpBinding_ICalculatorService'
from names pace 'http://tempuri.org/'.
- Unable to import operation 'Add'.
- The element 'http://tempuri.org/:Add' is missing.
I have googled for the same and understood that I need to do some configuration settings, but I couldn't understand what exactly I need to do.
Can anybody please suggest me!
Add a Service Reference and point it at the WSDL
edit
As you cant use add Service Reference...
http://support.microsoft.com/kb/820122
end edit
If you look closely at the WSDL see how it has something like this inside it:
<s:import schemaLocation="http://..." />
This means that this WSDL is not a standalone file but it depends on some other files (this is how WCF decided to expose the WSDL). So either save all other files on disk (and change the schemaLocation to reflect their current location) which is hard since you need to do it many times. Or get a flat version of the wsdl. Or use "add service reference" in VS.

Apache-ODE ProcessManagement

I can access this API/WS through
http://localhost:8080/ode/processes/ProcessManagement?wsdl.
I would like to get the Process Info of a Process through this service and active it.
The serivce has the matching operations getProcessInfo and activate.
With listAllProcesses I get all Processes of a delpoyed package.
For getProcessInfo/activate I need the Process pid.
I get a <ns:pid>, using this gets me a load of Exceptions.
Using the name of the process and other stuff I receive earlier doesn't work either.
The pid is of type QName, perhaps thats the root of the problem.
However I don't now how to typecast here.
(Tried all with the eclipse Web Services Explorer and soapUI)
question: How does a proper request for both Operations look like?
When I try to consume the webservice with axi2 via eclipse, there is a undeclared variable local in the AnySimpleType class. I'm not keen on using the service this way.
But since I'm already writing a Client for the DeploymentService I thought about this approach.
question: How do I properly access the ProcessManagement?
EDIT: I have a simular problem with the DeploymentService and the undeploy Operation.
EDIT2: I figured the Problem with the DeploymentService undeploy out.
I had to get the Packagename as String. Then a made a javax.xml.namespace.QName out of it. Then I used the setPackageName of said undeploy operation.
Answer to question number 1:
soapUI with listAllProcesses returns
<ns:pid>{ode/bpel/unit-test}HelloWorld2-1</ns:pid>
getProcessInfo wants
<pmap:getProcessInfo>
<pid>?</pid>
</pmap:getProcessInfo>
Now I replaced <pid>?</pid> with
<pid xmlns:odetest="http://ode/bpel/unit-test">odetest:HelloWorld2-1</pid>
and it worked like a charm.
I remember that there was an issue with parameter ordering when using the Axis2 generated WSDL. Could you try if building a request against the original WSDL located at http://localhost:8080/ode/deployment/services/ProcessManagement works?
EDIT: Now that I got the question correctly, the problem is that ODE expects the QName to be serialized differently, i.e. in the XML way instead of the Java way. Thus, instead of <ns:pid>{ode/bpel/unit-test}HelloWorld2-1</ns:pid> the correct notation is <ns:pid xmlns:odetest="ode/bpel/unit-test">odetest:HelloWorld2-1</ns:pid>.

How do I write a working IThumbnailProvider for Windows Vista

I have written a thumbnail provider following the interfaces specified on MSDN. However, I have been unable to figure out how to register it in a way that Vista actually calls into it. Has anyone gotten a thumbnail provider working for Vista? Sample code or links would be especially helpful.
The documented way to register your IThumbnailProvider is to create a registry entry at HKCR\.ext\ShellEx\{E357FCCD-A995-4576-B01F-234630154E96} and set the (Default) string value to the GUID of your IThumbnailProvider.
Your assembly will need to be registered first. If using .NET, that means you will need to use the RegAsm.exe tool to register it.
There is sample code available here: http://www.benryves.com/?mode=filtered&single_post=3189294