This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // import commons-fileupload-1.4.jar into your CPI resources | |
| import com.sap.gateway.ip.core.customdev.util.Message as CpiMsg | |
| import javax.activation.DataHandler | |
| import org.apache.commons.fileupload.MultipartStream | |
| import org.apache.commons.io.IOUtils | |
| import javax.mail.internet.* | |
| import java.util.zip.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -vm | |
| C:/int/sapjvm_8/bin | |
| ... | |
| -vmargs | |
| ... | |
| -Djavax.net.ssl.trustStore=NUL | |
| -Djavax.net.ssl.trustStoreType=Windows-ROOT | |
| ## -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStoreType for Fiddler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.ktor.client.* | |
| import io.ktor.client.engine.cio.* | |
| import io.ktor.client.features.* | |
| import io.ktor.client.features.cookies.* | |
| import io.ktor.client.request.* | |
| import io.ktor.client.statement.* | |
| val uri = "https://e000001-tmn.hci.ru1.hana.ondemand.com/api/v1" | |
| suspend fun main(args: Array<String>): Unit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # апгрейд версии враппера: | |
| gradle wrapper --gradle-version 7.0 --distribution-type all | |
| # зависимости для котлина | |
| # https://kotlinlang.org/docs/gradle.html#kotlin-and-java-sources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import groovy.util.slurpersupport.GPathResult | |
| import java.nio.file.Paths | |
| class May28 { | |
| static void main(String[] args) { | |
| String path = "C:\\workspace\\samples\\cpilearn20210508\\001_20210426_error.xml" | |
| Reader rd = Paths.get(path).newReader("UTF-8") | |
| println(rd) | |
| XmlSlurper xp = new XmlSlurper(false, true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import groovy.util.slurpersupport.GPathResult | |
| import org.junit.Test | |
| class CpiLearning2 { | |
| String xml = """<Файл ИдФайл="NO_PRIB_0007_0007_" ВерсПрог="КОНТУР-ЭКСТЕРН, ВЕРСИЯ 14.0" ВерсФорм="5.07" id = "1" parentid = ""> | |
| <Документ КНД="1151006" ДатаДок="31.05.2019" Период="36" ОтчетГод="2019" КодНО="0007" НомКорр="0" ПоМесту="213" id="2" parentid="1"> | |
| <СвНП ОКВЭД="06.10.01" Тлф="+7900-000000000" id="3" parentid="2"> | |
| <азаза атр="знач"/> | |
| </СвНП> | |
| </Документ> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <root> | |
| <folder id='A'> | |
| <item>a1</item> | |
| <item>a2</item> | |
| <item>a3</item> | |
| <item>a4</item> | |
| <item>a5</item> | |
| </folder> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ns0:PurchaseOrder xmlns:ns0="http://demo.sap.com/eip/content-filter" PurchaseOrderNumber="99401" OrderDate="2019-05-06"> | |
| <Address Type="Shipping"> | |
| <Name>Ellen Adams</Name> | |
| <Street>123 Maple Street</Street> | |
| <City>Mill Valley</City> | |
| <State>CA</State> | |
| <Zip>10999</Zip> | |
| <Country>USA</Country> | |
| </Address> | |
| <Address Type="Billing"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| void aa() { | |
| String x = """<Candidate> | |
| \t<Candidate> | |
| \t\t<candidateId>33734</candidateId> | |
| \t\t<privateRank>0</privateRank> | |
| \t\t<user> | |
| \t\t\t<User> | |
| \t\t\t\t<privateRank>0</privateRank> | |
| \t\t\t</User> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.sap.gateway.ip.core.customdev.util.Message as CpiMsg | |
| //import org.apache.felix.framework.BundleImpl | |
| CpiMsg osgi1(CpiMsg msg) { | |
| String s = msg.getBody(String) ?: "import com.sap.it.api.ITApiFactory" | |
| StringBuilder log = new StringBuilder() | |
| s.eachLine {String q -> | |
| String fqcn = q.startsWith("import ") ? q.substring("import".length()).trim() : q.trim() | |
| log << fqcn << "\n" |