hi everyone :),

i have a webservice with method like login, which allows someone to
login. I am getting an error :

03-02 09:03:54.363: INFO/System.out(11393):
ERROR:org.xmlpull.v1.XmlPullParserException: expected: START_TAG
{http://schemas.xmlsoap.org/soap/envelope/}Envelope
(position:START_TAG <html>@2:7 in java.io.inputstreamrea...@433da810)

I am having a problem since few days for accessing a webservice, the
configuration of the webservice is as follows:

Apache/Mysql,
webservice file name : http://localhost/abc/abc.wsdl

wsdl file:
********************************************************************************************
<?xml version="1.0"?>
<definitions name="loginservice"
        targetNamespace="http://localhost/abc/abc.wsdl";
        xmlns:tns="http://localhost/abc/abc.wsdl";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
        xmlns="http://schemas.xmlsoap.org/wsdl/";>

 <message name="myRequest">
  <part name="reqParam" type="xsd:string"/>
  <part name="reqParam2" type="xsd:string"/>
 </message>

 <message name="myResponse">
  <part name="resParam" type="tns:ArrayOfString"/>
 </message>

 <portType name="MyPortType">

  <operation name="loginpass">
   <input message="tns:myRequest"/>
   <output message="tns:myResponse"/>
  </operation>

 </portType>

 <binding name="MyBinding" type="tns:MyPortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/
http"/>
  <operation name="loginpass">
   <soap:operation soapAction=""/>
   <input>
    <soap:body use="encoded" namespace="urn:myInputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </input>
   <output>
    <soap:body use="encoded" namespace="urn:myOutputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </output>
  </operation>
 </binding>

 <service name="MyService">
  <documentation>Returns a greeting string.
  </documentation>
  <port name="MyPort" binding="tns:MyBinding">
   <soap:address location="http://localhost/abc/login.php"/>
  </port>
 </service>
</definitions>
****************************************************************************************************************

Android Code For Accessing WebService
/
*************************************************************************
  private static final String SOAP_ACTION = "loginpass";
    private static final String METHOD_NAME = "loginpass";


    //how should i refer the namespace
    private static final String NAMESPACE = "http://localhost/abc/
abc.wsdl";
    // And The URL?
    private static final String URL = "http://localhost/abc/abc.wsdl";;
public void onClick(View view) {
                                
((TextView)findViewById(R.id.lblStatus)).setText("... Invoking Web
Service ...");
                                String strUsername = ((EditText)findViewById
(R.id.username)).getText().toString();
                                String strPass = 
((EditText)findViewById(R.id.password)).getText
().toString();

                                SoapObject request = new SoapObject(NAMESPACE, 
METHOD_NAME);
                                SoapObject login = new SoapObject(NAMESPACE, 
"login");
                                login.addProperty("strUsername", strUsername);
                                login.addProperty("strPass", strPass);
                                request.addProperty("login", login);
                        SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
                        envelope.setOutputSoapObject(request);
                        HttpTransportSE androidHttpTransport = new 
HttpTransportSE
(URL);
                        try {
                                androidHttpTransport.call(SOAP_ACTION, 
envelope);
                            //Object result = envelope.getResponse();
                            //((TextView)findViewById(R.id.lblStatus)).setText
(result.toString());
                        } catch(Exception E) {
                                
//((TextView)findViewById(R.id.lblStatus)).setText("ERROR:"
+ E.getClass().getName() + ": " + E.getMessage());
                                System.out.println(("ERROR:" + 
E.getClass().getName() + ":
" + E.getMessage()));
                        }
                        }

**************************************************************************/

Can someone please help me , and tell me where i am doing wrong ?
Many Thanks
Vir :)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to