<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Remotely calling a stored process from stand-alone Java app in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Remotely-calling-a-stored-process-from-stand-alone-Java-app/m-p/63564#M3217</link>
    <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I've been spending some time on trying to remotely access a stored process using foundation services. Unfortunately, I have not succeeded in connecting remotely to the stp service. The client I'm using is a standalone java-application, so I am &lt;B&gt;not&lt;/B&gt; working from an application container.&lt;BR /&gt;
&lt;BR /&gt;
So far, I've managed to be able to get an overview of the services available for remote discovery. Most of the deployment related stuff is based on an example found in the SAS samples (http://support.sas.com/kb/26/005.html):&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
//establish connection to metadata server and deploy services&lt;BR /&gt;
		final String applicationDeploymentName = "Remote Services";&lt;BR /&gt;
		final String[] deploygroups = new String[]{ "BIP Remote Services OMR","BIP Stored Process Service"};&lt;BR /&gt;
		&lt;BR /&gt;
		Set deploys = new HashSet();&lt;BR /&gt;
		deploys.add(deploygroups[0]);&lt;BR /&gt;
		deploys.add(deploygroups[1]);&lt;BR /&gt;
		&lt;BR /&gt;
		MetadataSourceInterface metadataSource = null;		&lt;BR /&gt;
		// Create a metadata source for an Open Metadata Repository&lt;BR /&gt;
		final String serverIdentityPassword = SasPasswordString.encode(&lt;BR /&gt;
				SasPasswordString.SAS001_ENCODING,  SERVER_IDENTITY_PASSWORD);&lt;BR /&gt;
&lt;BR /&gt;
		metadataSource = new OMRMetadataSource(SERVER_HOST, SERVER_PORT,&lt;BR /&gt;
				SERVER_IDENTITY_ID, serverIdentityPassword,&lt;BR /&gt;
				SERVER_REPOSITORY_NAME, applicationDeploymentName, deploys&lt;BR /&gt;
				);&lt;BR /&gt;
&lt;BR /&gt;
		// Obtain the discovery service&lt;BR /&gt;
		discoveryService = DiscoveryService.defaultInstance();&lt;BR /&gt;
&lt;BR /&gt;
		// Deploy the remote services using the created metadata source.&lt;BR /&gt;
		ServiceLoader.lookupRemoteDiscoveryServices(metadataSource, discoveryService);&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
I then list the available services in the discovery service as follows:&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
// returns the discovery service&lt;BR /&gt;
// finds the first 20 services&lt;BR /&gt;
// ensure that all services are listed&lt;BR /&gt;
Services srv = mdsfc.getDiscoveryService().findServices(new ServiceTemplate(new Class[] { Object.class}), 20, null); &lt;BR /&gt;
Iterator it = srv.iterator();&lt;BR /&gt;
			while(it.hasNext())&lt;BR /&gt;
			{				 &lt;BR /&gt;
				 System.out.println(it.next().toString());&lt;BR /&gt;
			}&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
Much to my dismay, only the following proxies are in the list:&lt;BR /&gt;
&lt;BR /&gt;
- com.sas.services.session.SessionServiceProxy&lt;BR /&gt;
- com.sas.services.security.AuthenticationServiceProxy&lt;BR /&gt;
- com.sas.services.discovery.RemoteDiscoveryServiceProxy&lt;BR /&gt;
- com.sas.services.information.InformationServiceProxy&lt;BR /&gt;
- com.sas.services.user.UserServiceProxy&lt;BR /&gt;
- com.sas.services.logging.LoggingServiceProxy&lt;BR /&gt;
&lt;BR /&gt;
The Stored process service is not in the list, even though it is defined in the platform service registry. Without the proxy to the stored process service I cannot execute my stored process. The other services are found and approachable.&lt;BR /&gt;
&lt;BR /&gt;
The questions are a) what conditions does the stored process service have to meet in order to be listed in the discovery service and b) how should I configure my services deployment to have the stp service listed?&lt;BR /&gt;
&lt;BR /&gt;
It could, of course, still be that I am deploying the services incorrectly. If this approach is completely wrong, please let me know. Documentation on this topic is slightly obscure, imho.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
regards,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
WG</description>
    <pubDate>Mon, 01 Dec 2008 09:00:54 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-12-01T09:00:54Z</dc:date>
    <item>
      <title>Remotely calling a stored process from stand-alone Java app</title>
      <link>https://communities.sas.com/t5/Developers/Remotely-calling-a-stored-process-from-stand-alone-Java-app/m-p/63564#M3217</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I've been spending some time on trying to remotely access a stored process using foundation services. Unfortunately, I have not succeeded in connecting remotely to the stp service. The client I'm using is a standalone java-application, so I am &lt;B&gt;not&lt;/B&gt; working from an application container.&lt;BR /&gt;
