Showing posts with label StorMan. Show all posts
Showing posts with label StorMan. Show all posts

Wednesday, April 30, 2014

StorMan Webservice API PHP Integration

StorMan WS_AddContact Webservice API Integration using PHP NuSoap wsdl client library.

StorMan WS_AddContact Method Documentation.
http://www.storman.com/api/WS_AddContact.pdf

StorMan API documents
http://my.storman.com/support/knowledgebase/onlineservices/api.php

PHP NuSoap Library
http://sourceforge.net/projects/nusoap/ 

Source Code

<?php
/**
 * Name         : StorMan - WS_AddContact Webservice
 * Description  : StorMan Webservice API Integration using PHP NuSoap wsdl client library. 
 * Author       : Ryan Tipones
 * Version      : 0.1
 * Author URI   : http://wpmigrator.wordpress.com
 * StorMan Reference Docs : http://www.storman.com/api/WS_AddContact.pdf
 *  
 */
require_once 'lib/nusoap.php';
 
/* Your StorMan Endpoint Server Url*/
$endPointUrl = "http://ipaddressofStorMancomputer:19812/4dwsdl"; $client = new nusoap_client( $endPointUrl, true); $err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2>' . $err;
}
$result = $client->call("WS_AddContact", 
        array(
                'WS_CTFacility'     => '', 
                'WS_CTContactName'  => '', 
                'WS_CTTitle'        => '', 
                'WS_CTFirstName'    => '', 
                'WS_CTUserName'     => '', 
                'WS_CTMailAddress'  => '', 
                'WS_CTMailCity'     => '', 
                'WS_CTMailState'    => '', 
                'WS_CTMailZIPCode'  => '', 
                'WS_CTMailCountry'  => '', 
                'WS_CTContactPhone' => '', 
                'WS_CTPhoneBus'     => '', 
                'WS_CTMobilePhone'  => '', 
                'WS_CTEmailAddress' => '', 
                'WS_CTOrganization' => '',                 
                'WS_CTMarketSrce'   => '', 
                'WS_CTCustType'     => '', 
                'WS_CTCategory'     => '', 
                'WS_CTStoredBefore' => '', 
                'WS_CTStoredGoods'  => '', 
                'WS_CTWhenRequired' => '', 
                'WS_CTExpDuration'  => '', 
                'WS_asQTAnalysisCode' => array(), 
                'WS_asQTSize'           => array(), 
                'WS_asQTUnitTypeCode'   => array(), 
                'WS_asQTNote'           => array(), 
                'WS_asQTPrice'          => array(), 
                'WS_CTOldContactNo'     => '', 
                'WS_WebServicePassword' => '' 
            )
        );
/* Debug */
if ($client->fault) {
    echo '<h2>Fault</h2>';
        print_r($result);
} else {
    // Check for errors
    $err = $client->getError();
    if ($err) {
        // Display the error
        echo '<h2>Error</h2>' . $err . '';
    } else {
        // Display the result
        echo '<h2>Result</h2>';
        print_r($result);
  
    }
}



Genesis Framework for WordPress