i'm having some issues using Ksoap2 in an android project while conecting to a .net Webservice.
As long as i call the Ws witouth parameters everything works just fine, but when i try to add parameters, the servers never gets them.
here's my code
import java.util.Vector;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
public class ServicioWeb extends Activity {
SoapObject response;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// String NAMESPACE = "http://tempuri.org/";
String NAMESPACE = "IDBN.WS";
String METHOD_NAME = "getClientesByName";
//String SOAP_ACTION = "http://tempuri.org/getClientesByName";
String SOAP_ACTION = "IDBN.WS/getClientesByName";
//String URL = "http://www.ws.idbnar2.com.ar/wsClientes.asmx";
String URL = "http://www.ws.idbnar2.com.ar/wsClientes.asmx";
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo pi = new PropertyInfo();
pi.setName("Nombre");
pi.setValue("RIQUELME");
pi.setType(int.class);
Request.addProperty(pi);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(Request);
AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
ListView Lista = (ListView)findViewById(R.id.Lista);
try
{
androidHttpTransport.call(SOAP_ACTION, envelope);
response = (SoapObject)envelope.getResponse();
String[] Clientes = getStringArrayResponse(response, null);
Lista.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,Clientes));
}
catch(Exception e)
{
Toast toast = Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG);
toast.show();
}
}
public String[] getStringArrayResponse(SoapObject node, Vector<String> strings) {
boolean isFirstCall = false;
if (strings == null) {
isFirstCall = true;
strings = new Vector<String>();
}
int count = response.getPropertyCount();
for (int i = 0; i < count; i++) {
Object obj1 = node.getProperty(i);
if (obj1 instanceof SoapObject) {
// don't recurse empty objects
if (((SoapObject)obj1).getPropertyCount() > 0) {
// recurse into another node to process its nodes/primitives
getStringArrayResponse((SoapObject)obj1, strings);
}
} else if (obj1 instanceof SoapPrimitive) {
strings.add(((SoapPrimitive)obj1).toString());
}
}
// only make this for the original caller
if (isFirstCall) {
return (String[])strings.toArray(new String[strings.size()]);
}
return null;
}
}
I harcode the server side, to return a string + the parameters i send it.. and now all i get it's the hardcoded part, seems like the parameters i add to the soap objets are never receives by the server.
Allready try :
-) removing the "http://" from the namespace on the Webservice
-) not using the "envelope.dotNet = true;"
-) adding the Property directly into the Request
Any idea wha'ts wrong???
These lines confuse me:
PropertyInfo pi = new PropertyInfo();
pi.setName("Nombre");
pi.setValue("RIQUELME");
pi.setType(int.class);
Request.addProperty(pi);
Why do you use a string ("RIQUELME") as value for an integer?
What happens when you run the code? Try setting envelope.debug = true. Trying setting a breakpoint and inspecting the value of envelope.requestDump and envelope.responseDump. That way you can see what is sent and what is received.
pi.setName("Nombre");
pi.setValue("RIQUELME");
pi.setType(int.class);
Request.addProperty(pi);
pi.setValue should either be an integer (1, 2, etc.)
OR
pi.setType should be string.class
Or, you don't need to have pi.setType. If you delete that line, it should work.
Related
i watched too many videos about android webservises
but all them results finished error
"java.net.SocketTimeoutException"
i used
"ksoap2-android-2.5.2.jar"
can you guide me on this
my codes ;
package com.example.acr_soaptest2;
import android.util.Log;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
public class ServiceManager {
private static final String METHOD_NAME = "MySQl_Query";
private static final String NAMESPACE = "http://tempuri.org/";
private static final String SOAP_ACTION = "http://tempuri.org/MySQl_Query";
private static final String URL = "http://localhost:8090/WebService1.asmx";
SoapObject soapObject;
SoapSerializationEnvelope soapSerializationEnvelope;
HttpTransportSE httpTransportSE;
public void PushData(String query) {
soapObject = new SoapObject(NAMESPACE, METHOD_NAME);
soapObject.addProperty("sorgu", query);
soapSerializationEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
soapSerializationEnvelope.dotNet = true;
soapSerializationEnvelope.setOutputSoapObject(soapObject);
httpTransportSE = new HttpTransportSE(URL);
httpTransportSE.debug = true;
try {
httpTransportSE.call(SOAP_ACTION, soapSerializationEnvelope);
SoapPrimitive soapPrimitive=(SoapPrimitive)soapSerializationEnvelope.getResponse();
System.out.println(soapPrimitive.toString());
Log.d("satir:", soapPrimitive.toString());
} catch (Exception ex) {
ex.printStackTrace();
Log.d("satir:", ex.toString());
}
}
}
I got a method that fetch data from a web service, so Im looking for a way to call it as a method.
How can I turn this code into a method? or can I call a class in a method? because it has a protected method and extended from a class, but if I implemented the extended class AsyncTask to the class I need to use the Json fetching protected method doInBackground it says "Interface expexted here".
Here's my code that I need to convert it to a method or a way to add it to the class I want to use it in:
Notice: I already extended AppCompatActivity to the class I want to call doInBackground in so I cannot extend FetchData class.
Thanks a lot :D
package com.example.wordspuzzlejsontest;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class FetchData extends AsyncTask<Void, Void, Void> {
final String update = "4";
String data = "";
int currentLevel;
Context context;
FetchData(Context context) {
this.context = context;
}
#Override
protected Void doInBackground(Void... voids) {
try {
URL url = new URL("https://api.jsonbin.io/b/5e42776dd18e4016617690ce/" + update);
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
InputStream inputStream = httpURLConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
String line = "";
while (line != null) {
line = bufferedReader.readLine();
data = data + line;
}
JSONArray JA = new JSONArray(data);
SharedPreferences sharedPreferences = context.getSharedPreferences("SHARED_PREFS", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
currentLevel = sharedPreferences.getInt("currentLevel", 0);
for (int i = 0; i < JA.length();) {
i = currentLevel;
JSONObject JO = (JSONObject) JA.get(i);
String id = (String) JO.get("id");
String img = (String) JO.get("img");
String w1 = (String) JO.get("w1");
String w2 = (String) JO.get("w2");
String w3 = (String) JO.get("w3");
String w4 = (String) JO.get("w4");
editor.putString("id" + i, id);
editor.putString("img" + i, img);
editor.putString("w1" + i, w1);
editor.putString("w2" + i, w2);
editor.putString("w3" + i, w3);
editor.putString("w4" + i, w4);
editor.apply();
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
}
```
Summing up my comments:
Create a new class called NewClass.java
class NewClass extends FetchData{
public Void fetchData(Void... voids){ return this.doInBackground(voids);}
}
Since doInBackground in a protected method, you will have private access inside NewClass.java
I have made a java class to handle HTTP post requests and it sends back the result in string form. For some reason when I send the request I can print the response to the log but when return the string of the response to update the UI in the method my app crashes. Could any one explain whats happening here? I am trying to get better at java so pointing out any other bad practices would be appreciated .
log:
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/OKHTTP3: Request body created
D/OKHTTP3: Request body created 2
D/OKHTTP3: Got Response
D/OKHTTP3: {
"failed": "Asset already exists"
}
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.john.okhttp, PID: 3166
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.IllegalStateException: closed
at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:374)
at okio.Buffer.writeAll(Buffer.java:993)
at okio.RealBufferedSource.readByteArray(RealBufferedSource.java:106)
at okhttp3.ResponseBody.bytes(ResponseBody.java:128)
at okhttp3.ResponseBody.string(ResponseBody.java:154)
at com.example.john.okhttp.PostEx.doPostRequest(PostEx.java:40)
at com.example.john.okhttp.MainActivity$Requesting.doInBackground(MainActivity.java:59)
at com.example.john.okhttp.MainActivity$Requesting.doInBackground(MainActivity.java:51)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Application terminated.
the code from both java files will be posted below:
MainActivity.java:
package com.example.john.okhttp;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import org.json.JSONObject;
import okhttp3.OkHttpClient;
import okhttp3.Request;
public class MainActivity extends AppCompatActivity {
private Button btnSendHttpRequest;
private EditText etJsonResponse;
private TextView View;
private TextView View2;
private OkHttpClient okHttpClient;
private Request request;
public final String URL = "http://www.mocky.io/v2/582ac99c280000d50953c316";
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//set button and text view values
btnSendHttpRequest = (Button) findViewById(R.id.btnSendRequest);
View = (TextView) findViewById(R.id.view1);
View2 = (TextView) findViewById(R.id.textView4);
etJsonResponse = (EditText) findViewById(R.id.etjson);
//response for button
btnSendHttpRequest.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
//http request
PostEx example = new PostEx();
new Requesting().execute();
}
});
}
public class Requesting extends AsyncTask<String, String, String> {
// post request stuff
#Override
protected String doInBackground(String... params) {
String id = "444454";
String userName = "john";
PostEx example = new PostEx();
String jsonstr = example.makeJsonForUser(id, userName);
if(example.doPostRequest(jsonstr)== null){
Log.d("OKHTTP3", "null pointer");
}
String response = example.doPostRequest(jsonstr);
Log.d("OKHTTP3", "sending response");
return response;
}
#Override
protected void onPostExecute(String response) {
super.onPostExecute(response);
//rewrite text view
try {
// create json ob from response
if(response == null){
Log.d("OKHTTP3", "null pointer");
}
JSONObject jsonObj = new JSONObject(response);
//get the values from the json key value pairs
String id = jsonObj.toString();
//update the text views
TextView textView = (TextView) findViewById(R.id.view1);
textView.setText(id);
} catch (Exception e) {
}
}
}
}
PostEx.java:
import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
public class PostEx {
public String doPostRequest(String jsonstr) {
String url = "http://45.55.92.243/newuser";
OkHttpClient client = new OkHttpClient();
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON,jsonstr);
Log.d("OKHTTP3","Request body created");
Request newReq = new Request.Builder()
.url(url)
.post(body)
.build();
Log.d("OKHTTP3","Request body created 2");
try {
Response response = client.newCall(newReq).execute();
Log.d("OKHTTP3","Got Response");
Log.d("OKHTTP3",response.body().string());
String Fresponse = response.body().string();
response.close();
return Fresponse;
} catch (IOException e) {
Log.d("OKHTTP3","Got Exception");
e.printStackTrace();
return null;
}
}
public String makeJsonForUser(String id, String Username){
JSONObject data = new JSONObject();
try {
data.put("id", id);
data.put("name", Username);
return data.toString();
} catch (JSONException e) {
Log.d("OKHTTP3", "JSON Exeption");
e.printStackTrace();
return null;
}
}
}
at okhttp3.ResponseBody.string(ResponseBody.java:154):
public final String string() throws IOException {
return new String(bytes(), charset().name());
}
at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:374):
#Override public long read(Buffer sink, long byteCount) throws IOException {
if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount);
if (closed) throw new IllegalStateException("closed");
if (bytesRemaining == 0) return -1;
long read = source.read(sink, Math.min(bytesRemaining, byteCount));
if (read == -1) {
endOfInput(false); // The server didn't supply the promised content length.
throw new ProtocolException("unexpected end of stream");
}
bytesRemaining -= read;
if (bytesRemaining == 0) {
endOfInput(true);
}
return read;
}
Your code works, mostly, up to this point
D/OKHTTP3: Request body created
D/OKHTTP3: Request body created 2
D/OKHTTP3: Got Response
I remember reading, you can only receive the body string once
// Log.d("OKHTTP3",response.body().string());
String Fresponse = response.body().string();
// log Fresponse here
And close the resources in a finally block after the catch
More importantly you are using Okhttp. You don't need Asynctasks! Use the enqueue method instead of execute on the client call object
client.newCall(newReq).enqueue(new Callback() {
// handle response here
});
And you're processing JSON, so Retrofit would help you implement what you're already trying to do
The problem is you can call string() once. But I don't know why
I am working on a project to invoke a web service using android. I use ksoap2 for that.
I created a my own data type(just to try) which contains two string variables. It is like this
public class MyType {
String fName;
String lName;
public MyType(String s1,String s2){
fName = s1;
lName = s2;
}
}
I created this data type at both ends.(web service end and android application end). I wrote a program to invoke web service and then to concatenate given strings using my data type.
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import java.io.IOException;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;
import android.os.AsyncTask;
import android.widget.TextView;
public class MainActivity extends ActionBarActivity {
public final static String URL = "http://192.168.69.1:8080/WebApplication4/MyWebService?wsdl";
public static final String NAMESPACE = "http://mywebservice.android.com/";
public static final String SOAP_ACTION_PREFIX = "/";
private static final String METHOD = "objectMethod";
private TextView textView;
MyType mt = new MyType("Upul","Tharanga");
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.test);
AsyncTaskRunner runner = new AsyncTaskRunner(mt);
runner.execute();
}
private class AsyncTaskRunner extends AsyncTask<Integer, String, String> {
private String resp;
MyType a;
public AsyncTaskRunner(MyType a){
this.a = a;
}
#Override
protected String doInBackground(Integer... params) {
publishProgress("Loading contents..."); // Calls onProgressUpdate()
try {
// SoapEnvelop.VER11 is SOAP Version 1.1 constant
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
SoapObject request = new SoapObject(NAMESPACE, METHOD);
PropertyInfo pi1=new PropertyInfo();
pi1.setType(String.class);
pi1.setName("parameter");
pi1.setValue(a);
request.addProperty(pi1);
envelope.bodyOut = request;
HttpTransportSE transport = new HttpTransportSE(URL);
try {
transport.call(NAMESPACE + SOAP_ACTION_PREFIX + METHOD, envelope);
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
//bodyIn is the body object received with this envelope
if (envelope.bodyIn != null) {
//getProperty() Returns a specific property at a certain index.
//SoapPrimitive resultSOAP = (SoapPrimitive) ((SoapObject) envelope.bodyIn).getProperty(0);
//Object resultSOAP = (SoapPrimitive)((SoapObject) envelope.bodyIn).getProperty(0);
Object resultSOAP = (SoapPrimitive)((SoapObject) envelope.bodyIn).getProperty(0);
resp=resultSOAP.toString();
}
} catch (Exception e) {
e.printStackTrace();
resp = e.getMessage();
}
return resp;
}
/**
*
* #see android.os.AsyncTask#onPostExecute(java.lang.Object)
*/
#Override
protected void onPostExecute(String result) {
// execution of result of Long time consuming operation
// In this example it is the return value from the web service
textView.setText(result);
}
/**
*
* #see android.os.AsyncTask#onPreExecute()
*/
#Override
protected void onPreExecute() {
// Things to be done before execution of long running operation. For
// example showing ProgessDialog
}
/**
*
* #see android.os.AsyncTask#onProgressUpdate(Progress[])
*/
#Override
protected void onProgressUpdate(String... text) {
textView.setText(text[0]);
// Things to be done while execution of long running operation is in
// progress. For example updating ProgessDialog
}
}
}
What my web service do is take the MyType parameter as input and concatenate those two given strings and return the concatenated string.
When I run the android application I get an error(run time error I think) saying cannot serialize MyType.
Any suggestions to solve the issue?
Try implementing Serializable
public class MyType implements Serializable {
String fName;
String lName;
public MyType(String s1,String s2){
fName = s1;
lName = s2;
}
}
I need your help in order to consume the services of this wsdl file:
http://lyrics.wikia.com/server.php?wsdl
For example the service "getArtist" with parameter "artist=U2"
I developed this java code:
public class Constante {
public static final String SOAP_ACTION = "LyricWiki#getArtist";
public static final String METHOD_NAME = "getArtist";
public static final String NAMESPACE = "LyricWiki";
public static final String URL = "http://lyrics.wikia.com/server.php";
public static final String KEY_ARTIST = "artist";
}
import java.io.IOException;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;
public class TestWSDL {
public static void run() {
SoapObject soapclient = new SoapObject(Constante.NAMESPACE, Constante.METHOD_NAME);
// Yes you need this one in order to send the whole string or else only
// the first letter
// is going to be send
SoapObject parameters = new SoapObject(Constante.NAMESPACE, Constante.METHOD_NAME);
parameters.addProperty(Constante.KEY_ARTIST, "U2");
soapclient.addProperty(Constante.METHOD_NAME, parameters);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(soapclient);
HttpTransportSE httpTransportSE = new HttpTransportSE(Constante.URL);
try {
httpTransportSE.call(Constante.SOAP_ACTION, envelope);
Object result = envelope.getResponse();
System.out.println(result);
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void main(String[] args) {
run();
}
}
And I got:
org.xmlpull.v1.XmlPullParserException: unterminated entity ref (position:TEXT ?
I think that my problem is in the class "Constante" but I do not know the right format to use.
Any advice or code solution will be good for me,
Thanks in advance for your help and time
I tested using chartlyrics and I got the lyric,
Now, I share with you my code:
public class Constante {
public static final String SOAP_ACTION = "http://api.chartlyrics.com/SearchLyricDirect";
public static final String METHOD_NAME = "SearchLyricDirect";
public static final String NAMESPACE = "http://api.chartlyrics.com/";
public static final String URL = "http://api.chartlyrics.com/apiv1.asmx";
public static final String KEY_ARTIST = "artist";
public static final String KEY_SONG = "song";
}
import java.io.IOException;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.SoapFault;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;
public class TestWSDL {
public static void run2() throws SoapFault {
SoapObject request = new SoapObject(Constante.NAMESPACE,
Constante.METHOD_NAME);
request.addProperty(Constante.KEY_ARTIST, "U2");
request.addProperty(Constante.KEY_SONG, "One");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(
Constante.URL);
try {
// call the web service method
androidHttpTransport.call(Constante.SOAP_ACTION, envelope);
} catch (Exception e) {
e.printStackTrace();
}// Next task is to get Response and format that response
SoapObject obj;
obj = (SoapObject) envelope.getResponse();
// System.out.println(obj);
System.out.println(obj.getProperty("TrackId"));
System.out.println(obj.getProperty("LyricChecksum"));
System.out.println(obj.getProperty("LyricId"));
System.out.println(obj.getProperty("LyricSong"));
System.out.println(obj.getProperty("LyricArtist"));
System.out.println(obj.getProperty("LyricUrl"));
System.out.println(obj.getProperty("LyricCovertArtUrl"));
System.out.println(obj.getProperty("LyricRank"));
System.out.println(obj.getProperty("LyricCorrectUrl"));
System.out.println(obj.getProperty("Lyric"));
}
public static void main(String[] args) {
try {
run2();
} catch (SoapFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
I hope to consume the LyricWiki soap api.
Regards.