BPEL undeclared variable - bpel

i get an error when compiling a BPEL process( i use Apache ODE and Eclipse BPEL Designer):
error:
[UnrecognizedVariableDeclaration] The declaration of the variable "Iterator" was not recognized.
this is how the Iterator is being defined
<bpel:variable name="Iterator" type="xsd:int"></bpel:variable>
and because the declaration was not recognized i get another error afterwards, when i reference the variable :
<bpel:assign name="copy_counter" validate="no">
<bpel:copy>
<bpel:from variable="Counter"></bpel:from>
<bpel:to variable="Iterator"></bpel:to>
</bpel:copy>
</bpel:assign>
What coulf be the problem here?. i have no idea, because i do not see a mistake.

I found the answer myself. I looked at the imports and definitions of namespaces in my BPEL process(they are in the beginning of the whole document) and the namespace xsd was not declared. So i added the namespace declaration and it worked.

Related

RazorEngine and Visual Studio 2015 IntelliSense

This post is not about ASP.NET MVC.
I am using RazorEngine for template processing available here:
https://antaris.github.io/RazorEngine/
The documentation states that I can have IntelliSense if I follow the instructions below:
https://antaris.github.io/RazorEngine/IntellisenseAndResharper.html
However, VS shows the following error:
The type or namespace name 'RazorEngine' could not be found (are you
missing a using directive or an assembly reference?)
Also the following errors:
The type or namespace name 'Linq' does not exist in the namespace
'System'
The type or namespace name 'Helpers' does not exist in the namespace
'System.Web'
The type or namespace name 'WebPages' does not exist in the namespace
'System.Web'
The type or namespace name 'WebPages' does not exist in the namespace
'System.Web'
The type or namespace name 'WebPages' does not exist in the namespace
'System.Web'
Am I getting the errors because I am editing the .cshtml in a command line project where the instruction assumes I use the web project? That doesn't make sense since RazorEngine does not have any project type requirement.
How can I address the issue? How can I edit .cshtml files in a command line project with IntelliSense without all of the above errors?
Found the answer
RTFM
According to the web page:
Your project output path is set to bin\ instead of bin\Debug\ and bin\Release.
another possible solution is to copy RazorEngine.dll and System.Web.Razor.dll to bin.
I am not deleting the post since it might help others.
Found the answer
RTFM
According to the web page:
Your project output path is set to bin\ instead of bin\Debug\ and bin\Release. another possible solution is to copy RazorEngine.dll and System.Web.Razor.dll to bin.

Including <msclr\marshal_cppstd.h>

For my current project, I needed to convert from String^ to std::string and vice-versa a lot. I read I could accomplish that by marshaling (from what I've read it's a process of conversion between native and managed data types because they are handled differently in the memory).
I read the instructions off of this topic. I put the code in a button event. Since I'm a beginner, I didn't really know which file do I need to include <msclr\marshal_cppstd.h> in. After reading pre-made descriptions in each of the files, I included the library in stdafx.h, which produced the following errors:
error C2065: 'marshal_as' : undeclared identifier
error C2275: 'std::string' : illegal use of this type as an expression
When including it in the main .cpp and stdafx.cpp files, one of the errors I get is:
error C2872: 'IServiceProvider' : ambiguous symbol
even though I included the file before any "using" directive, as advised here.
Thanks in advance.

The namespace "TypeProviders" is not defined (open Microsoft.FSharp.Data.TypeProviders)

I'm walking through Visual Studio's F# tutorial project. When I uncomment the "OData" module (which is very simple, similar to this MSDN walkthrough), the first line here
open Microsoft.FSharp.Data.TypeProviders
type Northwind = ODataService<"http://services.odata.org/Northwind/Northwind.svc/">
// ...
indicates this compiler error:
The namespace "TypeProviders" is not defined
The error remains after adding a reference to "FSharp.Data.TypeProviders" and "System.Data.Services.Client".
What am I doing wrong here?
Okay, you need to create new project, then add FSharp.Data.TypeProviers nuget to this project and the following code should work:
open Microsoft.FSharp.Data.TypeProviders
type Northwind = ODataService<"http://services.odata.org/Northwind/Northwind.svc/">

System.Security.Cryptography.X509Certificates.X509Certificate2Collection does not contain definition for 'Cast'

I'm trying to create a MapReduce job using HDInsight .NET SDK tutorial.
In creating the JobSubmissionCertificateCredential object, specifically the following line:
X509Certificate2 cert = store.Certificates.Cast<X509Certificate2>().First(item => item.FriendlyName == certfriendlyname);
I'm getting the following error: 'System.Security.Cryptography.X509Certificates.X509Certificate2Collection' does not contain a definition for 'Cast' and no extension method 'Cast' accepting a first argument of type 'System.Security.Cryptography.X509Certificates.X509Certificate2Collection' could be found (are you missing a using directive or an assembly reference?)
I have...
using System.Security.Cryptography.X509Certificates; at the top of my class.
ran Install-Package Microsoft.WindowsAzure.Management.HDInsight
Anyone know of any updates to this block of code that gets the Cast working? Thanks!
Cast<T> is part of the Enumerable type located in the System.Linq namespace. Add a reference to that namespace and you'll be good.

Link errorLNK2005 in VC++

I have a programme I which I want to implement button class. I have declared all my variable in button.h and defined all methods in button.cpp and I am calling these functions in WINMAIN the following error appears.
keylogger.obj : error LNK2005: "struct HBITMAP__ * hOldBmp" (?hOldBmp##3PAUHBITMAP__##A) already defined in Button.obj
The error is for multiple defination hOldBmp but It is only defined in button.h
"Only defined in button.h" is exactly your problem. Unless you declared it as extern there and put the definition into a C++ source file (not header file), every translation unit will get their own definition of the variable.
Seems like a common error: you include the implementation of this hOldBmp pointer from two .obj files, so from two cpp files. So both obj files contain code to implement this pointer. The linker cannot decide which implementation to use in the final binary.
Solution: leave only the declaration in the header file. You may declare it extern or make it a static member variable of the button class. Put the definition in the cpp file.

Resources