Add lines to a PO with the PO API
Hello All,
Has anyone out there used the PO API to interface lines into an existing PO?
Can this even be done?
Thanks for any help,
Bradley
.
Similar Messages
-
We can't add a decimal number column with the create table forms
In the version 4, we can't add a decimal number column with the create table forms.
In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer. -
Whenever I open firefox a add ons screen comes up with the yahoo web page behind it. . I just want the Yahoo web page and do not want to close the add ons page every time I use my computer.
I don't know what else to say about this. It is a screen that comes up in its own window everytime I open FirefoxPlease check your home page setting and see if about:addons is listed. If it is, please remove it
https://support.mozilla.com/en-US/kb/How+to+set+the+home+page -
Love the Adobe products first. OK , I have my instructional coaches creating power point presentation add audio to each slide with the presenter 10 add ins. I need these presentation converted into MP4 like you can do with adobe presenter video creator.
If you import the PPT deck into Captivate it will not bring the audio from Presenter. But you can import it into Captivate after the slide deck has been imported. The audio files aren't necessarily named in a logical fashion in the source files for the presentation, so I would recommend that you publish the presentation locally and then find the 'data' folder in the published output and the audio files will be named in a way that you can infer the slide they are associated with. Not the simplest proceedure but it should be pretty painless.
-
Can I create a cert with the Java API only?
I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some other means, to be included in the server's trust store.
I know how to generate a key pair with an associated self-signed cert via keytool, but I'd prefer to do it directly with the Java APIs. From looking at the Javadocs, I can see how to generate a keypair and how to generate a cert object using an encoded representation of the cert ( e.g. java.security.cert.CertificateFactory.generateCertififcate() ).
But how can I create this encoded representation of the certificate that I need to provide to generateCertificate()? I could do it with keytool and export the cert to a file, but is there no Java API that can accomplish the same thing?
I want to avoid having the user use keytool. Perhaps I can execute the appropriate keytool command from the java code, using Runtime.exec(), but again a pure java API approach would be better. Is there a way to do this all with Java? If not, is executing keytool via Runtime.exec() the best approach?There is no solution available with the JDK. It's rather deficient wrt certificate management, as java.security.cert.CertificateFactory is a factory that only deals in re-treads. That is, it doesn't really create certs. Rather it converts a DER encoded byte stream into a Java Certificate object.
I found two ways to create a certificate from scratch. The first one is an all Java implementation of what keytool does. The second is to use Runtime.exec(), which you don't want to do.
1. Use BouncyCastle, a free open source cryptography library that you can find here: http://www.bouncycastle.org/ There are examples in the documentation that show you how to do just about anything you want to do. I chose not to use it, because my need was satisfied with a lighter approach, and I didn't want to add a dependency unnecessarily. Also Bouncy Castle requires you to use a distinct version with each version of the JDK. So if I wanted my app to work with JDK 1.4 or later, I would have to actually create three different versions, each bundled with the version of BouncyCastle that matches the version of the target JDK.
2. I created my cert by using Runtime.exec() to invoke the keytool program, which you say you don't want to do. This seemed like a hack to me, so I tried to avoid it; but actually I think it was the better choice for me, and I've been happy with how it works. It may have some backward compatibility issues. I tested it on Windows XP and Mac 10.4.9 with JDK 1.6. Some keytool arguments changed with JDK versions, but I think they maintained backward compatibility. I haven't checked it, and I don't know if I'm using the later or earlier version of the keytool arguments.
Here's my code.
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import javax.security.auth.x500.X500Principal;
import javax.swing.JOptionPane;
public class CreateCertDemo {
private static void createKey() throws IOException,
KeyStoreException, NoSuchAlgorithmException, CertificateException{
X500Principal principal;
String storeName = ".keystore";
String alias = "keyAlias";
principal = PrincipalInfo.getInstance().getPrincipal();
String validity = "10000";
String[] cmd = new String[]{ "keytool", "-genKey", "-alias", alias, "-keyalg", "RSA",
"-sigalg", "SHA256WithRSA", "-dname", principal.getName(), "-validity",
validity, "-keypass", "keyPassword", "-keystore",
storeName, "-storepass", "storePassword"};
int result = doExecCommand(cmd);
if (result != 0){
String msg = "An error occured while trying to generate\n" +
"the private key. The error code returned by\n" +
"the keytool command was " + result + ".";
JOptionPane.showMessageDialog(null, msg, "Key Generation Error", JOptionPane.WARNING_MESSAGE);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(new FileInputStream(storeName), "storePassword".toCharArray());
//return ks from the method if needed
public static int doExecCommand(String[] cmd) throws IOException{
Runtime r = Runtime.getRuntime();
Process p = null;
p = r.exec(cmd);
FileOutputStream outFos = null;
FileOutputStream errFos = null;
File out = new File("keytool_exe.out");
out.createNewFile();
File err = new File("keytool_exe.err");
err.createNewFile();
outFos = new FileOutputStream(out);
errFos = new FileOutputStream(err);
StreamSink outSink = new StreamSink(p.getInputStream(),"Output", outFos );
StreamSink errSink = new StreamSink(p.getErrorStream(),"Error", errFos );
outSink.start();
errSink.start();
int exitVal = 0;;
try {
exitVal = p.waitFor();
} catch (InterruptedException e) {
return -100;
System.out.println (exitVal==0 ? "certificate created" :
"A problem occured during certificate creation");
outFos.flush();
outFos.close();
errFos.flush();
errFos.close();
out.delete();
err.delete();
return exitVal;
public static void main (String[] args) throws
KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException{
createKey();
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
//Adapted from Mike Daconta's StreamGobbler at
//http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
public class StreamSink extends Thread
InputStream is;
String type;
OutputStream os;
public StreamSink(InputStream is, String type)
this(is, type, null);
public StreamSink(InputStream is, String type, OutputStream redirect)
this.is = is;
this.type = type;
this.os = redirect;
public void run()
try
PrintWriter pw = null;
if (os != null)
pw = new PrintWriter(os);
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line=null;
while ( (line = br.readLine()) != null)
if (pw != null)
pw.println(line);
System.out.println(type + ">" + line);
if (pw != null)
pw.flush();
} catch (IOException ioe)
ioe.printStackTrace();
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.security.auth.x500.X500Principal;
public class PrincipalInfo {
private static String defInfoString = "CN=Name, O=Organization";
//make it a singleton.
private static class PrincipalInfoHolder{
private static PrincipalInfo instance = new PrincipalInfo();
public static PrincipalInfo getInstance(){
return PrincipalInfoHolder.instance;
private PrincipalInfo(){
public X500Principal getPrincipal(){
String fileName = "principal.der";
File file = new File(fileName);
if (file.exists()){
try {
return new X500Principal(new FileInputStream(file));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}else{
return new X500Principal(defInfoString);
public void savePrincipal(X500Principal p) throws IOException{
FileOutputStream fos = new FileOutputStream("principal.der");
fos.write(p.getEncoded());
fos.close();
}Message was edited by:
MidnightJava
Message was edited by:
MidnightJava -
Create a Navigational Hierarchy for filtering with the Table API
Hello,
I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
It works great but i dont know How to make the hirarchey to show the key and the text.
Please Advice.
DavidHi Kenneth,
please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
Also check whether you have a javascript error.
Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
Heike -
Revision: 13228
Revision: 13228
Author: [email protected]
Date: 2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
Log Message:
Updating ExamplePlayer to work with the latest API changes.
Modified Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
Added Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
Removed Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.asRevision: 13228
Revision: 13228
Author: [email protected]
Date: 2009-12-30 04:33:34 -0800 (Wed, 30 Dec 2009)
Log Message:
Updating ExamplePlayer to work with the latest API changes.
Modified Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/chromeless/ChromelessPl ayerElement.as
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextElement.as
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as
Added Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextDisplayObjectT rait.as
Removed Paths:
osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/text/TextViewTrait.as -
Formatted Search defined on an item added with the UI API
Hello,
I have added an Edit Text with the UI API on the Sales Orders form. It is visible and enable.
I have linked a Formatted Search to this Edit Text.I have indicated to refresh the value on Supplier Name changed.
I have linked the same formatted search to the Remarks field with the same conditions of launching.
When I change the BP name, the formatted search on theremarks field is launched, but the formatted search on the Edit Text is not launched.
Why the formatted search on the Edit Text is not launched when the condition for refresh is true?
Thanks for your help.
Best regards,Hi,
This is a simple Edit Text which is not bound.
I can launch manually the formatted search, but it is not launch automatically!
It seems that SBO can't launch automatically FS on user forms and user items.
I have tried to define a FS on the Fixed Asset master data form and you can only launch the Formatted search manually. -
Hi,
I am facing a problem with the lms API in the standard scorm
html file included in captivate 1.
most of the scos I have created with Captivate 1 for one of
my courses contain several animations.
so I have modified the scorm.html template in order so that
each animation is able to call a javascript which will replace the
object tag. The javascript gives the name of the captivate movie
that has to be loaded and displayed.
the first movie runs well, and sends the usual api commands
to the lms. at the end of the movie, a javascript is called, with
the name of the next animation to be run.
that works perfectly, but from that moment, the animations
are not able to send api commands to the lms.
of course, I intercept the LMSCommit and LMSFinish commands
and the cmi.core.lesson_status is set to incomplete.
but still the problem and I don't understand why.
does anyone have a solution to solve this issue ?
thanks for help
oldJaypeeIs there any debugging mode you can use in the LMS to see
what's happening?
Perhaps your second animation is re-initiating the
LMS_initialize
function, which could be throwing it off?
Really hard to say if you can't see what's going on 'behind
the scenes'.
Erik
oldJayPee wrote:
> the first movie runs well, and sends the usual api
commands to the lms. at the
> end of the movie, a javascript is called, with the name
of the next animation
> to be run.
> that works perfectly, but from that moment, the
animations are not able to
> send api commands to the lms.
> of course, I intercept the LMSCommit and LMSFinish
commands and the
> cmi.core.lesson_status is set to incomplete.
Erik Lord
http://www.capemedia.net
Adobe Community Expert - Authorware
http://www.adobe.com/communities/experts/
http://www.awaretips.net -
samples, tips, products, faqs, and links!
*Search the A'ware newsgroup archives*
http://groups.google.com/group/macromedia.authorware -
The title says it all, I'm not really sure if this is the proper place to post this as it's not a "bug" per se. I noticed on the list of bugs "fixed" in Firefox 10 scrolling more than one line with the arrow keys was one of them. I know a lot of people hated the one-line thing too so I'd suggest in future releases it should be a preference we can change.
You can right-click either Back or Forward button to open the tab history list.
-
I can't figure ou thow to add music from Itunes to my iPhone. I don't want to sync them, I prefer to select the files/music etc I want on my phone?
In Windows 7, iTunes 11, When you connect your device, and drag a file or multiple files to the right part of iTunes and a screen will appear with the playlist and the devices connected. Hope this will help you!
-
Calling a stored procedure with the DI API in 6.5
Hi,
Is it possible to do this? I have the following lines of code...
sSQL = "EXEC sp_AgedDebtForCustomerStatement"
oRecordset.DoQuery sSQL
This procedure runs fine in SQL Query Analyzer and the query generator in B1. When I use it in my VB app, it just crashes, without returning any error message.
I have tested the exact same app on a 2004 version with no issues.
Is it possible to use stored procs with the 650098 DI API?
Thanks for any help,
RobinHi Frank,
Thanks for your reply.
Regarding the points you make...
1) I have come across this before and thought it would be different.
2) I am using error handling - that is what is so strange - it justs completely bombs out at that line.
3) I tried this with the same result/error.
I may just run the query not using the DI API - could be my only option.
Thanks,
Robin -
Creating sandboxes with the admin api
I'm trying to write some code that creates sandboxes through
the admin api. For these sandboxes, I want to only enable a
specific set of functions. Unfortunately, when you create a sandbox
with getSecuritySandboxes, it enables all functions by default. I
therefore need to disable all the securable functions before
enabling the ones I trust. I've run into two problems in doing
this, and wondered if anyone had any advice.
1) The api provides a function called
getSecurableCFFunctions, which is meant to return all the functions
that can be secured. Unfortunately, the function list returned by
this function is not complete - it is missing createobject(com),
createobject(corba), createobject(java), createobject(webservice),
getgatewayhelper and sendgatewaymessage. There's no way of finding
out the enabled functions for a sandbox, so I've currently had to
resort to disabling all the functions returned by
getSecurableCFFunctions and then adding in the ones that I know are
missing. This approach is likely to be broken when future releases
of CF add new securable functions.
2) I use setDisabledCFFunction to disable functions, but can
find no way of disabling createobject(com), createobject(corba),
createobject(java) or createobject(webservice) with this function.
When I try, it throws an exception with this message: "This
function can not be added to the restricted function list.". These
functions are in the function list in the administrator, and I can
add them there. Is there any way of securing them through the api?
Any advice appreciated!
Thanks,
MaxSet up a "template" sandbox that has the permissions you
want, say E:\template. Then I think this will work:
obSandbox =
createObject("component","cfide.adminapi.security");
arDefaultSandbox = obSandbox.getSecuritySandboxes (
"E:\template" );
obSandbox.setSecuritySandbox ( directory = SandboxDirectory,
sandbox = arDefaultSandbox["E:\template"] ); -
Unknown Error when working with the GWObject API
Hello,
in a given environment, we've ancountered an Exception with the
Message-Text "An Unknown Error has occured", being thrown in various
Methods of the Object API. Does anyone know what the reason for these
Exceptions might be?
24.11.2009 19:30:16 Error An unknown error occurred.
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at GroupwareTypeLibrary.DIGWFormattedText.get_PlainTe xt()
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.FillMessageFields(GWMessage
gwmsg, Message3 fullmsg, GroupWiseRetrievalSettings Settings,
GroupWiseRetrievalFilter Filter)
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.GetMessage(QuickMessage2
qmsg, GroupWiseRetrievalSettings settings, GWFolder[]
enclosingFoldersForFiltering)
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.CollectMessages(ArrayList
gwmsgs)
24.11.2009 19:11:41 Error An unknown error occurred.
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at GroupwareTypeLibrary.DIGWQuickMessage2.get_Message ()
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.GetMessage(QuickMessage2
qmsg, GroupWiseRetrievalSettings settings, GWFolder[]
enclosingFoldersForFiltering)
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.CollectMessages(ArrayList
gwmsgs)
25.11.2009 21:26:30 Error An unknown error occurred.
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at GroupwareTypeLibrary.DIGWMessages.Add(Object Class, Object Type,
Object Version)
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMail(GWMail
message, Mail5 draftmsg)
at
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMessage(GWMessage
message)
at
com.vivex.archiveconnector.groupwise.Agent.Archive Message(GWMessage msg,
User user, Group group, ArchiveSettings archSettings,
GroupWiseArchiveFilter arcFilter)
Best regards, Martin Schmidt.That error is too generic.
It is reported in 100's or places.
We would need steps to duplicate the problem.
>>> On Friday, November 27, 2009 at 7:11 AM, Martin
Schmidt<[email protected]> wrote:
> Hello,
>
> in a given environment, we've ancountered an Exception with the
> Message‑Text "An Unknown Error has occured", being thrown in various
> Methods of the Object API. Does anyone know what the reason for these
> Exceptions might be?
>
> 24.11.2009 19:30:16 Error An unknown error occurred.
> at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
> BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
> msgData)
> at GroupwareTypeLibrary.DIGWFormattedText.get_PlainTe xt()
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.FillM
> essageFields(GWMessage
> gwmsg, Message3 fullmsg, GroupWiseRetrievalSettings Settings,
> GroupWiseRetrievalFilter Filter)
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.GetMe
> ssage(QuickMessage2
> qmsg, GroupWiseRetrievalSettings settings, GWFolder[]
> enclosingFoldersForFiltering)
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.Colle
> ctMessages(ArrayList
> gwmsgs)
>
> 24.11.2009 19:11:41 Error An unknown error occurred.
> at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
> BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
> msgData)
> at GroupwareTypeLibrary.DIGWQuickMessage2.get_Message ()
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.GetMe
> ssage(QuickMessage2
> qmsg, GroupWiseRetrievalSettings settings, GWFolder[]
> enclosingFoldersForFiltering)
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.Colle
> ctMessages(ArrayList
> gwmsgs)
>
> 25.11.2009 21:26:30 Error An unknown error occurred.
> at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
> BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
> msgData)
> at GroupwareTypeLibrary.DIGWMessages.Add(Object Class, Object Type,
> Object Version)
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMa
> il(GWMail
> message, Mail5 draftmsg)
> at
>
com.vivex.archiveconnector.groupwise.GroupWiseInte rfaces.OAPIGroupWise.AddMe
> ssage(GWMessage
> message)
> at
> com.vivex.archiveconnector.groupwise.Agent.Archive Message(GWMessage msg,
> User user, Group group, ArchiveSettings archSettings,
> GroupWiseArchiveFilter arcFilter)
>
> Best regards, Martin Schmidt. -
Can you retrieve contact custom made fields with the BC API?
I have added Custom Fields atatched to my Contact CRM
I can ContactList_Retrieve the contacts list but would like to add the custom fields attached to each contact..
but so far had no success yet! Is it possible?Thanks Liam!
Got them.
Also is it possible to retrieve contact list not with the last update date but created date?
and can we pass a range date?
as i have found that it is quite slow if you go back in time, as it downloads all the records until the present time.
Maybe you are looking for
-
anyone know a script, plugin or any other way of placing multiple pictures / objects at once the same way Indesign CS3 does? ie.. selecting 5 epicures and clicking 5 times instead of: file>place select photo - put in document file>place select photo
-
Guidance on Storing Environmental Variables
Let me try to explain the problem I'm having, and a few different solutions I've explored. I'm using Tomcat. I have a directory structure like: /opt/apache-tomcat/webapps/beta.mysite.com/WEB-INF/classes/Functions/ The Functions package contains diffe
-
I read that patch 119254-49 SunOS 5.10: Install and Patch Utilities Patch fixes the zones on zfs problem. Is that so? I can't find anything in the patch description that confirms the fix. Thanks
-
During client copy tabels missing
hello, while client copy from production server to quality server , error occured tables missing . plz help me. regards mohsin +919867577675
-
Passing arguments to main method from a shell script
The main method of my class accept more than 10 arguments so my shell script execute this class like this : java -cp xxxx mypackage.MyClass $* The problem is that some of those arguments allows spaces. When i execute this script like this : myscript.