Unable to simulate CURL POST with file attachment in Integration Server

I am trying to consume a web service from a third party using a java service.
The 3rd party have an API for using CURL to POST a CSV file with content.

If I test the call in POSTMAN, it runs perfectly.

I have tried to do this in Flow code using MIME Envelope and haven’t been able to successfully submit the payload. I get a response back from the 3rd Party saying the “file” payload was empty.

Another avenue we have explored is writing this all within a JAVA service.

I run the service through a standard java IDE and being Java 7 (with SNI support), I see there is an issue with certain web server configurations where “certain mis-configured servers send an ‘Unrecognized Name’ warning in the SSL handshake which is ignored by most clients… except for Java

see http://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0/14884941#14884941

To overcome this issue, you can disable SNI for a particular single class using the
java -Djsse.enableSNIExtension=false setting.

I have tried adding this directive to the setenv.bat webMethods config file under the JAVA_CUSTOM_OPTS setting but I can’t seem to get it to disable SNI.

Does anyone have any ideas on how to disable SNI for a particular java service?
Or how to specify the parameter? Is it zzPackageName.serviceName ?

Last resort is to use the Execute Command option in wM but I wish to avoid this for many reasons.

This is on webMethods 9.0.1 on 64 bit Windows Server 2012R2

Just an update - we got the solution working using standard Flow code, so the problem is no longer an urgent one.

Would still be interested in understanding how that JAVA_CUSTOM_OPS setting should be set:

java -Djsse.enableSNIExtension=false

How does one reference the class of a custom java service?




Are you running the IS as a Windows service? If so, what version of IS?

When changing the setenv.bat file and running the IS as a Windows service, you typically have to run a utility to either update the Windows registry or update the Tanuki wrapper configuration (depending on what version of IS you’re running).

For example, you typically have to run: server.bat -service



If running in windows AND depending on the version you are using (9.0.1 you said) you may have to change the setting on different files.

Check the documentation of your version about the location of the java configurations.

And, for the new settings to take effect, you have to completely shutdown the Integration Server and start it again. Just a restart will not be enough.

You can (and should) create a small java service to retrieve the Java property you just set to verify it has the correct value.

Best Regards,

Is this original request here related to the issue with setup IS as Windows Service? Am I missing anything here? :frowning:



No, it is related to the setting of JVM flags on a IS.

However, in Windows, settings are a lot more difficult to change because there are so many possible configurations.

My previous advice still stands, no matter the OS: you should completely shutdown the IS, the simple restart will not pick the new flags (or new jar files).

Best Regards,

Hi Percio & Gerardo,

Thanks for your responses. It is a windows service, and I did forget that I need to de-register and re-register the windows service after such changes. I’ll give it a try after the Easter break.

Thanks again for your help.


OK…Please update this thread back with your test results :smiley: