I created a consumer service which will call a service developed in .Net. As part of the process I need to canonilize my XML request. I was hoping I could create a Java service which will do this, but I am not seeing the library. Has anyone already done this, can I use maven at all to import the proper library, or do you know where to best capture the binary jar files.
~\IntegrationServer\instances\default\packages\FibCoaServices\code\source\sbaloan100k\work.java:10: error: package com.sun.org.apache.xml.internal.security.c14n does not exist
import com.sun.org.apache.xml.internal.security.c14n.*;
~\IntegrationServer\instances\default\packages\FibCoaServices\code\source\sbaloan100k\work.java:43: error: cannot find symbol
Canonicalizer canon = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);
The classes you want to use must be in the Integration server classpath , there are multiple ways to do this, please take a look at Adding Classes to the Server Classpath (softwareag.com) for the exact steps and options.
Thank you for the response. I understand how to add it to the classpath, but what I am asking is has anyone already implemented a Java Service which incorporates Canonicalizer? What libraries are available in webMethods? Also, is this achievable in the flow services using the pub services? So far I have not seen anything and am left to assume I need to write this externally and create a jar file myself.
I understand ,I do not see a direct way of doing this using built-in services, but I would suggest you to refer the built in services for the pub.xml folder , to see if you could use those a combination of those services , would wait for more accurate answers from someone who has done this.
-NP
What I did to resolve the problem was create my own function in java to canonicalize, converted it to a jar file, and installed it on the integration server and added it to the build path in Designer. A little disappointed I couldn’t get it to work in Java Service.
Figured out the issue with using Canonicalize() in my Java Service. I had to drop back to xmlsec-2.0.jar. Not sure why there was a parm conflict but this resolved the issue.