Constructing soap request from Java for remoting

Discussion in 'Developers' Forum' started by Petr Šponer, Dec 8, 2019.

  1. Petr Šponer

    Petr Šponer New Member HowtoForge Supporter

    Hi. Constructing soap request from Java for remoting API I got stuck. I was able to perform login to obtain results for a trivial query. But when I want to add new client I’m getting a bit strange error. Any advice how to properly construct the request XMLs (likely is a problem with the parameters for function)?

    Down there is the request and response XMLs:


    ISP Config


    HTML:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope
    
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:client_add="https://isp-master2.pojem.cz:8080/remote/">
    
    <SOAP-ENV:Header/>
    
    <SOAP-ENV:Body>
    
        <client_add>
    
            <SessionID>3753e97279a93588f7d0a979daf86c28</SessionID>
    
            <usertheme>default</usertheme>
    
            <country>CZ</country>
    
            <password>test159487</password>
    
            <contact_name>test1</contact_name>
    
            <web_php_options>no</web_php_options>
    
            <template_master>1</template_master>
    
            <gender>m</gender>
    
            <company_name>test1</company_name>
    
            <language>cz</language>
    
            <ssh_chroot>no</ssh_chroot>
    
            <email>[email protected]</email>
    
            <username>Testovic</username>
    
        </client_add>
    
    </SOAP-ENV:Body>
    
    </SOAP-ENV:Envelope>
    
    
    
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    
        <SOAP-ENV:Body>
    
            <SOAP-ENV:Fault>
    
                <faultcode>database_error</faultcode>
    
                <faultstring>Column 'gender' cannot be null INSERT INTO `client` (`company_name`, `gender`,
    
                    `contact_firstname`, `contact_name`, `customer_no`, `username`, `language`, `usertheme`, `street`,
    
                    `zip`, `city`, `state`, `country`, `telephone`, `mobile`, `fax`, `email`, `internet`, `icq`, `vat_id`,
    
                    `company_id`, `bank_account_owner`, `bank_account_number`, `bank_code`, `bank_name`,
    
                    `bank_account_iban`, `bank_account_swift`, `notes`, `paypal_email`, `locked`, `canceled`, `added_date`,
    
                    `added_by`, `template_master`, `template_additional`, `default_mailserver`, `mail_servers`,
    
                    `limit_maildomain`, `limit_mailbox`, `limit_mailalias`, `limit_mailaliasdomain`,
    
                    `limit_mailmailinglist`, `limit_mailforward`, `limit_mailcatchall`, `limit_mailrouting`,
    
                    `limit_mailfilter`, `limit_fetchmail`, `limit_mailquota`, `limit_spamfilter_wblist`,
    
                    `limit_spamfilter_user`, `limit_spamfilter_policy`, `default_xmppserver`, `xmpp_servers`,
    
                    `limit_xmpp_domain`, `limit_xmpp_user`, `limit_xmpp_muc`, `limit_xmpp_anon`, `limit_xmpp_vjud`,
    
                    `limit_xmpp_proxy`, `limit_xmpp_status`, `limit_xmpp_pastebin`, `limit_xmpp_httparchive`,
    
                    `default_webserver`, `web_servers`, `limit_web_domain`, `limit_web_quota`, `web_php_options`,
    
                    `limit_cgi`, `limit_ssi`, `limit_perl`, `limit_ruby`, `limit_python`, `force_suexec`, `limit_hterror`,
    
                    `limit_wildcard`, `limit_ssl`, `limit_ssl_letsencrypt`, `limit_web_aliasdomain`, `limit_web_subdomain`,
    
                    `limit_ftp_user`, `limit_shell_user`, `ssh_chroot`, `limit_webdav_user`, `limit_backup`,
    
                    `limit_directive_snippets`, `default_dnsserver`, `dns_servers`, `limit_dns_zone`,
    
                    `default_slave_dnsserver`, `limit_dns_slave_zone`, `limit_dns_record`, `limit_client`,
    
                    `default_dbserver`, `db_servers`, `limit_database`, `limit_database_user`, `limit_database_quota`,
    
                    `limit_cron`, `limit_cron_type`, `limit_cron_frequency`, `limit_traffic_quota`, `limit_openvz_vm`,
    
                    `limit_openvz_vm_template_id`, `limit_aps`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
    
                    `sys_perm_group`, `sys_perm_other`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    
                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    
                    NULL, NULL, 'n', 'n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    
                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'n', 'n', 'n', 'n', 'n', 'n', 'n',
    
                    NULL, NULL, NULL, NULL, NULL, 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n', NULL, NULL, NULL, NULL,
    
                    NULL, NULL, 'n', 'n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    
                    NULL, NULL, NULL, NULL, NULL, NULL, '1', '1', 'riud', 'riud', '')
    
                </faultstring>
    
            </SOAP-ENV:Fault>
    
        </SOAP-ENV:Body>
    
    </SOAP-ENV:Envelope>
    
     

Share This Page