&lt;BR /&gt;
So far, I've managed to be able to get an overview of the services available for remote discovery. Most of the deployment related stuff is based on an example found in the SAS samples (http://support.sas.com/kb/26/005.html):&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
//establish connection to metadata server and deploy services&lt;BR /&gt;
		final String applicationDeploymentName = "Remote Services";&lt;BR /&gt;
		final String[] deploygroups = new String[]{ "BIP Remote Services OMR","BIP Stored Process Service"};&lt;BR /&gt;
		&lt;BR /&gt;
		Set deploys = new HashSet();&lt;BR /&gt;
		deploys.add(deploygroups[0]);&lt;BR /&gt;
		deploys.add(deploygroups[1]);&lt;BR /&gt;
		&lt;BR /&gt;
		MetadataSourceInterface metadataSource = null;		&lt;BR /&gt;
		// Create a metadata source for an Open Metadata Repository&lt;BR /&gt;
		final String serverIdentityPassword = SasPasswordString.encode(&lt;BR /&gt;
				SasPasswordString.SAS001_ENCODING,  SERVER_IDENTITY_PASSWORD);&lt;BR /&gt;
&lt;BR /&gt;
		metadataSource = new OMRMetadataSource(SERVER_HOST, SERVER_PORT,&lt;BR /&gt;
				SERVER_IDENTITY_ID, serverIdentityPassword,&lt;BR /&gt;
				SERVER_REPOSITORY_NAME, applicationDeploymentName, deploys&lt;BR /&gt;
				);&lt;BR /&gt;
&lt;BR /&gt;
		// Obtain the discovery service&lt;BR /&gt;
		discoveryService = DiscoveryService.defaultInstance();&lt;BR /&gt;
&lt;BR /&gt;
		// Deploy the remote services using the created metadata source.&lt;BR /&gt;
		ServiceLoader.lookupRemoteDiscoveryServices(metadataSource, discoveryService);&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
I then list the available services in the discovery service as follows:&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
// returns the discovery service&lt;BR /&gt;
// finds the first 20 services&lt;BR /&gt;
// ensure that all services are listed&lt;BR /&gt;
Services srv = mdsfc.getDiscoveryService().findServices(new ServiceTemplate(new Class[] { Object.class}), 20, null); &lt;BR /&gt;
Iterator it = srv.iterator();&lt;BR /&gt;
			while(it.hasNext())&lt;BR /&gt;
			{				 &lt;BR /&gt;
				 System.out.println(it.next().toString());&lt;BR /&gt;
			}&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
Much to my dismay, only the following proxies are in the list:&lt;BR /&gt;
&lt;BR /&gt;
- com.sas.services.session.SessionServiceProxy&lt;BR /&gt;
- com.sas.services.security.AuthenticationServiceProxy&lt;BR /&gt;
- com.sas.services.discovery.RemoteDiscoveryServiceProxy&lt;BR /&gt;
- com.sas.services.information.InformationServiceProxy&lt;BR /&gt;
- com.sas.services.user.UserServiceProxy&lt;BR /&gt;
- com.sas.services.logging.LoggingServiceProxy&lt;BR /&gt;
&lt;BR /&gt;
The Stored process service is not in the list, even though it is defined in the platform service registry. Without the proxy to the stored process service I cannot execute my stored process. The other services are found and approachable.&lt;BR /&gt;
&lt;BR /&gt;
The questions are a) what conditions does the stored process service have to meet in order to be listed in the discovery service and b) how should I configure my services deployment to have the stp service listed?&lt;BR /&gt;
&lt;BR /&gt;
It could, of course, still be that I am deploying the services incorrectly. If this approach is completely wrong, please let me know. Documentation on this topic is slightly obscure, imho.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
regards,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
WG</description>
      <pubDate>Mon, 01 Dec 2008 09:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Remotely-calling-a-stored-process-from-stand-alone-Java-app/m-p/63564#M3217</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-01T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Remotely calling a stored process from stand-alone Java app</title>
      <link>https://communities.sas.com/t5/Developers/Remotely-calling-a-stored-process-from-stand-alone-Java-app/m-p/63565#M3218</link>
      <description>Hi:&lt;BR /&gt;
  This question is the kind best answered by SAS Tech Support. They have the technology and expertise to investigate your configuration and code and replicate your code, if necessary.&lt;BR /&gt;
&lt;BR /&gt;
To open a track with Tech Support, go to &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt; and in the left-hand navigation pane, click on the link entitled "Submit a Problem". Or go to this link, directly, &lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt; &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 01 Dec 2008 14:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Remotely-calling-a-stored-process-from-stand-alone-Java-app/m-p/63565#M3218</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-01T14:17:18Z</dc:date>
    </item>
  </channel>
</rss>

