ECGrid Forums  

Go Back   ECGrid Forums > Electronic Commerce > ECGridOS > ECGridOS Developer

ECGridOS Developer Development related posts.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2014, 02:19 PM
jeremydegardeyn jeremydegardeyn is offline
New Member
 
Join Date: Mar 2014
Posts: 7
Default ECGridOS with php/ linux

Hello,

I'm a newb when it comes to using web references. What I'd really like to do is setup ECGridOS to run from php our linux server. I'm looking into this but if someone wants to say don't bother before I do too much running in circles, it would be appreciated. On the other hand, though I don't mind VB.NET, I'd much rather integrate ECGridOS into our intraweb. If anyone has insight on running ECGridOS on php/linux or shared this experience, please post. I'll post any findings as well.

Jeremy
Reply With Quote
  #2  
Old 03-18-2014, 03:19 PM
Todd Gould's Avatar
Todd Gould Todd Gould is offline
Loren Data Corp.
 
Join Date: May 2005
Location: Loren Data Corp.
Posts: 303
Send a message via Skype™ to Todd Gould
Default

Jeremy:

I have not connected PHP directly to ECGridOS, so I can't help here; however, I know others have. I'll bounce this off Alan to get someone to help.

-=tg=-
Reply With Quote
  #3  
Old 03-19-2014, 04:16 PM
jeremydegardeyn jeremydegardeyn is offline
New Member
 
Join Date: Mar 2014
Posts: 7
Default Php soap

Ok, so I've found out that after version 5.1 or so, SOAP classes are native to php.

Between the manual, PHP SOAP examples, and drilling into the ECGridOS function specs at https://ecgridos.net/v3.0/beta/ecgridos.asmx, things start to come together much easier.

PHP SOAP manual: http://www.php.net/manual/en/book.soap.php

Example Code:
Code:
<?
$soapClient=new SoapClient("https://ecgridos.net/v3.0/prod/ECGridOS.asmx?wsdl");
$login_param=array('LoginName'=><USERID>,'Password'=><PWORD>); $err=0; try{$info=$soapClient->Login($login_param);}catch(SoapFault $fault){$err=1; print("alert('ERROR: ".$fault->faultcode."-".$fault->faultstring."');");}
if($err==0)
{
	$session_id=$info->LoginResult;
	if($session_id>'')
	{
		// Small subset of functions just to give an idea

		/*
		// Get info
		$who=$soapClient->WhoAmI(array('SessionID'=>$session_id));
		print_r($who);
		*/

		/*
		// List trading partners
		$trading_partners=$soapClient->TPList(array('SessionID'=>$session_id,'ShowInactive'=>0));
		print_r($trading_partners);
		*/

		/*
		// Upload file
		$f='/var/www/Mods/CS/edi/test.edi';
		if(file_exists($f))
		{
			$upload_param=array('SessionID'=>$session_id,'FileName'=>'test.edi','Bytes'=>filesize($f),'Content'=>file_get_contents($f));
			$parcel_upload=$soapClient->ParcelUpload($upload_param);
			echo $parcel_upload->ParcelUploadResult;
		}
		*/

		/*
		// Parcel Inbox
		$parcel_inbox=$soapClient->ParcelInBox(array('SessionID'=>$session_id));
		print_r($parcel_inbox);
		*/
		

		// Logout
		$logout=$soapClient->Logout(array('SessionID'=>$session_id));
	}
	else
	{
		// Record the transaction error in the database
		// Kill the link to Soap
		unset($soapClient);
	}
}
?>
Reply With Quote
  #4  
Old 03-19-2014, 05:19 PM
Todd Gould's Avatar
Todd Gould Todd Gould is offline
Loren Data Corp.
 
Join Date: May 2005
Location: Loren Data Corp.
Posts: 303
Send a message via Skype™ to Todd Gould
Default

Jeremy,

Thank you for posting this. It will be very helpful to others.

-=tg=-
Reply With Quote
Reply

Tags
linux, php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ECGridOS v3.0 PRODUCTION! Todd Gould ECGridOS Developer 2 03-26-2013 11:35 AM
Sneak Peek of ECGridOS v3.0 Todd Gould ECGridOS Developer 2 08-21-2012 10:15 AM
Upgrade from ECGridOS 2.2 to 2.3 JesCar ECGridOS Developer 6 10-25-2011 02:08 PM
ECGridOS v2.1 (Build 6) Coming Soon Todd Gould ECGridOS Developer 0 07-28-2009 05:24 PM


All times are GMT -4. The time now is 12:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
ECGrid® is a registered service mark of Loren Data Corp.