Domanda

I'm fairly okay at programming so this is a wierd one for me...

I'm attempting to pull a value from Mantis Bug Tracker to display on my Android app. To do this I'm accessing Mantis' SOAP interface using the kSOAP2 library.

The error i get is a MalformedURLException with these details

Protocol not found: /api/soap/mantisconnect.php

The URL is built from a user entered URI with a String attached onto the end:

String fullUrl = HOST + "/api/soap/mantisconnect.php/mc_version?wsdl"; 
trans.call(fullUrl, soapEnvelope);

HOST is passed in successfully, i have seen this through debugging variables and fullUrl equates to:

http://192.168.1.98/mantis/api/soap/mantisconnect.php/mc_version?wsdl

This is copied right out of the debug view for the HOST variable in Eclipse.

The point at which the program errors out is at trans.call(); where trans is an HTTPTransportSE object provided in the kSOAP2 libraries. The URL that is defined in trans is (oddly?):

/api/soap/mantisconnect.php

So to me this problem appears to lie in a parse issue within the HttpTransportSE object, for which source can be found here extending transport.java (i can't put a link as it thinks im spamming but you can find it in that SVN).

Normally by this point, i've spotted the problem and never have to hit the submit button but i'm having real issues with this =(. All help welcome & necessary!

È stato utile?

Soluzione

Have you tried it without the HOST variable and just hard code the URL?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top