CISCO MSE API : SOAP communication with Android APP -


i want know how apply soap-request parameter in android source.

example...

q1. right ? (<--)

private static final string soap_action = "           "; <-- ??? private static final string method_name = "getstationstats "; <-- right? private static final string namespace = " http://cisco/mse/location"; <-- right? private static final string url = "https://192.168.100.231/location"; <-- right? 

q2. change soap-xml

<aesbusinesssession id="10510"/>       <aesmobilestation macaddress="00:01:02:03:04:05"/>  

=> android source

request.addproperty("aesbusinesssession id" ,10510);    <-- right? request.addproperty("aesmobilestation macaddress" ,00:01:02:03:04:05);    <-- right? 

this souce.

private void soapdata(string searchdata) { soapobject request=new soapobject(namespace, method_name);         log.e("dd", "soap created");         soapserializationenvelope envelope=new soapserializationenvelope(soapenvelope.ver11);         envelope.dotnet=true;         envelope.setoutputsoapobject(request); request.addproperty("sql" ,searchdata); httptransportse androidhttptransport=new httptransportse(url); androidhttptransport.debug = true;  try        {                androidhttptransport.call(soap_action, envelope);               soapprimitive result = (soapprimitive)envelope.getresponse();            //string result1 = xmlpasing(result.tostring()); //xml파싱               string re_xml = result.tostring();                output.settext(re_xml); //결과값 출력        }  catch(exception e)        {               log.e("dd", "soap catch",e);                e.printstacktrace();        } //try-catch     } 

==================================================== example method: getstationstats

returns aesmobilestation statistics record stored in mse based on various search criteria. result: aesbasestats object or null if not found arguments: aesbusinesssession, aesmobilestation key

7.3.1 soap request

<soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">    <soap-env:body>     <getstationstats xmlns=” http://cisco.com/mse/location”>        <aesbusinesssession id="10510"/>       <aesmobilestation macaddress="00:01:02:03:04:05"/>      </getstationstats>    </soap-env:body>  </soap-env:envelope>  

7.3.2 soap response 7.3.2.1 success

<soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">    <soap-env:body>     <response xmlns=” http://cisco.com/mse/location”>        <aesbasestats  macaddress="00:01:02:03:04:05" packetssent=”12” bytessent=”1221111” packetsrecv=”1111” bytesrecv=”1212204” policyerrors=”0” changedon=”1220324324”/>     </response>   </soap-env:body> </soap-env:envelope>  

============================================================

soap_action - can see in wsdl, smth that: "http://cisco/mse/location/getstationstats". method_name , namespace seems correct. url - service url, don't know wether correct. can see in wsdl also.

request.addproperty("aesbusinesssession id" ,10510); request.addproperty("aesmobilestation macaddress" ,00:01:02:03:04:05); 

it's wrong (output like: <aesbusinesssession id>10510</aesbusinesssession id>. can use soapobject or soapprimitive adding attributes:

soapobject request=new soapobject(namespace, method_name); soapobject aesbusinesssession = new soapobject(namespace, "aesbusinesssession"); aesbusinesssession.addattribute("id",10510);  soapobject aesbasestats = new soapobject(namespace, "aesbasestats");   ...//add attrs aesbasestats  request.addsoapobject(aesbusinesssession); request.addsoapobject(aesbasestats); 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -