I want to pass xml as an input to the rule project. I want to call the ILOG rules using webservices. xml type object is not available in ILOG parameter types. Can any one suggest how I can pass xml as an input to ILOG rules and manipulate the xml data inside the rules with an example. An I would like to call this rule using a webservice.
Please help.
how would u like to invoke your code? via web service or an J2SE session?
if u r trying to hit your RES, then u must send SOAP request using the WSDL file, which u can retreive from the RES admin console. u can use software like SOAPUI to send soap request using the wsdl file.
if u want to run your rules in a Java session without ANY involvment of the RES u have to create a J2SE stateless/statful session and create a IrlXMLObject
Related
I am new to nestJs, Before I would learn nestJs, I have learnt fastify. In fastify, If I want to filter the response data I would define JSON Schema. it will filter out my server response data. But in nestJs I don't know how to do that. Even If I have define the JSON schema. Then the filtered data only shown in swagger. and it doesn't work to filter data unlike fastify. It will be cause for more security issue.
For Ex: There is an API,Which is used to create user, When that API is called, an user will be created. And the server will send the user data to that API response. In my case the server will send all data about created user including password. If I want to remove the password from response. I need to manualy frame the object. But in fastify, which is automaticaly handles the response depends on JSON schema. here my question is, this is possible in nest js
Friend, If you please let me know.
Sounds like you're looking for Serializtion of the response. You'd create a response model of your API, similar to a schema but class based with the appropraite class-transformer decorators, and return an instance of that class from your API, letting the ClassSerializerInterceptor handle serializing the response for you
I want to add some context paramters to my odata service.
The parameters i want to include in the url as param (after the service name) so that the url can be used in excel
How would one be able to receive and parse any addition param supplied in the url before the odata service does it's thing?
(i'm using Olingo)
You can use custom query options. See 5. Custom Query Options here: http://www.odata.org/documentation/odata-version-2-0/uri-conventions/
In Olingo, the GetEntityUriInfo, PostEntityUriInfo etc interfaces define a getCustomQueryOptions method: https://olingo.apache.org/javadoc/odata2/org/apache/olingo/odata2/api/uri/info/GetEntityUriInfo.html#getCustomQueryOptions--
You can refer the scn blog about adding a custom annotation to metadata
Refer the link
https://blogs.sap.com/2016/10/02/adding-custom-annotation-and-labels-to-metadata/
I have been using Web IDE trial version to try out one application.
The application needs to pass data to Gateway method Create Deep Entity.
While using oModel.create() getting an error which says method not implemented (i.e. Plain create method is called with oModel.create(), which is not implemented on SAP Gateway. but what I need to call is create_deep_entity method )
Just need to know is there any syntax that will tell Web IDE that Deep Create is to be called.
there is not a create_deep entity method as such in SAPUI5. If your deep insert is correctly implemented on SAP Gateway, you just need to use a standard create or post mehod on sapui5 with the difference that the data you are sending will not have a flat structure. See the example of #serban Petrscu.
oModel.create({field1: '', field2: 0, childEntity: {field3: 'ABC'}})
Have all a structure for creating complex queries and obtaining data on the client side using Breeze and webapi IQueryable<T>.
I would use this structure on the client side to call another webapi controller, intercept the result of the query, and use this to make an Excel file returned by HttpResponseMessage.
See: Returning binary file from controller in ASP.NET Web API
How can I use the executeQuery without getting return data in standard Breeze JSON and without interfering with the data on the client side cache to have the 'octet-stream'.
The goal is to create an 'Export to Excel' without existing frontend paging for a large volume of data.
If you don't want to track changes, call EntityQuery.noTracking() before calling executeQuery(). This will return raw javascript objects without breeze tracking capabilities.
You can't make executeQuery() return binary 'octet-stream' data. But you can use breeze ajax implementation:
var ajaxImpl = breeze.config.getAdapterInstance("ajax");
ajaxImpl.ajax() // by default it is a wrapper to jQuery.ajax
Look http://www.breezejs.com/documentation/customizing-ajax
Create a custom "data service adapter" and specify it when you create an EntityManager for this special purpose. It can be quite simple because you disable the most difficult parts to implement, the metadata and saveChanges methods.
You don't want to cache the results. Therefore, you make sure the manager's metadata store is empty and you should add the " no caching" QueryOption. [exact names escape me as I write this on my phone].
Make sure these steps are really adding tangible value
Specialized server operations often can be performed more simply with native AJAX components.
p.s. I just saw #didar 's answer which is consistent with mine. Blend these thoughts into your solution.
I have been trying to find some step by step guidance on how to take a user's inputs (e.g.) name address, etc) via the view, to write that to xml, and then to submit that set of data to a third party interface (e.g UK Companies house xml gateway)
I have some aspects in hand (i.e. GET side of view to collect the data), but can't seem to get my head around using the controller and POST to submit the actual thing!
If anyone can steer me to a "For dumboids" tutorial, I'd highly appreciate it
Thanks
Paul
Side stepping the issue of whether you should be posting from your controller, you can use code like the following to post xml to a url. In the example below "xml" is your xml string and "url" is the url you want to post to. (Note: WebClient is built-into the .NET framework)
// create a client object
using(System.Net.WebClient client = new System.Net.WebClient()) {
// performs an HTTP POST
client.UploadString(url, xml);
}
I would question whether the controller should be posting directly to the XML gateway - this sounds like the job of a domain/business object sitting behind the controller, ideally referenced by an interface.
This was you can test your controller without requiring it to hit the XML gateway, and simulate the success/failure conditions.
If you can get the data already, I'd consider:
IGatewayPoster poster = ...
poster.Submit(dataSentFromView);
In the GatewayPoster class do the actual work of communicating with the XML gateway.