Are there spaces induced in XML created using Flex?
Hi All,
I am developing an extension for ID CS above using Flash Builder 4.6, Extension Builder 2.1.
My extension requires some sample output in the form of xml files. These xml files are then parsed by some software at the client's end.
The xml is created using the XML class of Flex.
The problem is that there are some spaces induced in the xml when a child is added to a node. For eg,
<root>
<Child>
Os enis eium es
<Child1 some_attributes>q</fo:inline>
<Child1 some_attributes>u</fo:inline>
<Child1 some_attributes>a</fo:inline>
<Child1 some_attributes>s</fo:inline>
evelit lab ipicto et volut
<Child1 some_attributes>user/firstname</fo:inline>
doluptus.
</Child>
<Child>As dis</Child>
</root>
When I examine the above xml, I see that there are some spaces before "Os enis eium es". I was taking them for the indentation that xml uses to distinguish between parent and child. Is this xml okay?
The expected output at the client's end is coming all wrong, it contains spaces and I suspect whether the xml might have some problem.
Please guide.
The XML you posted isn't valid, it has mis-matching open and close tags...
Flash will add format spacing to XML output if XML.prettyPrinting=true. You might try setting that to false before sending the XML.
Similar Messages
-
Manipulating XML file using flex 2.0
Hi,
how to add contents in to xml file using flex 2.0, ie i
actually wants to write data in to a xml file, so that data to be
appended at the end of the file.
KumarYou can't! Well, at least Flex cannot do this. All Flex can
do is send this data -- any data -- to the server and it's up to
you how you want to append this data to a file on the server.
You see, flex can't write to local files. If you looking for
client side file manipulation, take a look at Flex's desktop
brother call AIR!
ATTA -
Graphics using graphic API are drawn below the loaded content created using Flash authoring tool
Here is my problem.
I am developing a Analog Dial component. Here , I am
extending UIComponent and loading a swf file generated using Flash
CS3 authoring tool ( the swf basically has the circle and needle)
and adding the loaded content as child of Dial class.
Next I use Graphics API to draw the major and minor ticks on
the dial.
As mentioned in the curveTo method of flash.display.Graphics
class documentation (
http://livedocs.adobe.com/flex/201/langref/index.html),
if you are using graphics api and also loading content created
using the flash authoring environment the vector graphics will be
drawn underneath the loaded content.
Well , Is there any way to make the graphics appear on top of
the loaded contents?It appears that this may be accomplished more easily if I do something similar to the StrobeMediaPlayback implementation. Looking at the StrobeMediaPlayback source code it looks like Adobe has done something a little different than their ControlBarPlugin, placing the controlbar and root media element inside separate MediaContainers and then adding those containers to the display list. Is this recommended over using the frameworks ParallelElements? If so, is communication between the control bar and root media element still a matter of just updating the target reference via metadata?
-
Are there any examples for programmatically creating OBR 11g rules?
I am looking for some examples about how to use the API to create rules from Java code as the SDK documentation is very terse. Are there examples out there for creating rules?
m_userName wrote:
When you create items in IB, they always appear at a default size (table view cells and nav bars have a height of 44, etc.). Is there anywhere to access these constants in code, for when you are creating elements programmatically?
Not that I know of.
When I want the default dimensions for IB Library objects, I generally drag the objects of interest out of the Library, and read the dimensions manually in the Size Inspector. In fact, when I want to create a view programmatically, I often lay it out in IB, then use the Size inspector to get the frame of each subview.
\- Ray -
Are there any updates so i can use my HP Photosmart C4780 All in One Printer wirelessly?
just wondering..are there any updates for the iMac with OS X (10.8.2) so I can use my HP Photosmart C4780 All in One (Print,Scan,Copy)?
Hi,
An HP Full Feature Software is not available for Mountain Lion, therefore the Wireless configuration is tricky and cannot be done through the software.
To connect the printer to your wireless network you will need to create a temporary wireless ad hoc connection, then the wireless connection to your router can be configured via the EWS page:
Step one: Restore the printer's network default settings
Touch the ATM button ( ) next to Wireless / Scan .
Touch the ATM button ( ) next to Wireless Menu .
Touch the ATM button ( ) next to Wireless Settings .
Use the up and down ATM buttons ( ) to select Restore Network Defaults , and then press OK .
Touch the ATM button ( ) next to Yes to confirm your selection.
Step two: Networkly connect the Mac to the printer by creating a temporary ad-hoc connection
From the Mac, click the Wi-Fi icon.
Click Join other network.
Click Show Networks.
Select the printer's SSID, it should be listed as HPSETUP or should contain HP or C4700 within its name.
Click Connect
Allow two-three minutes to fully establish the network connection.
Step three: Connect the printer to your router via the EWS page
Open Safari.
Click the Bookmarks icon ()
Click Bonjour.
Double click the printer name, the EWS page appears.
Open the Networking tab.
From the left pane select Wireless.
Click the Start Wizard button and follow the steps to connect the printer to your router.
Step four: Reconnect the Mac to your router
From the Mac, click the Wi-Fi icon.
Click Join other network.
Click Show Networks.
Select your router SSID.
Click Connect
Allow two-three minutes to fully establish the network connection.
Now the printer should be connected to your network.
Open Print & Scan, click the Plus sign and add the printer listed as Bonjour.
btw John Galt - I this it should be spelled as OS X, please correct me if i'm wrong.. ;-)
Hope that helps,
Shlomi -
Macbook Pro trackpad will not click so I am unable to log in. Are there any suggestions to fix this? Can I use keystrokes to log in and potentially solve the problem?
Try SMC and NVRAM resets:
http://support.apple.com/en-us/HT201295
http://support.apple.com/en-us/HT204063
Then try a Safe boot:
http://support.apple.com/en-us/HT201262
Ciao. -
Are there any widgets availble for creating a to-read list from web pages?
I frequently find myself wanting to read specific pdf's or web page content but not having the time to do it when I find them. It would be lovely to have an easy to use storage space for them on the dashboard as I frequently use it keep myself on task.
I know there are a wealth of apps that can save pdf content for later viewing (yojimbo, evernote, etc ..) but I'm specifically wondering if there is anything that either integrates those tools into the dashboard or just has a stand alone widget.
Having the ability to "send to" from any browser to this widget for easy transfer and possible storage would be key.I just hand code my HTML forms because I know what I'm doing. But if you prefer to use the Insert Panel > Forms tab, you'll need to check out this HTML5 forms tutorial by David Powers.
Making HTML5 Forms in DW CC (video)
http://tv.adobe.com/watch/learn-dreamweaver-cc/html5-forms-workflow/
Next, use CSS to style your form labels, legends, fieldsets, input fields and submit button. See example below, view source in browser to see the code.
http://alt-web.com/TEST/Basic-HTML5form-jquery.html
Now that you have your HTML form, you need a script to gather, validate and process the form data. Ask your hosting provider if they have a form-to-email script you can use. Many hosts have scripts already on their servers which you can activate from your C-Panel or by referencing the script in your form's action attribute.
<form action="path-to-form-on-server/form-to-email-script.php">
If your host doesn't have scripts you can use, find out which server-side programming languages your server supports -- PHP, ASP, ASP.net, Perl, etc.. This dictates what kind of scripts you can use.
Ideally, you want to find a script that is a) secure, b) hides your e-mail address from robots and c) has built in spam prevention.
http://foundationphp.com/tutorials/email.php
Nancy O. -
Are There Any Other Speakers You Can Use with MacPro Besides 5.1?
I have Logitech Z5500 speakers on my PowerMac G5 and I wanted to get speakers for the MacPro but not the 5.1 speakers because I don't want to crowd it up with 5 more speakers. But it seems like the only speakers that have the optical port are the 5.1 speakers and they don't have 2 optical ports to support both computers.
Do I have any other choices? Any ideas??
MacPro 2.66 ghz, Macbook Pro, Macbook, PowerMac G5 Dual Core Mac OS X (10.4.7)Glad to have been of service.
Why reward points?(Quoted from Discussions Terms of Use.)
The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values. -
Why are bookmarks generated intermittently when PDF created using EXCEL VBA?
I have Windows 7 installed and Acrobat Pro 9 installed. There is an EXCEL application that creates PDFs successfully. Howver, bookmarks are generated sometimes and sometimes they are not generated. This happens without changing any code. I am at my wits end and would appreciate any assistance. Here is the code:
Function PDF_PRINTING_2007()
Dim V_NBR_OF_RPTS As Integer
Dim stdPrinter As String
Dim Prints, z, n As Integer
Dim pdfile, pdtitle As Boolean
Dim V_RPT_ARRAY(800) As String
Dim V_RPT_PAGES_ARRAY(800) As Long
Application.ScreenUpdating = False
V_NBR_OF_RPTS = 0
Erase V_RPT_ARRAY
Erase V_RPT_PAGES_ARRAY
V_PLANT_SUMMARY = ""
Sheets("TABLE OF CONTENTS").Activate
V_TOC_LAST_ROW = Cells(65536, 7).End(xlUp).Row
V_TOC_ROW = 5
Do Until V_TOC_ROW > V_TOC_LAST_ROW
If Cells(V_TOC_ROW, 7) = "Y" Then
V_RPT = Cells(V_TOC_ROW, 2).Value
If V_RPT = "PLANT SUMMARY" Then
V_PLANT_SUMMARY = "Y"
End If
If V_RPT = UCase("SUMMARY CAGE & HOIST") Or V_RPT = UCase("PLANT SUMMARY") Then
Else
V_NBR_OF_RPTS = V_NBR_OF_RPTS + 1
V_RPT_ARRAY(V_NBR_OF_RPTS) = V_RPT
V_RPT_PAGES_ARRAY(V_NBR_OF_RPTS) = Cells(V_TOC_ROW, 6)
End If
End If
V_TOC_ROW = V_TOC_ROW + 1
Loop
Sheets("SYS - USER INTERFACE").Activate
V_RPT_PERIOD = Cells(1, 1)
V_PLANT_NBR = Cells(1, 2)
V_PLANT_NAME = Cells(1, 3)
Set AcroApp = CreateObject("AcroExch.App")
Set PDBookmark = CreateObject("AcroExch.PDBookmark")
Set avDoc = CreateObject("AcroExch.AVDoc")
Set pdDoc1 = CreateObject("AcroExch.PDDoc")
Set pdDoc2 = CreateObject("AcroExch.PDDoc")
'Print Worksheets to PDF Files
stdPrinter = Application.ActivePrinter
'Commented out next line for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
' Application.ActivePrinter = "Acrobat PDFWriter on LPT1:"
AppendIni ("C:\temp\Sheet1.pdf")
'Commented out next line for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
'Sheets("COVER SHEET").PrintOut
'Added the next 3 lines for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
Sheets("COVER SHEET").Activate
PageSetupFitToPage
SaveToPDF ("C:\temp\Sheet1.pdf")
pdDoc1.Open ("C:\temp\Sheet1.pdf")
pdDoc1.SetInfo "Title", "Cover Sheet"
pdDoc1.Save 1, "C:\temp\Sheet1.pdf"
pdDoc1.Close
' The "TABLE OF CONTENTS" worksheet contains color. Reset it to black and white.
Application.DisplayAlerts = False
On Error Resume Next
Worksheets("SYS - PDF WS").Delete
'EOB change for Priority #12--Arial named range dialog box error
' Comment out alert below
' Application.DisplayAlerts = True
'EOB change for Priority #12 end
Sheets("TABLE OF CONTENTS").Copy Before:=Sheets("SYS - USER INTERFACE")
ActiveSheet.Name = "SYS - PDF WS"
'EOB change for Priority #12--Arial named range dialog box error
' insert alert below
Application.DisplayAlerts = True
'EOB change for Priority #12 end
Sheets("TABLE OF CONTENTS").Activate
V_TOC_ROW = 5
Do Until V_TOC_ROW > V_TOC_LAST_ROW
If Cells(V_TOC_ROW, 7) = "Y" Then
V_RPT_NAME = Cells(V_TOC_ROW, 2)
Cells(V_TOC_ROW, 2).Clear
Cells(V_TOC_ROW, 2) = V_RPT_NAME
End If
V_TOC_ROW = V_TOC_ROW + 1
Loop
Cells.Select
Selection.Font.Color = vbBlack
Selection.Interior.Color = vbWhite
AppendIni ("C:\temp\Sheet2.pdf")
'Commented out next line for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
'Sheets("TABLE OF CONTENTS").PrintOut
'Added the next 3 lines for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
Sheets("TABLE OF CONTENTS").Activate
PageSetupFitToPageWidth
SaveToPDF ("C:\temp\Sheet2.pdf")
pdDoc2.Open ("C:\temp\Sheet2.pdf")
pdDoc2.SetInfo "Title", "Table of Contents"
pdDoc2.Save 1, "C:\temp\Sheet2.pdf"
pdDoc2.Close
Application.DisplayAlerts = False
Worksheets("TABLE OF CONTENTS").Delete
Sheets("SYS - PDF WS").Copy Before:=Sheets("TEMPLATE TBL OF CONTENTS")
ActiveSheet.Name = "TABLE OF CONTENTS"
Worksheets("SYS - PDF WS").Delete
Application.DisplayAlerts = True
Prints = 3
If V_PLANT_SUMMARY = "Y" Then
Sheets("PLANT SUMMARY").Activate
Sheets("PLANT SUMMARY").PageSetup.LeftFooter = Now()
Sheets("PLANT SUMMARY").PageSetup.CenterFooter = "#" & V_PLANT_NBR & " " & V_PLANT_NAME & Chr(13) & V_RPT_PERIOD
'Sheets("PLANT SUMMARY").PageSetup.RightFooter = "Page 1"
'eob change start here--Change #9 comment out page numbers
'Sheets("PLANT SUMMARY").PageSetup.RightFooter = "Page " & Prints
'eob change end
AppendIni ("C:\temp\Sheet" & Prints & ".pdf")
'Commented out next line for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
'Sheets("PLANT SUMMARY").PrintOut
'Added the next 2 lines for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
Sheets("PLANT SUMMARY").Activate
SaveToPDF ("C:\temp\Sheet" & Prints & ".pdf")
pdDoc2.Open ("C:\temp\Sheet" & Prints & ".pdf")
pdDoc2.SetInfo "Title", "PLANT SUMMARY"
pdDoc2.Save 1, "C:\temp\Sheet" & Prints & ".pdf"
pdDoc2.Close
Prints = Prints + 1
End If
V_RPT = 1
On Error Resume Next 'DO NOT REMOVE THIS LINE
Do Until V_RPT > V_NBR_OF_RPTS
v_sheet_name = V_RPT_ARRAY(V_RPT)
Sheets(v_sheet_name).Activate
Sheets(v_sheet_name).PageSetup.LeftFooter = Now()
Sheets(v_sheet_name).PageSetup.CenterFooter = "#" & V_PLANT_NBR & " " & V_PLANT_NAME & Chr(13) & V_RPT_PERIOD
'eob change start here--Change #9 comment out page numbers
'Sheets(v_sheet_name).PageSetup.RightFooter = "Page " & Prints
'eob change end
AppendIni ("C:\temp\Sheet" & Prints & ".pdf")
'Commented out next line for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
'Sheets(V_SHEET_NAME).PrintOut
'Added the next 2 lines for Acrobat 8.x - 1/29/2008 - CR24709 and WP25089
If v_sheet_name = "EXPLANATION OF PLANT VARS" Then
PageSetupFitToPageWidth
End If
SaveToPDF ("C:\temp\Sheet" & Prints & ".pdf")
pdDoc2.Open ("C:\temp\Sheet" & Prints & ".pdf")
pdDoc2.SetInfo "Title", v_sheet_name
pdDoc2.Save 1, "C:\temp\Sheet" & Prints & ".pdf"
Sheets(v_sheet_name).DisplayPageBreaks = False
Prints = Prints + 1
pdDoc2.Close
V_RPT = V_RPT + 1
Loop
Kill ActiveWorkbook.Path & "\New Costbook.pdf"
'Consolidate PDF Files
On Error GoTo Err1
pdfile = avDoc.Open("C:\temp\Sheet1.pdf", "Window Title")
Set pdDoc1 = avDoc.GetPDDoc
AcroApp.MenuItemExecute ("NewBookmark")
pdtitle = PDBookmark.GetByTitle(pdDoc1, "Untitled")
pdtitle = PDBookmark.SetTitle("Cover Sheet")
pdDoc1.Save 1, ActiveWorkbook.Path & "\New Costbook.pdf"
For z = 2 To Prints
n = pdDoc1.GetNumPages()
pdDoc2.Open ("C:\temp\Sheet" & z & ".pdf")
If pdDoc2.GetNumPages() <> 0 Then
pdDoc1.InsertPages n - 1, pdDoc2, 0, pdDoc2.GetNumPages(), False
Set avPageView = avDoc.GetAVPageView()
avPageView.GoTo (n)
AcroApp.MenuItemExecute ("NewBookmark")
pdtitle = PDBookmark.GetByTitle(pdDoc1, "Untitled")
pdtitle = PDBookmark.SetTitle(pdDoc2.GetInfo("Title"))
pdDoc2.Close
pdDoc1.Save 1, "C:\temp\Sheet1.pdf"
Else
pdDoc2.Close
End If
Next z
avPageView.GoTo (0)
pdDoc1.SetPageMode (3)
pdDoc1.Save 1, ActiveWorkbook.Path & "\New Costbook.pdf"
pdDoc1.Close
Set AcroApp = Nothing
Set PDBookmark = Nothing
Set avDoc = Nothing
Set pdDoc1 = Nothing
Set pdDoc2 = Nothing
Application.ScreenUpdating = True
Sheets("SYS - USER INTERFACE").Activate
AppActivate "Microsoft Excel"
MsgBox "File Saved As: " & ActiveWorkbook.Path & "\New Costbook.pdf", vbInformation
Application.ActivePrinter = stdPrinter
Kill "C:\temp\Sheet*.pdf"
Exit Function
Err1:
AppActivate "Microsoft Excel"
MsgBox Err.Description
Application.ActivePrinter = stdPrinter
End FunctionAcrobat Scripting Forum http://forums.adobe.com/community/acrobat/acrobat_scripting
or more likely
Acrobat SDK Developer Forum http://forums.adobe.com/community/acrobat/acrobat_sdk -
How to ignore white space when parse xml document using xerces 2.4.0
When I run the program with the xml given below the following error comes.
Problem parsing the file.java.lang.NullPointerExceptionjava.lang.NullPointerExce
ption
at SchemaTest.main(SchemaTest.java:25)
============================================================
My expectation is "RECEIPT". Pls send me the solution.
import org.apache.xerces.parsers.DOMParser;
import org.xml.sax.InputSource;
import java.io.*;
import org.xml.sax.ErrorHandler;
import org.w3c.dom.*;
public class SchemaTest {
public static void main (String args[])
try
FileInputStream is = new FileInputStream(new File("C:\\ADL\\imsmanifest.xml"));
InputSource in = new InputSource(is);
DOMParser parser = new DOMParser();
//parser.setFeature("http://xml.org/sax/features/validation", false);
//parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "memory.xsd");
//ErrorHandler errors = new ErrorHandler();
//parser.setErrorHandler(errors);
parser.parse(in);
Document manifest = parser.getDocument();
manifest.normalize();
NodeList nl = manifest.getElementsByTagName("organization");
System.out.println((((nl.item(0)).getChildNodes()).item(0)).getFirstChild().getNodeValue());
catch (Exception e)
System.out.print("Problem parsing the file."+e.toString());
e.printStackTrace();
<?xml version = '1.0'?>
<organizations default="detail">
<organization identifier="detail" isvisible="true">
<title>RECEIPT</title>
<item identifier="S100000" identifierref="R100000" isvisible="true">
<title>Basic Module</title>
<item identifier="S100001" identifierref="R100001" isvisible="true">
<title>Objectives</title>
<metadata/>
</item>
</item>
<metadata/>
</organization>
</organizations>
Is there a white space problem? How do I get rid from this problem.ok now i really wrote the whole code, a bit scrolling in the API is to hard?
DocumentBuilderFactory dbf = new DocumentBuilderFactory();
DocumentBuilder db = dbf.newDocumentBuilder();
dbf.setNamespaceAware(true); //or set false
Document d = db.parse(inputstream); -
how do I view the photos ? I backed up with iPhoto closed as recommended but when I enter the Time Machine and click on iPhoto library it calculates there is 11gb in there so files must be present but when i click on open with iPhoto nothing happens ? any help welcome please !!??
The external hard drive must connect to your Mac using a USB or FireWire connection.
Note that the hard drive must be formatted in Mac OS Extended (Journaled) to work correctly with the iPhoto Library and be backed up to the Time Capsule and with the backups of your Mac.
We are really talking about iPhoto uses here, so you should post in the iPhoto Support area for more details about this. The link is just below.
iPhoto for Mac -
My buttons dont work and i wanted to know if there are any substitues that i can use with the home button.
Nope, it either needs to be plugged in or turned on with the power button.
A replacement iPhone 4 is $149, but at least the whole phone is replaced. -
Hi, it's me again.
I've checked the encoder response in MAX (-ve ccw, +ve cw) and it seems fine. But when the motor moves MAX will generate a following error message. Is my encoder causing the problem or have I made a mistake in the settings? I've checked the connections to the encoder and they are all correctly wired.Could there be other causes of following errors?
The motor does stop earlier when I reduced the following error value, so I'm assuming that the motor stops only when it has reached the set number of following errors and NOT because the motor has reached the target position. Any help is greatly appreciated.
Thank you.It may be that the 7344 is missing encoder values, or that the motor isn't tuned correctly. The first thing I'd like for you to check is that the Encoder Counts per Revolution input to the Axis Settings menu in MAX is set correctly (I believe it defaults to 2000 counts). To check this, you can rotate the motor by hand one revolution to see how many counts have accumulated. Most encoders are either 2000 counts per rev or 4000 counts per rev.
Once you have that confirmed, autotune the motors and make sure the values for Kp, Kd, and Ki are resonable. (Kd is often around 10x Kp) Once these are set, start your motors moving slowly and observe the following error. This can be seen under the Advanced tab of the 1D Interactive menu. If it is slowly incrementing, t
hen your're missing counts. If it is negative, then the encoder phases may be backward. If there is no following error, or the count stays constant, then try increasing the speed. It could just be that your encoder sends pulses too fast for the 7344 to read.
Let me know how it goes.
Kyle V -
Why are there CORBA error messages -- COMM_FAILURE when using the orb obj?
Hi Guys,
I followed the tutorial http://download.oracle.com/javase/6/docs/technotes/guides/idl/GShome.html
compiled and run the code. Everything works fine however whenever I use the ORB orb object I get the following message
both in my Naming Service and the HelloServer output:
2010-12-10 12:35:46.505 FINE Transport to 127.0.1.1:44100: stream closed on read < 0
2010-12-10 12:35:46.506 FINE ServerGIOPConnection to 127.0.1.1:44100 (ec4a87): getMessage() -- COMM_FAILURE
2010-12-10 12:35:46.507 FINE ServerGIOPConnection to 127.0.1.1:44100 (ec4a87): streamClosed()
2010-12-10 12:35:46.508 FINE ServerGIOPConnection to 127.0.1.1:44100 (ec4a87): close()
Why is this happening?
I have also installed jacorb and added it to my class path and run the examples with:
jaco -Djacorb.config.dir=. -DORBid=HelloClient HelloServer
ns -Djacorb.naming.ior_filename=/home/zorg/Project/Java/CORBA/NameService/NS_Ref
jaco -Djacorb.config.dir=. -DORBid=HelloClient HelloClient
I have included the code from the tutorial for convinience:
// HelloServer.java
// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;
import java.util.Properties;
class HelloImpl extends HelloPOA {
private ORB orb;
public void setORB(ORB orb_val) {
orb = orb_val;
// implement sayHello() method
public String sayHello() {
return "\nHello world !!\n";
// implement shutdown() method
public void shutdown() {
orb.shutdown(false);
public class HelloServer {
public static void main(String args[]) {
try{
// create and initialize the ORB
ORB orb = ORB.init(args, null);
// get reference to rootpoa & activate the POAManager
POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootpoa.the_POAManager().activate();
// create servant and register it with the ORB
HelloImpl helloImpl = new HelloImpl();
helloImpl.setORB(orb);
// get object reference from the servant
org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
Hello href = HelloHelper.narrow(ref);
// get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
// Use NamingContextExt which is part of the Interoperable
// Naming Service (INS) specification.
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
// bind the Object Reference in Naming
String name = "Hello";
NameComponent path[] = ncRef.to_name( name );
ncRef.rebind(path, href);
System.out.println("HelloServer ready and waiting ...");
// wait for invocations from clients
orb.run();
catch (Exception e) {
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
System.out.println("HelloServer Exiting ...");
// Copyright and License
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
public class HelloClient
static Hello helloImpl;
public static void main(String args[])
try{
// create and initialize the ORB
ORB orb = ORB.init(args, null);
// get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
// Use NamingContextExt instead of NamingContext. This is
// part of the Interoperable naming Service.
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
// resolve the Object Reference in Naming
String name = "Hello";
helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));
System.out.println("Obtained a handle on server object: " + helloImpl);
System.out.println(helloImpl.sayHello());
helloImpl.shutdown();
} catch (Exception e) {
System.out.println("ERROR : " + e) ;
e.printStackTrace(System.out);
}Edited by: 819887 on 10-Dec-2010 04:51
Edited by: 819887 on 10-Dec-2010 04:58Figure out the actual problem is when the naming service is resolving the name on line:
helloImpl = HelloHelper.narrow(ncRef.resolve_str(name)); -
Are there any DAQmx examples available for use with pci 6229 M series card?
I have been searching around for examples which work with the pci 6229 M series DAQ card. Most examples do not list this card as applicable and the one I have found gives an error. Is there anywhere specifically available, what I am particularly interested in is seeing an analogue channel being triggered by another analogue channel reaching a certain value.
Thanks
KevinHi Kejoglo,
You are right in the fact that the M-Series card is newer than LabVIEW (and therefore the examples that are shipped with it) and therefore the example finder doesn't list the M-Series cards in the list of available hardware.
Basically though, the M-Series cards work with DAQmx and not Traditional DAQ so if you just go into the example finder and search under Hardware Input and Output>>DAQmx and choose an example from that folder to run on your M-Series card. As long as you don't try to do anything outside of the specifications of your card (which I doubt you will do) then you shouldn't have any trouble running any of the DAQmx examples on an M-Series card.
Hope this helps, if you still have problems then please feel free to write back.
Best regards,
Peter H
Applications Engineer
National Instruments UK
Maybe you are looking for
-
External USB storage no longer recognized by kernel [SOLVED]
If I plug in an external USB thumb drive, my system no longer sees it. -gdisk and fdisk do not see it -gparted cannot see it -thunar cannot see it I have a USB mouse and keyboard that work just fine. Here is my dmesg. You can see in the last line t
-
How to create variants for a sequence-f​ile?
Hello, i have a testplan with custom teststeps. Each step has a new field with type "container" and name "myData", Inside of this container are numeric, string and bool parameter. The parameter inside this container are used to execute the teststep.
-
Powerbook G4 17" 1.67ghz found in trash
About a month ago I found this laptop in a trash can all in pieces. When I saw it I gathered up all the pieces I could find and took it home. I managed to piece it together nicely. I am only missing the sound ribbon cable. As well as the superdrive,
-
Creating a cresent shape illustrator.
I have been assigned the task in creating a logo with a cresent shape moon in a logo. I did it in photoshop but realised that for scaling it wont work in printing on materials in the future. I needed a clean cut look. So right now, I have my logo mad
-
ATV2 not working, shows only slide show.
First problem was that a push of the remote's menu button provided three blue blinks on the machine, but nothing on the TV screen. Did a simple reset, same problem. Shut down modem, Airport Extreme, & did reset. Got the ATV menu for about 10 seconds;