Hi,
we would like to connect NAV to an special android app for our salespersons.
We got the connection to NAV by the help of Ksoap2. Now we can load Page-Data to our local Database in NAV, but unfortunately we can’t pass a filter to the Page. How is it possible to connect to the NAV “ReadMultiple” Function of the WebService?
Look at my solution right know:
MyAsyncTask-Method →
----------------------------------MYCODE--------------------------------
- public void connectToNAV() {
- String namespace = “urn:microsoft-dynamics-schemas/page/orderheader”;
- String url = “”>172.16.1.15:7047/…/OrderHeader";
- String soap_action = “urn:microsoft-dynamics-schemas/page/orderheader:ReadMultiple”;
- String method_name = “ReadMultiple”;
- String great;
- try {
- SoapObject request = new SoapObject(namespace, method_name);
- SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- envelope.dotNet = true;
- envelope.setOutputSoapObject(request);
- NtlmTransport ntlm = new NtlmTransport();
- ntlm.debug = true;
- ntlm.setCredentials(url, “myuser”, “mypasswort”, “billy”, “”);
- ntlm.call(soap_action, envelope); // Receive Error here!
- SoapObject result = (SoapObject) envelope.getResponse();
- great = result.toString();
- System.out.println(great);
- } catch (Exception e) {
- e.printStackTrace();
- great = e.toString();
- System.out.println(great);
- }
- }
--------------------------- END ------------------------------
With this code I can call all the OrderLines, but I need only the ones of one salesperson. How to realize the filter?