locked
Custom SOAP template reponse RRS feed

  • Question

  • User-429223818 posted

    I was make web services. this is my code
     
    .vb file

    Public Class xlogin
            <SoapElement(ElementName:="eStatus"), _
            XmlElement(ElementName:="Status")> _
            Public StatusID As Boolean
        End Class
     
        <WebMethod()> _
        Public Function Login(ByVal sUser As String, ByVal sPwd As String) As xlogin
     
            Dim mystatus As xlogin = New xlogin()
     
                .....
     
                mystatus.StatusID = True
               
            Return mystatus
        End Function
    

     

    SOAP 1.1 Response

    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <LoginResponse xmlns="http://WheelOfFortune.org/">
          <LoginResult>
            <Status>boolean</Status>
          </LoginResult>
        </LoginResponse>
      </soap:Body>
    </soap:Envelope>
    

     

    I want to change SOAP Response be

    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <LoginResponse xmlns="http://WheelOfFortune.org/">
          <LoginResult>
            <Login>
              <Status>boolean</Status>
            </Login>
          </LoginResult>
        </LoginResponse>
      </soap:Body>
    </soap:Envelope>
    

     

    Please Help.

    Friday, June 13, 2014 3:34 AM

All replies