Subscribe

How to prevent printing of xml dtd structure on console using nmsdk 5.1 ,ontap API 8.1 and Java??

I am using ontap API 8.1 and Java.

 

I am using following code for connection-

 

Protocol protocol = Protocol.INSECURE_HTTPS;
ApiRunner apirunner = new ApiRunner(ApiTarget.builder().withHost(host).withUserName(user)
.withPassword(pass).withTargetType(TargetType.FILER).useProtocol(protocol).build());

 

when I request an api using following code - 

 

VolumeListInfoRequest volReq = new VolumeListInfoRequest();
VolumeListInfoResponse volResp = apirunner.run(volReq);

all contents of volResp is printed on console. I do not have any print statement in my code. I dont want to print anything on console.

 

Follwoing is a sample of output - 

 

13:00:09.239 [ForkJoinPool-1-worker-43] DEBUG c.n.n.common.logging.MessageBundle - Loading resource bundle from com/netapp/nmsdk/nmsdk-runtime-messages for com.netapp.nmsdk.MsgKey
13:00:09.274 [ForkJoinPool-1-worker-43] DEBUG c.n.nmsdk.client.XmlApiInvocation - Executing API request volume-list-info to 192.168.20.xx:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE netapp SYSTEM 'file:/etc/netapp_filer.dtd'><netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"><volume-list-info></volume-list-info></netapp>
13:00:09.416 [ForkJoinPool-1-worker-29] DEBUG c.n.nmsdk.client.XmlApiInvocation - Executing API request volume-list-info to 192.168.20.xx
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE netapp SYSTEM 'file:/etc/netapp_filer.dtd'><netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"><volume-list-info></volume-list-info></netapp>
13:00:10.455 [ForkJoinPool-1-worker-29] DEBUG c.n.nmsdk.client.XmlApiInvocation - Received API response for volume-list-info from 192.168.20.xx:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM '/na_admin/netapp_filer.dtd'>
<netapp version='1.1' xmlns='http://www.netapp.com/filer/admin'>

<!DOCTYPE netapp SYSTEM '/na_admin/netapp_filer.dtd'>
<netapp version='1.1' xmlns='http://www.netapp.com/filer/admin'>
<results status="passed"><volumes><volume-info><name>lun_09122014_053033_vol</name><uuid>64ebd77a-9baa-4e54-b504-40362e909815</uuid><type>flex</type><block-type>64_bit</block-type><state>online</state><filesystem-size>25459851264</filesystem-size><size-total>25459851264</size-total><size-used>21562904576</size-used></volumes></results></netapp>
13:00:10.562 [ForkJoinPool-1-worker-29] DEBUG com.netapp.nmsdk.marshal.ApiReader - Unexpected element filesystem-size for element volume-info
13:00:10.566 [ForkJoinPool-1-worker-29] DEBUG com.netapp.nmsdk.marshal.ApiReader - Unexpected element compression-info for element volume-info
13:00:10.566 [ForkJoinPool-1-worker-29] DEBUG com.netapp.nmsdk.marshal.ApiReader - Unexpected element instance-uuid for element volume-info
13:00:10.567 [ForkJoinPool-1-worker-29] DEBUG com.netapp.nmsdk.marshal.ApiReader - Unexpected element provenance-uuid for element volume-info

 

 

Can anybody help me to prevent print statements on console using java and ontap api 8.1????