简体   繁体   中英

Joomla PHP SOAP web service

I'm a coldfusion developer but I've been handed a Joomla website (PHP) with a login page. The login form submission must call a login webservice.

So, I've activated the Joomla login module and am thinking about how to wire it up to the webservice. I've spent a day trying to locate some info and help without success.

The login webservice returns SessionID - a key which must be passed along with any other webservice calls on the website. So, the login is the starting point.

The webservice request and response look like this:

POST /proxy/dataaccess.asmx HTTP/1.1
Host: portal.compass.net.nz
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Login xmlns="http://portal/dataaccess.asmx">
      <LogonType>int</LogonType>
      <UserName>string</UserName>
      <Password>string</Password>
    </Login>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length


<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <LoginResponse xmlns="http://portal/dataaccess.asmx">
      <LoginResult>
        <IsValid>boolean</IsValid>
        <ResponseCode>int</ResponseCode>
        <ResponseText>string</ResponseText>
        <SessionID>string</SessionID>
        <StaffID>int</StaffID>
        <PortalID>int</PortalID>
        <Roles>string</Roles>
        <Name>string</Name>
        <UserName>string</UserName>
      </LoginResult>
    </LoginResponse>
  </soap12:Body>
</soap12:Envelope>

At the moment, the system is working on an ASP setup with DLLs, but I'm porting it to a Joomla site. I don't know how difficult this is. It's all new to me. I'll pay someone to help me with this if necessary or point me to your amazon wishlist and I'll buy something on it for you. Essentially I need to know how to call this webservice in a Joomla template in PHP and have the webservice return the SessionID.

there is a file joomla_root\\libraries\\joomla\\user\\user.php

The data from login form eventually comes there. In that file there is a function bind . I think you have to hook your web service request there.

If that doesn't work for you, I suggest you to join joomla development list . There are lots of joomla experts there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM