Home » getUserByLoginUserName

getUserByLoginUserName

Description

Gets user with given login user name

Attributes

FieldTypeDescriptionRequiredAccepted value
userNameStringThe user login name trueA valid user login name

Samples

Java

import com.zedo.zapi.*;
import com.zedo.zapi.ZEDOAPIStub.*;
import javax.xml.namespace.QName;

import org.apache.axis2.AxisFault;

public class getUserAll {

 public static void main(String[] args) {
 getUserAll.getUserAllTest();
 }

 private static void getUserAllTest() {
 
 try {
 
 ZEDOAPIStub stub = new ZEDOAPIStub("http://api.zedo.com/v8/?wsdl&java");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "user", "zedoapi"),"example@example.com");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "password", "zedoapi"),"password");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "network", "zedoapi")"525");
 stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10 * 60 * 1000);
 
 GetUserByLoginUserName gu = new GetUserByLoginUserName();
 gu.setUserName("exmple123@example123.com");
 
 User u = stub.getUserByLoginUserName(gu).get_return();
 
 System.out.println("GET_USER COMPLETE!");
 System.out.println("PLEASE: " + u.getId() + " " + u.getLogin() + " "+u.getPassword());
 
 
 } catch (Exception e) {
 System.err.println("ERROR: GET_USER_ALL FAILED!");
 System.err.println("Exception: " + e.getMessage());
 if (e instanceof AxisFault) {
 AxisFault af = (AxisFault) e;
 System.err.println("AxisFault's detail: " + af.getDetail());
 af.printStackTrace();
 } else {
 e.printStackTrace();
 }
 }
 }
}

PHP

include_once './zlib/ZEDOAPI.php';

 /**
 *Create Client Stub
 */
 $config = Array();
 $config['location'] = 'http://api.zedo.com/v8/?wsdl&php'; //URL of the SOAP server to send the request to
 $config['exceptions'] = true; //Enable Exception Handling

 $stub = new ZEDOAPI($config);

 $header = Array();
 $header[0] = new SoapHeader('http://api.zedo.com','user', 'example@example.com');
 $header[1] = new SoapHeader('http://api.zedo.com','password', 'password');
 $header[2] = new SoapHeader('http://api.zedo.com','network','525');
 $header[3] = new SoapHeader('http://api.zedo.com','callinfo','zapiCall');

 $stub->__setSoapHeaders($header);

 /**
 *Define Call Parameters
 */
 $user_name = "example123@example123.com";
 $param = new GetUserByLoginUserName($user_name);

 /**
 *Execute API Call
 */
 try {
 $response = $stub->getUserByLoginUserName($param);
 } catch (SoapFault $ex) {
 var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
 echo "GET USER FAILED\n";
 die();
 }

 /**
 * Response
 */
 $tmp = new getUserByLoginUserNameResponse($response);
 $user = $tmp->return;
 echo "GET USER COMPLETE - RESPONSE : \n";
 print_r($user);

SOAP

Request

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
<zedoapi:user xmlns:zedoapi="http://api.zedo.com">example@example.com</zedoapi:user>
<zedoapi:password xmlns:zedoapi="http://api.zedo.com">password</zedoapi:password>
<zedoapi:network xmlns:zedoapi="http://api.zedo.com">525</zedoapi:network>
</soapenv:Header>
<soapenv:Body>
<ns5:getUserByLoginUserName xmlns:ns5="http://zapi.zedo.com">
<ns5:userName>example123@zedo.com</ns5:userName>
</ns5:getUserByLoginUserName>
</soapenv:Body>
</soapenv:Envelope>

Response

 <?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getUserByLoginUserNameResponse xmlns:ns="http://zapi.zedo.com">
<ns:return xmlns:ax21="http://base.zedo.com/xsd" xmlns:ax22="http://util.zedo.com/xsd" xmlns:ax25="http://soap.reportengine.zedo.com/xsd" xmlns:ax24="http://client.api.zedo.com/xsd" type="com.zedo.api.client.User">
<ax24:browserLanguageTypeId>1</ax24:browserLanguageTypeId>
<ax24:campaigns xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:contact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>ExampleTest</ax24:firstName>
<ax24:lastName>testing</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:contact>
<ax24:id>27527</ax24:id>
<ax24:login>example123@zedo.com</ax24:login>
<ax24:password>password123</ax24:password>
<ax24:roleId>53245</ax24:roleId>
<ax24:status>A</ax24:status>
</ns:return>
</ns:getUserByLoginUserNameResponse>
</soapenv:Body>
</soapenv:Envelope>