I've created a SOAP client and there are logs of the SOAP call I dont want to see as they are irrelevant.
I only want to log the XML SOAP Request call like:
2019-11-28 15:23:26 DEBUG Call:2762 - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><RetrieveHeroWeapon xmlns="http://tempuri.org/"><dataEntry><CurrentUser>Sephiroth</CurrentUser><HeroID>123465798</HeroID></dataEntry></RetrieveHeroWeapon></soapenv:Body></soapenv:Envelope>
And the HTTP Status:
2019-11-28 15:29:25 DEBUG DefaultSocketFactory:122 - Created an insecure HTTP connection
2019-11-28 15:29:25 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(xmlSent00)
2019-11-28 15:29:25 DEBUG HTTPSender:484 - XML sent:
2019-11-28 15:29:25 DEBUG HTTPSender:485 - ---------------------------------------------------
2019-11-28 15:29:25 DEBUG SOAPPart:524 - Enter: SOAPPart::saveChanges
2019-11-28 15:29:25 DEBUG HTTPSender:519 - POST /heroService/MobileLegendsService.svc HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: mobilelegends.com:9000
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://tempuri.org/MobileLegendsService/RetrieveHeroWeapon"
Content-Length: 462
Other info, I dont want to print like:
019-11-28 15:23:25 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
2019-11-28 15:23:25 DEBUG DeserializationContext:796 - Pushing handler org.apache.axis.message.SOAPHandler@3f3415b1
2019-11-28 15:23:25 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(newElem00)
2019-11-28 15:23:25 DEBUG MessageElement:239 - New MessageElement (org.apache.axis.message.MessageElement@747c37e1) named {}CoreService
2019-11-28 15:23:25 DEBUG DeserializationContext:765 - Pushing element CoreService
2019-11-28 15:23:25 DEBUG DeserializationContext:1067 - Exit: DeserializationContext::startElement()
2019-11-28 15:23:25 DEBUG DeserializationContext:1078 - Enter: DeserializationContext::endElement(http://tempuri.org/, CoreService)
2019-11-28 15:23:25 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(popHandler00)
2019-11-28 15:23:25 DEBUG DeserializationContext:829 - Popping handler org.apache.axis.message.SOAPHandler@3f3415b1
2019-11-28 15:23:25 DEBUG DeserializationContext:1106 - Popped element stack to org.apache.axis.message.MessageElement:MobileLegendsService
2019-11-28 15:23:25 DEBUG DeserializationContext:1107 - Exit: DeserializationContext::endElement()
2019-11-28 15:23:25 DEBUG DeserializationContext:1003 - Enter: DeserializationContext::startElement(http://tempuri.org/, EnableDelete)
log4j.properties
log4j.rootLogger=DEBUG, stdout, file
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.MaxFileSize=12MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n