2017-07-18 2 views
2

J'essaye d'utiliser l'API NBR pour télécharger l'enregistrement du serveur WebEx. Lorsque j'exécute une requête SOAP downloadNBRStorageFile (avec un facteur), il répond avec l'enregistrement webex dans un flux.PHP SOAP lire la réponse binaire de Cisco NBR downloadNBRStorageFile API et créer un fichier .ARF

En réponse

Quand je vérifie la réponse de l'API dans postman il ressemble à ceci:

------=_Part_633_1893304738.1500351436145 
Content-Type: text/xml; charset=UTF-8 
Content-Transfer-Encoding: binary 
Content-Id: 
<FFFA7DB08063F23702D0ECA3D281DCD3> 
    <?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> 
      <ns1:downloadNBRStorageFileResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="NBRStorageService"> 
       <ns1:downloadNBRStorageFileReturn xsi:type="soapenc:Array" soapenc:arrayType="ns1:DataHandler[2]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
        <item href="cid:146662A992D4B0C9BDC471A0E338E684"/> 
        <item href="cid:0EFC5015D567DB498B49530FE4FABDD7"/> 
       </ns1:downloadNBRStorageFileReturn> 
      </ns1:downloadNBRStorageFileResponse> 
     </soapenv:Body> 
    </soapenv:Envelope> 
------=_Part_633_1893304738.1500351436145 
Content-Type: application/octet-stream 
Content-Transfer-Encoding: binary 
Content-Id: 
    <146662A992D4B0C9BDC471A0E338E684> 

Demo-20170424 0824-1.arf 
5402 
false 
------=_Part_633_1893304738.1500351436145 
Content-Type: application/octet-stream 
Content-Transfer-Encoding: binary 
Content-Id: 
     <0EFC5015D567DB498B49530FE4FABDD7> 

X�\Y=XH���H��H� XBW$HS��X#s3�=S��XXBW*x0Demo.3040047907 958102358�3s#O"f�P IIMB Host 
randomstrings� 
      <random_strings> 
       <random_string1>rIhldZZp3nPCGAwmt+L3kLKjBsgIygtgyuaBN26TN3E=</random_string1> 
       <random_string2>lKxADufR/Rn3XX9djkuZqGIHmiQxaPqP2J39+bze1vY=</random_string2> 
      </random_strings>lx2s nbr_token1047388207:1493022291nbr_record_durationX��Snbr_starttime_ms�7�Sxesession_typec_session_idfc_pdvideo_idg[xe .. X [xe`..�855 ?xhsession_typec_session_idi�xh`� 
      <chat ver="1.0"> 
       <mtype>5</mtype> 
       <NodeID>0</NodeID> 
       <UserName> 
        <![CDATA[IIMB Host]]> 
       </UserName> 
       <RoleSet>3</RoleSet> 
       <Visible>1</Visible> 
       <UserType>0</UserType> 
       <UIT>0</UIT> 
       <GuestID>0</GuestID> 
      </chat>gxjWBX_SESSION_USER_DATA_EUREKAsession_typec_session_idk7xj` 
U33558529?xlsession_typec_session_idm/xl00Mjxl`= 
      <user FG="6" KD="0" NM="IIMB Host" EM="****@**********.**" />�xnsession_typePRIVILEGE_TICKETJNEW_ENC_FORMAT_002RzH//wAAAATvfbFUoMwtWmGIzR9U5Yk2tUsgVMNFlzpXprogwKW1qw==FLASH_RSC_IDIMAGE_RSC_ID-xn`gxoWBX_SESSION_USER_DATA_EUREKAsession_typec_session_idpoxqWBX_SESSION_USER_DATA_EUREKAsession_typec_session_idrxx` IIMB Host 000.0.0.0���f�P� 
      <CMgr ver="1.0"> 
       <UAID>37</UAID> 
       <CS>6</CS> 
       <FG>8288</FG> 
       <PG>95055</PG> 
       <EA>****@**********.**</EA> 
       <UIT>0</UIT> 
       <NBRCapability>1</NBRCapability> 
       <CMRClientVersion>0</CMRClientVersion> 
       <JMT>1493022269</JMT> 
      </CMgr>x 
xx!958102358,�NBR2EVERRUN4�NBR2_RECORD_VERSION2.33NBR2_Platform_FlagXp 
NBR2Status2XQ 

NBR2Status2Xz 

NBR2Status2�R2s�XBW$HT��X#s3�HS��XXBW*XBW$HT��X#s3��S��XXBW*�H(F�� 
QuickStart������������������(��������������WPDFS46 
�{������������������������ 
QuickStarteH(oW� Information�����������������((��������������H(p������������/��/�=��������U�/�= 
������������������fH(pX�page 1�������������//���������ZH(pL���������������������)���������?XBW$HT��X#s3�HS��XXBW*XBW$HT��X#s3��S��XXBW*gHY 
YO9{VO"�3s#,VmF7XvR8d049Hlf4302g1x7MUZEyah3G9Zw1l87U4UI=*5C$�Oj��P�h�gH� 
YO9{VO"�3s#,VmF7XvR8d049Hlf4302g1x7MUZEyah3G9Zw1l87U4UI=*5C$�Oj��P�h�H 
H� 
H�(
H;4 
H�? 
H�K 
XBW$HT��X#s3�HS��XXBW*XBW$HT��X#s3�S��XXBW*gH� 
YDO9{VO"�3s#,VmF7XvR8d049Hlf4302g1x7MUZEyah3G9Zw1l87U4UI=*5C$�Oj��P�h�gH� 
YDO9{VO"�3s#,VmF7XvR8d049Hlf4302g1x7MUZEyah3G9Zw1l87U4UI=*5C$�Oj��P�h� 
------=_Part_633_1893304738.1500351436145-- 

tête de réponse est

Content-Type → multipart/related; 
type="text/xml"; 
start="<6CD29D3FD60E4438F6DC0087CF25E12D>"; 
boundary="----=_Part_627_84395761.1500349931712" 
Date →Tue, 18 Jul 2017 03:52:11 GMT 
Transfer-Encoding →chunked 

Comment créer la fichier .arf de la réponse ci-dessus et également obtenir le nom de fichier (Demo-20170424 0824-1.arf) dans le ab Ove réponse en utilisant PHP?

+0

Je suis capable d'analyser la réponse en utilisant le paquet github.com/Riverline/multipart-parser. –

+0

Seriez-vous en mesure de fournir un exemple de la façon dont vous avez fait cela? Nous pourrions alors marquer cette question répondu. –

Répondre

1

Installez le package PHP à partir de https://packagist.org/packages/sathish/webex à l'aide de composer ou de le cloner à partir de https://github.com/rsathishtechit/webex. Ce package peut être utilisé pour se connecter et télécharger l'enregistrement à partir de l'API NBR WebEx.

Pour analyser les données Multipart à partir de WebEx, utilisez le package http://github.com/Riverline/multipart-parser.

Pour plus de détails, reportez-vous à la section README.md de https://packagist.org/packages/sathish/webex.