so i need to send a SoapObject as a parameter of a SoapObject............ from the request dump above it seems that the envelope structure is fine.......but the server always gets null when i try get "filter.street" from the request......any ideas?
Look at the ksoap2 android wiki about debugging and check out the request and response.
http://code.google.com/p/ksoap2-android/wiki/CodingTipsAndTricks
Related
I'm send data to rest service using retrofit and it works but when server crash and i need to test the api in postman but when using postman data is null,i can see that data are delivered using dump and die but when trying to access it return null
#POST("adToCart")
Call<CartDataResponse> addToCart(#Body CartData cartData);
As your request body is CartData, you can just simply use Gson.toJson(cartData) where, if you're using google Gson libray with retrofit and cartData is an object of CartData.java or the request model class. Print that value of the json which you have got from Gson.toJson(cartData), copy the json and put it into the body portion of postman and make sure that you have fill the hearder and correct endpoint, Then hit 'send' button which will give you your expected response. If not please share your steps for confirmation.
I would like to connect my android with my own web service with nested like wsdl SOAP request
Using SOAPUI tool i found the method name is login .but unable to pass params user ,pass under Userlogin. how does specifically call the User login in android (Web service).
androidHttpTransport.responseDump returns error as
refer: androidHttpTransport.responseDump
wsdl SOAP request: SOPA Request WSDL
I'm working on an issue which is:
+ I send a HTTP POST request to a server and get the response.
+ I use a DefaultHTTPClient instance to send the request. And I use BasicNameValuePair to add the params for the server to process.
There is a param which is a xml-based string. The problem is that, when I send an "empty" string like this: " ", the server response "SUCCESSFUL". But when I send another value which is much longer. The server response "UNSUCCESSFUL" due to this parameter.
Please tell me that whether Android has a max length limitation on BasicNameValue instance or not? And how can I fix this issue.
Thanks in advance.
I expect the problem is with your web service, not with the BasicNameValue implementation on Android: you are probably just sending it a bad parameter. Do you get SUCCESSFUL when you send the exact same request parameters from another programming language?
This question already has answers here:
Add CSS or JavaScript files to layout head from views or partial views
(10 answers)
Closed 2 years ago.
I have been searching the web for a while now, but wasn't able to find a appropriate solution for my problem. This article does not really help either, because the classes and methods used are not present in ksoap2 for android: Basic HTTP authentication using KSOAP for android
I am trying to access a SAP webservice, which I set up in the sap soa manager. The webservice requires basic authentication in the http header. Accessing this web service by soapUI is not a problem, because it is possible to set up http authentication there.
My Problem:
I want to access the web service with a android device and I want to use KSOAP2 for Android because I already have some experience with that libary. My problem is that I don't know how to authenticate to the webservice?
Has anyone had a similar problem and knows how to solve it?
I would be grateful if you could help me!
I hope it is not too late. That is how I access SAP webservice with KSOAP:
List<HeaderProperty> headers = new ArrayList<HeaderProperty>();
headers.add(new HeaderProperty("Authorization", "Basic XXXXXXXXXX"));
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
Object result = null;
final Object response = androidHttpTransport.call(SOAP_ACTION, envelope, headers);
Replace the XXXXXXXX with the encoded hash of your username and password. To get it just look in soapUI raw header request. Hope it helps.
I'm using KSoap within my Android application.
My application using Web Service for communicate with the server.
I have found a code sample of a KSoap wev service client.
In the sample, the client uses the following code for communication with the server -
Request = new SoapObject(NAMESPACE, METHOD_NAME);
How do I pass arguments to the server?
How do I invoke the return value form the server?
You should use SoapObject.addProperty() to add argument and SoapSerializationEnvelope.getResponse() to get data returned by server.
Here is example: http://android-devblog.blogspot.com/2010/06/soap-on-android.html