krishnaveni
Well-Known Member
Hi.,
I have developed one android application
this is my code:
[HIGH]
public class RetailerActivity extends Activity {
private static final String SOAP_ACTION = "http://ws.testprops.com/customerData";
private static final String METHOD_NAME = "customerData";
private static final String NAMESPACE = "http://ws.testprops.com";
private static final String URL = "http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE ht = new HttpTransportSE(URL);
try {
ht.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
SoapPrimitive s = response;
String str = s.toString();
String resultArr[] = str.split("&");//Result string will split & store in an array
TextView tv = new TextView(this);
for(int i = 0; i<resultArr.length;i++){
tv.append(resultArr+"\n\n");
}
setContentView(tv);
} catch (Exception e) {
e.printStackTrace();
}
}
}
[/HIGH]This is my local tomcat apache server wsdl file:
http://localhost:8089/TestPrompts/services/Fetch?wsdl
means it is successfully worked for my emulator and android device.please see this screenshot:http://screencast.com/t/r4RISmZvL
The same TestPrompts project only i have exported and created war file and uploaded in my tomcat server.
This is my tomcat server wsdl file:
http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl
But here i have faced one problem:
I have to put these URL means doesn't getting any result on both emulator and android device.Simply am getting black blank screen only.please refer my screenshot:http://screencast.com/t/o5k1qEfQ0
My console window shows following error:
please help me.how can i resolve this error.
I have developed one android application
this is my code:
[HIGH]
public class RetailerActivity extends Activity {
private static final String SOAP_ACTION = "http://ws.testprops.com/customerData";
private static final String METHOD_NAME = "customerData";
private static final String NAMESPACE = "http://ws.testprops.com";
private static final String URL = "http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE ht = new HttpTransportSE(URL);
try {
ht.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
SoapPrimitive s = response;
String str = s.toString();
String resultArr[] = str.split("&");//Result string will split & store in an array
TextView tv = new TextView(this);
for(int i = 0; i<resultArr.length;i++){
tv.append(resultArr+"\n\n");
}
setContentView(tv);
} catch (Exception e) {
e.printStackTrace();
}
}
}
[/HIGH]This is my local tomcat apache server wsdl file:
http://localhost:8089/TestPrompts/services/Fetch?wsdl
means it is successfully worked for my emulator and android device.please see this screenshot:http://screencast.com/t/r4RISmZvL
The same TestPrompts project only i have exported and created war file and uploaded in my tomcat server.
This is my tomcat server wsdl file:
http://87.76.29.180:8080/TestPrompts/services/Fetch?wsdl
But here i have faced one problem:
I have to put these URL means doesn't getting any result on both emulator and android device.Simply am getting black blank screen only.please refer my screenshot:http://screencast.com/t/o5k1qEfQ0
My console window shows following error:
11-19 15:12:55.232: D/SntpClient(73): request time failed: java.net.SocketException: Address family not supported by protocol
please help me.how can i resolve this error.