How to fully configure a receiver location with FILE transport type with powershell


hello trying configure receive location object keep getting next error:


could not validate transporttypedata, address or public address properties receive location
'test.receiveloc.biztalktounix'. invalid value property "receivefolder".

+     $biztalkom.savechanges()
+     ~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : notspecified: (:) [], btsexception
    + fullyqualifiederrorid : btsexception

i dont know object has "receivefolder property, can help?  code have:

function createreceivelocation( $receiveport, [string]$receivelocname, $biztalkom, [string]$suffix)  {  	#check receive location doesn't exist  	if ($receiveport.receivelocations["$receivelocname.receiveloc.$suffix"] -eq $null)  	{  		write-host "attempting create <$receivelocname.receiveloc.$suffix>"		  		  	  		#create new receive location  		$myreceiveloc = $receiveport.addnewreceivelocation()  	  		#check type of protocol use  		if ($suffix -eq "unixtobiztalk")  		{  			$mytype = "sftp"  		}  		else  		{  			$mytype = "file"  		}	  		#append receiveloc suffix name  		$myreceiveloc.name = "$receivelocname.receiveloc.$suffix"  		  		#assign handler  		foreach($receivehandler in $biztalkom.receivehandlers)  		{  		   if($receivehandler.transporttype.name -eq $mytype)  		   {  			  $myreceiveloc.receivehandler = $receivehandler;  			  break;  		   }  		}  		#associate transport protocol , uri receive location.  		foreach ($protocoltype in $biztalkom.protocoltypes)  		{  		   if($protocoltype.name -eq $mytype)  		   {  			    			  $myreceiveloc.transporttype =  $protocoltype;  			  break;  		   }  		}  		#=== assign first receive pipeline found process message. ===#  		foreach ($pipeline in $biztalkom.pipelines)  	    {  			if ($pipeline.type -eq [microsoft.biztalk.explorerom.pipelinetype] "receive")  			{  				$myreceiveloc.receivepipeline = $pipeline  				break;  			}  		}  		  		  		#save uri  		$myreceiveloc.address = "/home.$suffix"  		  		$myreceiveloc.enable = $false  		#$biztalkom.savechanges()  		return 0  	}  	else  	{  		write-host "receivelocation<$receivelocname> exists"  		return -1  	}  }

i think replied on similar  thread here. your transporttypedata needs have valid value.

if create 1 receive location manually, export binding file , open xml, can see receivelocationtransporttypedata has <customprops>. need assign

also, below incorrect:

$myreceiveloc.address = "/home.$suffix"

needs point physical file path or sftp path want listen.


if answers question please mark answer , if post helpful, please vote helpful. !




BizTalk Server  >  BizTalk Server General



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'