from suds.client import Client
import json
url = 'http://***.47.***.95/JDGSMesWebService/MesWebService.asmx?WSDL'
client = Client(format(url))
#print("the client is :",client)
sponse = client.service.GetBOSAImportData_Ex('GPONStation-SZ','NP1257G-test','FCD5D9DB4F86')
print("the bili is :",sponse)
ls = json.loads(sponse)
#bosadata=json.loads(ls['BosaData'])
print("1 bosa_sn:",ls['BosaData'][0]['bosa_sn'])
bosa_sn=ls['BosaData'][0]['bosa_sn']
print("2 bosa_type:",ls['BosaData'][0]['bosa_type'])
print("3 bosa_pn:",ls['BosaData'][0]['bosa_pn'])
print("4 bosa_vapd:",ls['BosaData'][0]['bosa_vapd'])
print("5 bosa_ith:",ls['BosaData'][0]['bosa_ith'])
print("6 bosa_imod:",ls['BosaData'][0]['bosa_imod'])
print("7 bosa_impd:",ls['BosaData'][0]['bosa_impd'])
print("8 bosa_refpwr:",ls['BosaData'][0]['bosa_refpwr'])
print("9 bosa_tiavcc:",ls['BosaData'][0]['bosa_tiavcc'])
print("10 bosa_apd_resp:",ls['BosaData'][0]['bosa_apd_resp'])
print("11 bosa_apd_comp:",ls['BosaData'][0]['bosa_apd_comp'])
print("12 bosa_apd_max_i:",ls['BosaData'][0]['bosa_apd_max_i'])
print("13 darkcurrent_vapd10:",ls['BosaData'][0]['darkcurrent_vapd10'])
print("14 darkcurrent_vop:",ls['BosaData'][0]['darkcurrent_vop'])
print("15 target_er_set:",ls['BosaData'][0]['target_er_set'])
#print("bosa_sn:",ls['BosaData'][0]['bosa_sn'])
#print("bosa_sn:",ls['BosaData'][0]['bosa_sn'])
cmd="serialization "+"--bosa_sn="+bosa_sn
print(cmd)