Error Adding a Switch Mediator inside a Proxy Service in WSO2 Developer Studio - xpath

I'm trying to do a simple Proxy Service using the Developer Studio tool from the open-source SOA middleware provider WSO2.
When I drag into the flow a Switch Mediator in the graphical view there is no problem but when I changed to the text view, I'm facing the following error:
Cannot update source view. The following error(s) have been detected
Reason: XPathFactoty#newInstance() failed to create an XPathFactoty for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactotyConfigurationException: javax.xml.xpath.XPathFactotyConfigurationException: java.util.ServiceConfigurationError javax.xml.xpath.XPathFactoty: bundleresource://1013.fwk317983781:21/META-INF/services/javax.xml.xpath.XPathFa ctory:2: Illegal configuration-file syntax
And the XML is empty, so I can't to add any Switch Mediator and get it working with the WSO2 DS.
This is happening with the 3.5.0 and 3.6.0 version of the tool, and I even try one of the sample in the website but with the same result.
Anyone have any reason why this error is happening?
Thank you!

Each switch element needs to have an attribute called 'source'. This is the Xpath attribute that is checked against the criteria in each case. To add the 'source' attribute, type the Xpath and then click 'update' or 'save'. With that required attribute, a valid xml configuration file may be created and viewed as text.
Here is more documentation on the switch mediator: https://docs.wso2.org/display/ESB481/Switch+Mediator

Related

Upgrading Microsoft.Bot.Builder.LanguageGeneration to 4.15.0 results in fromFile() error

Upgrading Microsoft.Bot.Builder.LanguageGeneration from 4.14.1 to 4.15.0 results in new errors about the fromFile() method. Couldn't find any solution or similar issues on the internet yet. This holds us from upgrading so any feedback is welcome.
/UnitTests/bin/Debug/net5.0/Resources/Lg/General.lg line 25:2 - line 25:39: Error occurred when parsing expression 'fromFile('../Cards/HelpCard.json')'. fromFile does not have an evaluator, it's not a built-in function or a custom function.
This release introduces a global flag called
"Templates.EnableFromFile" that indicates whether the Adaptive
Expression fromFile function is allowed in LG templates. If an
application had previously made use of this function, it is now
required to add the line "Templates.EnableFromFile = true;" to the
Startup.cs code.
from botbuilder-dotnet/releases
Adding it in Startup.cs (or Program.cs) didn't help. I had to put it in the constructor of the service where I used the Templates class.
For someone who needs sample on how to add it.
Add it like this in startup.cs-> ConfigureServices method.
Also on lg file - you dont have to create manually lg file - it will be generated in backend.
You just have to add your content in bot responses which is the content it will be generated in lg file in backend - you can open the same solution in visual studio and see it.

Visual Studio 2019 - Connected Service Reference - OpenAPI is generating duplicate types

I am trying to generate an OpenApi service reference in Visual Studio 2019. .Net 5.0.
Right clicking project >Add>Connected Services>+ Service References
I am using NetDocs api "https://api.vault.netvoyage.com/v2/swagger/docs/v2".
Result: I get generated c# client code but it is duplicating the types with the errors below.
Severity Code Description Project File Line Suppression State
Error CS0102 The type 'v2Client' already contains a definition for '_settings' OpenAPITest C:\Users\dryfus\source\repos\OpenAPITest\obj\v2Client.cs 4941 Active
Error CS0579 Duplicate 'System.CodeDom.Compiler.GeneratedCode' attribute OpenAPITest C:\Users\dryfus\source\repos\OpenAPITest\obj\v2Client.cs 4936 Active
Error CS0102 The type 'v2Client' already contains a definition for '_baseUrl' OpenAPITest C:\Users\dryfus\source\repos\OpenAPITest\obj\v2Client.cs 4939 Active
Error CS0102 The type 'v2Client' already contains a definition for '_httpClient' OpenAPITest C:\Users\dryfus\source\repos\OpenAPITest\obj\v2Client.cs 4940 Active
Is there a way I can get this to work with the connector way without the duplicates? Or even cli? Any suggestions on why it is creating the duplicates?
I had the same issue, it turns out the code generation didn't like enpoints with an underscore in its operationId. Lucky for me, the service I was consuming was also part of our code, so I could just go to the Swagger configuration in the API side and change the CustomOperationIds setting.
I downloaded and use NSwagStudio to generate the client code and did not have the same issue that the Visual Studio connector had when generating the code.
https://github.com/RicoSuter/NSwag/wiki/NSwagStudio
It is actually caused by this option
OperationGenerationMode:MultipleClientsFromOperationId
MultipleClientsFromOperationId : Multiple clients from the Swagger operation ID in the form '{controller}_{action}'
However, if your classname is set as a static name, it will cause an error like you have.
The correct solution should be change the classname to something like
ClassName="{controller}ServiceClient"
So it will generate different classes.

You can not complete this action for this component because of the configuration of its managed properties

I am trying to make a field optional in the Dynamics CRM
The name of the entity is Case and the internal name of the field is customerid
When I try to change it from mandatory to optional, I get the below error message
You can not complete this action for this component because of the
configuration of its managed properties.
this is happening in Dynamics CRM online
I'm pretty sure you won't be able to.
It's one of the few fields where mandatory behaviour is enforced at the platform level, whilst most mandatory fields are enforced only on the user interface.
If I remember correctly, tring to create a case without a customer via the API will result in an exception.
Looking at the managed properties for the customerid field on my recently provisioned CRM Online, shows that I'm unable to change the requirement level - I don't even get the option for setting it as optional.
I wanted to remove the field from the form, but I was not able to do it from the UI
So I used XRMToolBox.
There is a plugin called as FormXML Manager, enable it in the XRMToolBox and load the entities. Once this is done you can remove the required field and publish the form

Oracle endeca property not displaying in jsp ref app

I am trying to implement partial update in Oracle Endeca. I have a property named "depth" in developer studio. The full update works fine but in partial update I get the error that "Unable to parse value 15.1 for property depth". Why does this happen. Please ask for any information you might need.
Can you please check property type of depth. Also check mapping for partial update pipeline.
The property were not showing as MDEX engine had different datatype from the updates. To fix this I used a perl manipulator to format the properties .

Magento API not working with wsdl.exe but works with Soap UI

I'm trying to integrate Magento 1.7 with a C# application.
When I tried to use the "Add Service Reference" function in Visual Studio, it finds the service and all the operations but when I click OK, it doesn't generate anything. i.e. the Reference.cs file is almost empty (only has one line with namespace).
I tried using wsdl.exe to generate the proxy in command prompt and I got the following error:
R2718: A wsdl:binding in a DESCRIPTION MUST have the same set of wsdl:operations as the wsdl:portType to which it refers.
- Operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' has no matching binding.
For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
Error: Unable to import binding 'Mage_Api_Model_Server_Wsi_HandlerBinding' from namespace 'urn:Magento'.
- The operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' had the following syntax
error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section.
I then tried using Soap UI to load the same wsdl and it works fine. The proxy was generated and I can make calls without any problems.
The original wsdl file is here: https://gist.github.com/4514723
except I have replaced line 6297 with an example url.
So my questsion is why was Soap UI able to generate the proxies and making calls without any problems but Visual Studio can't? How can I fix it?
See Generate a Web Service Client in WS-I compliance mode .
You will need to modify your Magento code to correct the WS-I compliant WSDL definition in app\code\core\Mage\Catalog\etc\wsi.xml.
The SOAP UI is probably more tolerant of mistakes in WSDLs compared to other .NET/Java tooling.

Resources