1 pièce(s) jointe(s)
Est ce que peut etre la JVM ?
Bonjour,
J'ai modifier mon code mais ça ne marche pas encore, quand j'ai debugé il m'affiche source not found vous trouverez ci-joint l'imprime écran de mon debug.
merci pour vos réflexions.
voila mon code modifier :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
public class WS_SAP_activity extends Activity implements View.OnClickListener {
private static final String NAMESPACE = "urn:sap-com:document:sap:soap:functions:mc-style";
private static final String URL = "http://sap1.kalydia.local:8000/sap/bc/srt/rfc/sap/zwsuser/800/zwsuser/zwsuser";
private Button mButton;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mButton =(Button) findViewById(R.id.button1);
setContentView(R.layout.main);
mButton.setOnClickListener(this);
}
//public Button.OnClickListener btTestListener = new Button.OnClickListener() {
// b.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {
if (v == mButton)
{
try {
// Create SOAP request
//SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
final TextView tf= (TextView) findViewById(R.id.editText2);
final TextView tf1 =(TextView) findViewById(R.id.editText2);
SoapObject request = new SoapObject("urn:sap-com:document:sap:rfc:functions","Zmafonctionsws2");
request.addProperty("Nom", tf);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(null, envelope);
// Get response from envelope
// Object result = envelope.getResponse();
SoapObject body = (SoapObject)envelope.bodyIn;
String result = (String)body.getProperty("WiCount").toString();
// Display result
tf1.setText(result);
Toast.makeText(WS_SAP_activity.this, result.toString(),50000).show();
} catch (Exception e) {
e.printStackTrace();
}
}
}
} |