Hello,
I would like to hash an xml body with this method md5(), I have no problem with the web "Groovy IDE" ( Groovy IDE ), I got my specific hash "8350e5a3e24c153df2275c9f80692773", but when I put the groovy script into SAP CPI I always have this error below:
java.lang.NoSuchMethodException: No signature of method: java.lang.String.md5() is applicable for argument types: () values: [] Possible solutions: any(), use([Ljava.lang.Object;), is(java.lang.Object), any(groovy.lang.Closure), use(java.lang.Class, groovy.lang.Closure), tr(java.lang.CharSequence, java.lang.CharSequence)
I don't understand this difference between the two environnment, normally there is no difference of type or environnement.
You can find here my xml payload:
<Material xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge"> <sys_reference>7HL022206S</sys_reference> <publiccode>7HL022206S</publiccode> <version/> <title_fr>HA 85RC REGUL ELECTROMECAN+RCC20+COMP</title_fr> <title_en>HA 85RC REGUL ELECTROMECAN+RCC20+COMPttttt</title_en> <title2_fr/> <title2_en/> <description_fr/> <description_en/> <orderable>false</orderable> <isactive>true</isactive> <origin>SmartPart</origin> <type>PRODUCT</type> <thumbnail/> <brand/> </Material>
You can find below my script :
import com.sap.gateway.ip.core.customdev.util.Message;import java.util.HashMap;import groovy.xml.XmlUtil;import groovy.util.*;import java.util.List;import groovy.lang.Closure;import java.lang.Class;import java.lang.Object;import java.lang.String;Thank you very much for your help
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Morten
Thank you very much for your answer.
Finally I found the step "Message digest" directly from CPI, until this step it is working well for the moment. I get a correct payload hashed with md5() method.
Now I would like to uncrypt the md5 message stored into the data store, do you think it will be possible ?
Thank for your help
Hi pascal37trs
You do have a couple of built-in encryption options. And some in Java/Groovy as well. But please post this as a new question.
Regards,
Morten
Hi pascal37trs
Since your question about the specific error you had was answered correctly, I'd appreciate it if you would go ahead and accept the answer.
Regards,
Morten
Yes sure thanks for your help
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.