Android Question Access Data from PHP WSDL using HttpJob


Active Member
Licensed User
Good day Guys!

Just want to ask. Im using a wsdl generated from php. Using httpjob, i am trying to post a request to the file and receive an xml response. The problem is, the response is the xml code of the wsdl file. Can someone direct me to the right path? I am trying to call the login function

wsdl file: (sample)
<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" xmlns:tns="urn:coreon.gcash" xmlns:soap="" xmlns:wsdl="" xmlns="" targetNamespace="urn:coreon.gcash">
<xsd:schema targetNamespace="urn:coreon.gcash">
<xsd:import namespace="" />
<xsd:import namespace="" />
    <xsd:complexType name="resultInfo">
            <xsd:element name="result" type="xsd:string"/>
            <xsd:element name="transid" type="xsd:string"/>
            <xsd:element name="msg" type="xsd:string"/>
            <xsd:element name="session" type="xsd:string"/>
<message name="loginRequest">
  <part name="id" type="xsd:string" />
  <part name="password" type="xsd:string" /></message>
<message name="loginResponse">
  <part name="return" type="xsd:resultInfo" /></message>
<portType name="coreon.gcashPortType">
  <operation name="login">
    <documentation>User Login</documentation>
    <input message="tns:loginRequest"/>
    <output message="tns:loginResponse"/>
<binding name="coreon.gcashBinding" type="tns:coreon.gcashPortType">
  <soap:binding style="rpc" transport=""/>
  <operation name="login">
    <soap:operation soapAction="uri:coreon.gcash#login" style="rpc"/>
    <input><soap:body use="encoded" namespace="uri:coreon.gcash" encodingStyle=""/></input>
    <output><soap:body use="encoded" namespace="uri:coreon.gcash" encodingStyle=""/></output>

Sub consumeService(strOpt As  String,data1 As String,data2 As String,data3 As String,data4 As String,data5 As String,data6 As String,data7 As String,data8 As String)
    Dim PostUrl As String = ""
    Dim strXML As String=""
    Dim job1 As HttpJob
    Select Case strOpt
        Case "1" 'Login
            PostUrl = ""
            strXML = "<?xml version='1.0' encoding='UTF-8'?>"
           strXML = strXML & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='' "
            strXML = strXML & "xmlns:ns1='uri:coreon.gcash' xmlns:xsd='' "
           strXML = strXML & "xmlns:xsi='' xmlns:SOAP-ENC='' "
            strXML = strXML & "SOAP-ENV:encodingStyle=''>"
            strXML = strXML & "<SOAP-ENV:Body>"
            strXML = strXML & "<ns1:loginRequest>"
            strXML = strXML & "<id xsi:type='xsd:String'>" & data1 & "</id>"
            strXML = strXML & "<password xsi:type='xsd:String'>" & data2 & "</password>"
            strXML = strXML & "</ns1:login>"
            strXML = strXML & "</SOAP-ENV:Body>"
           strXML = strXML & "</SOAP-ENV:Envelope>"
           strXML = strXML.Replace("'", Chr(34))
            job1.Initialize("login", Me)
        job1.PostString(PostUrl, strXML)
        job1.GetRequest.SetContentType("text/xml; charset=utf-8")
    End Select
End Sub

Sub JobDone (Job As HttpJob)

    If Job.Success Then
           Select Job.JobName
               Case "login"
                    parser.Parse(Job.GetInputStream , "Parser")
           End Select
        Msgbox( "Error in Accessing Web Portal," & CRLF & "Make sure you are connected to the Internet!", "Error")
        'Msgbox( Job.errormessage , "Error")
    End If
End Sub

Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
    If parser.Parents.IndexOf("login") > -1 Then 'login
        If Name = "session" Then
            strSession = Text.ToString
        Else If Name = "result" Then
            strResult = Text.ToString
        End If
    End If
End Sub
i have already done this using actual php code and .net asmx, i was able to get the result but im kind of confuse how i can execute it using wsdl


Active Member
Licensed User
Thanks Erel I changed this code:
job1.PostString(PostUrl, strXML)
        job1.GetRequest.SetHeader("login", "http://xxxxxxx/coreonCash_dev4/pages/Coreon_GCash.wsdl")
        job1.GetRequest.SetContentType("text/xml; charset=utf-8")
but its still outputting the code of my wsdl and not the output i need.

How can i make use of smart string literal in this scenario.


Active Member
Licensed User
thank you Erel, but i was able to use the wsdl using actual php code and it'w working fine for and php, i am quite confused because im sending the actual XML request already but the output is always the xml code of the wsdl web service.

I also tried Fiddler but its also outputting my wsdl code
Last edited:


Active Member
Licensed User
Hello everyone.
I figured it out. I dont know what seems to be the problem but Fiddler is also outputting the XML of my wsdl.
what i did was to use the actual php page that my wsdl uses for its function.
so instead of using
PostUrl = ""

i used
PostUrl = ""

which is used for the wsdl file. I also changed the SetHeader to the url of the code

job1.GetRequest.SetHeader("login", "http://xxxxx/rommel/coreonCash_dev4/pages/CoreonService.php")