Techiio-author
Started by Bradley ReidNov 6, 2021

Open
How to consume my WCF service from my Android app without http://tempuri.org/?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

To speak from my android app to the WCF carrier I use a code I discovered the long term in the past within the internet. I am no longer very savvy about all this, but it works efficaciously. For a few cause that code gets entry to "tempuri.Org" which is something about Microsoft. I have attempted to take away that URL from my code but I don't have any achievement.

This is how I access my service:

String METHOD_NAME = "HelloWorld";
String SOAP_ACTION = "http://tempuri.org/IService1/" + METHOD_NAME;
String NAMESPACE = "http://tempuri.org/";
int SOAP_VERSION = SoapEnvelope.VER11;
String URL = "https://MyOwnUrl.com:444/Service1.svc";
try {
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
    request.addProperty("OneParameter", "This is a text parameter");
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SOAP_VERSION);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
    androidHttpTransport.call(SOAP_ACTION, envelope);
    Object result = envelope.getResponse();
    String resultData = result.toString();
    return resultData; <-- This works correctly, but why do I need tempuri.org?
} catch (IOException e) {  
    
} catch (XmlPullParserException e) {  
    

}

0 Replies

You must be Logged in to reply
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Recommended Blogs
1
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance