Missing fields in the transformed JSON output - mule

I am performing XML to JSON transformations using Transform Message connector. I have created a mule-plugin for the transformations code and added it as a dependency to my application. When I deploy the application in anypoint studio(4.3.0) it is working as expected i.e. I am getting the full payload transformed to JSON. But, when I deploy the same application to ONPREM some fields of input(XML) are missing in the output(JSON). In case of the ONPREM application I am sending the message(XML-payload) via JMS(1.7.1)-Publish by publishing it to a JMS queue where my application is listening using JMS-On New Message and using the transformations mule-plugin(added as a dependency) to transform the XML to JSON and publishing via JMS-publish to a queue where another API is listening.
I observed that when I am dividing parts of dwl in modules and importing them in a main dwl and deploying at ONPREM the fields are missing. But, when I am using all the module's dwl code in same dwl file I am getting all the fields.
Please Help me with this.

Issue Resolved. There was a difference between Studio Runtime and ONPREM Runtime. When I patched the ONPREM with latest update. The Issue got Resolved.

Related

Change the log format layout for Cordapp

It looks like cordapp outputs console log in log4j format layout. I need to have it in logstash json layout. I have already implemented a library that outputs in logstash json layout and this library works well with spring boot or regular application. However when used it with Cordapp, the cordapp log4j layout always overrides.
Details on how I am trying to implement this:
I have extended log4j..ConfigurationFactory to create a CustomConfigurationFactory. The main purpose of the CustomConfigurationFactory is to implement Logstash layout and custom rolling of the the log file. There is few more meta data that is included with every log statement. It uses the org.slf4j.Logger in the the background along with the custom configuration to log statements in the custom format and implement our custom rolling. This is created as an independent library so it can be used across all our application.
I am using this custom logging library for logging purpose. It works for the accompanying Spring boot application that interacts with the Corda nodes however the logging on the Corda node itself is in the default log4j format.
Any suggestions?
Corda uses log4j for logging, you could provide your custom format in the log4j configuration files. You could find more details on logging here in Corda documentation: https://docs.corda.net/docs/corda-os/4.6/node-administration.html#logging

Issues with Scatter Gather in Mule 4.2.2

Is there any known issue with scatter gather scope in Mule Runtime 4.2.2(On-prem). I could see few of my request is not moving after the scatter gather component with no error or exceptions. I do invoking the soap service , rest service and file consuming under the scatter gather component. Its not happening for all the request but for few request. It is causing timeout for that request.I do have before and after logger . Its does not showing any before activities as well. On the same time, another request process it successfully.
I am just using basic config of scatter-gather component.
There are at least 6 fixed issues with scatter-gather mentioned in the Mule 4.3.0 release notes. This means that the issues were reported against previous versions. You can check those issues by searching the id number (MULE-NNNNN) in Mule JIRA: https://www.mulesoft.org/jira to see if any has affected version 4.2.2.
You have also to consider the possibility that the issue is related to something else, like threading.
It would be a good idea to test with Mule 4.3.0 to see if you notice any improvements.

Unable to consume WSDL in Mule 4

I am using anypoint studio 7.3.1 with Mule 4.1.x. trying to load the WSDL using Web Service Consumer.
First I placed my WSDL file under src/main/resources of my project.
In Web Service Consumer, under connector configuration I selected my WSDL and at this point the mulesoft should automatically populate “Service”, “Port” and “Address”.
However that is not happening. I read somewhere that WSDL file needs to be exported to mule-artifact.json which I did, but still doesn’t work.
To make sure my WSDL is good, I was able to load the same WSDL in soapUI and was able to access the web service.
What is it that I need to do to get this working? Is there any error log that tells what’s going on? By the way, the endpoint is http so I know there is no cert issue.
the problem was due to the xsd that was referred in the WSDL. Removed that and it worked

error when ingesting with Watson Discovery Service

Trying to ingest a 7MB json file with Watson Discovery Service. When using WDS tooling interface to ingest, the interface indicates successful ingestion, but the document then looks to have failed. The error returned when using the API was: Your request could not be processed because of a problem on the server". The error is not really helping troubleshoot the problem. Any ideas? How do we troubleshoot these problems?
Thank you
The interface indicates successful ingestion because the process is asynchronous. Actually it means that the document was loaded and submitted for ingestion.
Check if your input json file has a top-level array. Currently this type of json files are not supported so it might be the cause of your issue.

Publish Biztalk WCF Service with multiple schema files and <includes>

What I have here is this:
A Biztalk project in Visual Studio 2010, a corresponding Biztalk application running on a Biztalk 2010 server. The receive port accepts an HL7-V3 schema, transforms it to a schema that is sent off to a SQL server 2008 instance and inserted into tables via a stored procedure. When the receive port is using the FILE adapter, all works as intended (data from the HL7 file is inserted into tables).
So, we reached the point where a web service was needed in order to expose the Receive port via the web...great we have the "Biztalk WCF Service Publishing Wizard" built right into VS2010. This is where I'm stopped in my tracks.
I can follow the wizard as far as the "Create" step, it makes it about half-way to the Extracting Schemas from Biztalk Assembly then it barfs and throws a generic error:
"The given key was not present in the dictionary"
After much searching and head scratching, I was finally led to fact that the wizard uses Xsd.exe (new to me) to generate code from the schemas. This led me to the MSDN library article Here which states that included schemas are ignored by Xsd.exe. Well, the HL7V3 schema-set for the message we are using has about 30 files altogether - all referencing each other all over the place like so:
<xs:include schemaLocation="../coreschemas/infrastructureRoot.xsd"/>
<xs:include schemaLocation="COCT_MT050002UV07.xsd"/>
<xs:include schemaLocation="COCT_MT090100UV01.xsd"/>
<xs:include schemaLocation="COCT_MT240000UV01.xsd"/>
<xs:include schemaLocation="COCT_MT150000UV02.xsd"/>
So there's my problem.
So now my question is this: Is there a way to manually create a WCF service from a Biztalk project, or better yet, just get the Wizard to work for this case? Or, just any suggestions on where to look, as this is my first Biztalk project.
My Googling has only come up with a plethora of how-to's for the Wizard.
Well, the problem has been solved, despite running down way too many rabbit holes, I stumbled upon an MSDN called Getting Started with HL7 v3 and Biztalk Server 2006 article with a little section called Schema Modifications. One of the modifications is to add Target Namespace to some of the coreschema files in HL7 v3.
I had seen this doc in the past and it mentions that this fixes the issue of them being not supported when compiling schemas in BizTalk Server. I kind of ignored it because I was getting no errors and besides, I was using 2010, not 2006 so I naively thought "that must be fixed now...no errors"
Not so, I did exactly as the document suggested and immediately deployed and ran the Biztalk WCF Service Publishing Wizard and it all worked and I was able to view the help and .wsdl pages that were generated.
I hope this helps someone in the future. Very anti-climactic for me.