Jump to content

NeilA

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by NeilA

  1. I have made some methods that I invoke using REST. I have been helped to write a C# layer that converts SOAP calls to REST URI (long story , my team decided on SOAP over a year ago before I worked here, and that is that) any way I had a lot of trouble importing SOAP WSDL to do some calls back the other way so I built my own client using string manipulation and TCP vi's to send calls and collect the responses (these work well so far). This got me to thinking about making my own server! I was wondering if I could use a similar technique to the XML-RPC work in the code repository. There are similarities between the two protocols that make me think it could be possible. It sounds like hard work but my soap to REST implementation is a bit dodgy and I really don't like the way that I cant debug the methods through the calls as they are run in memory in a different instance. I had the REST implementation working fine but after making the SOAP client I found I needed a lot of tidying in my project and the REST implemention has not worked since. This is what once again highlighted the the debug issue when using REST. I would like to keep it simple by implementing my own server for SOAP and be done with aditional layers etc. The problem here is I had trouble after tidying the project what could happen after building an executable and moving machines etc. for the additional time spent now I may have a better more robust deliverable later. So, has anyone had similar experiences with REST and application instance issues( I was helped out a lot by guys on here before and followed the steps that were given to me then but to no end this time)? Has any one attempted to write there own SOAP Server? Do you think it may be possible to use some of the XML-RPC ideas to get a SOAP server running? Thanks in advance! Neil.
  2. I have a method that requires a Guid named UUID it has a property available in my imported webservice I can reference. However as the service I am talking to generates the UUID(guid) I simply need to return the UUID to confirm that we are still in the same test phase, in the same vein if they differ an error is flagged. My initialise method gives me a UUID, the initial identifier in a line of testing/method calls that is a string I extract from the xml in a request to my software. Could some one tell me how to change a string to guid or how to build a way to make the guid string I have accepted by the UUID refnum. I have attached a snippet of one of the methods below.
  3. QUOTE (TobyD @ Mar 18 2009, 09:25 PM) Thanks for your help, I had seen this before but dismissed it as I am using a webservice that is created in VS 2008 C# and therfore should be ok, but yet it still doesn't work. There seems to be little in the way of similarities between the methods that work and don't to offer me any clue to the problem as well. The person that wrote the webservice is not changing the parameter type to a reference type to see if it imports better. As a secondary question, the problem is that the import function does not seem to be able to work out what to do with the parameters need and makes the dll with the implementation of InitialiseComplete with only a refnum input for the input parameter for the method rather than a cluster imput for the object. I was wonering if I could use an Invoke node to build the parameter and feed it in to the method? My only problem is where to get the reference for the invoke node.
  4. I get the "The following errors/warnings occurred when generating the local proxy dll and VI wrappers for this web service." when ever I import the webservice that my colleague created. It suggests that three of the methods failed to be created InitialiseComplete </B>ExecutionComplete </B>SendResults It suggests:- 1. The VI under the specified path is write-protected. Remove the write-protected attribute and import the web service again. 2. A VI with the same name exists in memory. Close the VI and import the web service again to overwirte it. 3. The web service method that you use to create the wrapper VI has more than 12 parameters. I know it is not 2 or 3. I dont understand 1 if I delete the the folder before I try importing again how I can have a write protected VI. I think the error is occuring in the building of the dll. I have tried copying one of the method VI's and building the incompleted method VI's myself. When I try to access the data types from the dll they have not been created. These methods use complex data types that contain 2 types of simple data of 2 strings. Can LabVIEW utilise complex data types from the WSDL? It appears to pick up returnstatus which is another complex type in other methods so I think yes. I have added an excerpt of the WSDL to highlight the problem area I can attach the file as a text file if preferred. Can you see any problems? any suggestions? <s:element name="InitialiseComplete">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="initCompleteStatus" type="tns:InitialiseCompleteStatus" /> </s:sequence> </s:complexType> </s:element>- <s:complexType name="InitialiseCompleteStatus">- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Status" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Message" type="s:string" /> </s:sequence>
  5. It has taken me a while and a few iterations with the web service functions to get them up and together. But recently I have had problems stopping/removing services from localhost in the system manager. I have a load of my test webservices that I cant stop. It is not too much of a concern but I would to be able to stop my main webservice to ensure its definately being refreshed when I load it. Any ideas? there doesnt seem to be much help on this product or many posts anywhere. Also I have a web service that I have built that receives several different method calls and then each method decyfers the post data and puts it on to a queue ready for the executive to utilise it. Recently I added a method to the webservice and since then the small test routine I use that monitors the calls/queue wont pick up the queue. The webservice is working and the item gets queued (I can see that working) but the test vi doesnt seem to be in the same instance (although the thing in the bottom left says it is). I had this problem when I first started out as I did not fully understand instances. I have not changed anything in the programs just added a new method VI and added to the service in the build specifications. You can see why I am concerned by it possibly not updating the webservice when I build and deploy. Any suggestions? Thanks in advance. Neil.
  6. Thanks for all your replies. I agree that my situation is not great, but I have to say that in this current economic climate I am not too fussed to be reinventing the wheel just pleased to be employed lol! I am using queues to tranfer info and states between the executive and the TestVI's. The test its self is being ordered by building run time logic in to the states of the test VI's and I will pause by selecting the correct state. However, there is a requirement that may not be needed but should be implemented that will enable the user to pause execution of the test from the remote test controller. This could be possible by selecting pause as the next state but if I am in the middle of an important/damaging setup routine and there is something wrong it may not be good enough if you have to wait for the current state to finish. I have been told not to worry too much about this as often the abort or terminate states will be used which means I can implement the properties/methods in the replies above. I have attached the pause vi from the NI forum that I mentioned before, it is in labVIEW 5 format, I dont know if this is what I need or not as I cant open it. If anyone can help me with this in case it is what I need it would be great. I have also had a quick look again at VI server properties and I have found the Toolbar:visible property which is great for the debug control I can just place this VI server routine inside the debug login sub VI. Thanks again, Neil.
  7. Yeah I know, thanks! There has been a decision by people who dont necessarily know what they are talking about to move to LabVIEW from HT Basic which the executive was written in prevously. At the same time the previous system as a whole used to use Test Stand to control all of the ancillery equipment and the test execution using the HTBasic exec as an interface in remote mode. The company were not necessarily using test stand the way it is meant to be used and therefore have a dim veiw of its function in a properly set up test system. Long story short I am being paid to reinvent the wheel in terms of the executive. I do really need to find out how to programmatically control the sub VI's (test VI's) if I can. I understand you can run a VI in VI server but is there a way to get remote/run time control of the toolbar (where the run stop pause buttons are) and be able to show hide it at run time? Thanks.
  8. Hi, I need to be able to control a VI execution programmatically from my executive VI. Basically I have multiple tests that can be selected and I need to be able to have pause, stop, abort and continue control over the "Test VI's" programmatically. I found an example through google on the NI site for pause and resume but it would not load as it was made in labVIEW 5 or something. Is there a way of doing this? could I be right in thinking that it is possible using VI Server or active X? I would also like to be able to programmatically select if the toolbar is visible in the "Test VI's" based on if someone is logged in as a debugger or operator. Is this possible through VI property node? I have had a quick look and done a few searches on here and the net and come up blank. Knowing my luck its my ability to use google that at fault lol! Thanks in advance.
  9. I still have a problem with the NI system manager. I cant get some of my new webservice VIs to function correctly and I think it may be effecting them. As I build and try differnt web services it adds them to the web service list but if you try to delete them from the list you cant. Any ideas how I can take control of this? I did not know this function/program existed until recently when I started investigating web servers/services. Is there a way to re install just this function to start from fresh? Many thanks in advance. Neil.
  10. This used to work for me I could see my web servers in the web service section. I could restart and delete them, all the things you would expect but now I cant. I dont seem to have any control over them. This is not too much of a problem as I can see that when I re deploy a changed VI its session start time is updated but if I keep making new services the list will continue to grow. I have restarted the PC several times and the services are still there. Any ideas on how i can retake control of this?
  11. I have a web service running that I had some help with recently from the guys on here. It works fine, however after getting further in to the process I have a need to transfer some parameters in an XML type string. I understand from the help files that this should be done using POST protocol in the REST service but there is very little information to help understand how this is done. I have read some other non labview instruction and still cant understand how it is done. Any help would be great, Many Thanks in advance, Neil.
  12. Hi, I have managed to get it working. Ned your suggestion got me passed the open application reference issue but I then had an error from the open VI reference. For some strange reason that I can't work out it didn't like specifc naming of the VI's to work only if I used an '*' it finally worked. I am extremely happy something has gone right for me today as my motorbike was stolen over night. I must thank all those of you who helped specially NedK. I now have a Restful web service triggering a queue in the main program, perfect!
  13. OK I have added the options to the machine access and exported VI sections of the VI Server properties in My Computer. I didn't know those things existed hence why I missed it from your original post. I now get a proper error in the VI this is due to the fact that I was correct that my VI was not executing the case structure I have built is case sensitive but case defaults to lower when entered in the url bar of the browser. Now I have it selecting and running the case I get this error: - - <Response>- <Terminal> <Name>MTI out</Name> <Value>1.000000</Value> </Terminal>- <Terminal> <Name>Error</Name> <Value>Open VI Reference in RMS Webservice4.vi->RMS Webservice4.vi.ProxyCaller<APPEND> To load a VI into memory with the Open VI Reference function, a path must be wired for the VI Path input. VI Name: <b>Queue Item.vi</b></Value> </Terminal> </Response> I feel I am getting closer, the error asks for a full path however in the activeX version nathan suggests not to use full path and your image of your vi does not use the full path. Let me know if you need more info. I have to leave work now, thanks again. Neil.
  14. I have had some trouble getting this to work. I have made the changes to my code to get it using the same VI Server functions. The problem is if I run the VI I get an error 63 from Open Application Reference VI. Is it totally necessary to have the open application function in the program? Is this due to the firewall on my machine? Unfortunately I have no control over my firewall settings its a corporate IM Support thing. I have made other little web service VI's that work, like the example add program etc. These use localhost but dont specify a port number or anything. Could I be doing something else wrong now? Thanks for your help. Neil.
  15. Norm - Thanks for the help but the over all system requirements were not decided by me and I am having to follow a plan that was decided a while back and there is not much scope for change as the system I am working on is part of a larger system that has had a lot of work and developement already ie way too far down the line already. For all the benefits of using LabVIEW to work with the equipment and measured data. Having to use web services and XML for data and control is proving to be quite convoluted and definately no where near as simple as I would have hoped. Ned - Thanks for that I am working on changing my programs this morning if I get a chance and will get back to you later if I could do with some additional help. Lots of thanks to all!
  16. I am very appreciative of the help you guys are giving me, I am by no means super skilled in the art of G, but, I am learning fast. I am completely vexxed by the problem I have. In the simple VI that I have generated and shown in the previous posts and above when directly run via the run button a message is sent to the queue in the test executive VI (seperate so I am assuming the VI server code although not robust enough to use in a proper app is doing what it should and calling the queue app). The VI server function is calling a queue VI below: The VI below is a dummy test executive to prove the concept. If I press the run button on the webservice VI it all works. The test vi in the test exec is called and it appears to work as it should. If i call the webservice VI via the webservice I created in the build specifications in the project manager i get the text back as I posted in a previous post - <Response> - <Terminal> <Name>Message 2</Name> <Value>execute</Value> </Terminal> <Terminal> <Name>MTI 2</Name> <Value>0</Value> </Terminal> <Terminal> <Name>Error</Name> <Value>No Error</Value> </Terminal> </Response> But the test.vi in the Test executive is not called. This leads me to beleive that some part of the webservice VI is not functioning correctly when called by the URL. The problem is the only feedback I get back from the webservice is the xml formatted text in the browser. I am very greatful for all your help. I have a mac at home and no LabVIEW so have posted what code I could before I leave work. I will keep an eye on this thread over the weekend as it has got me very intreagued as to what I am doing wrong. Any code related examples needed will have to wait until monday morning. Many Thanks and have a nice weekend!!! Neil. Thanks Nathan and ned! It took me so long to get my screen grabs and write the text you replied before I finished. It is six o'clock here in UK and late to be at work on a Friday. I have given it a brief look and I am very happy that what I have posted in most aspects its similar to what you have posted. I dont have time to implement the changes now but will do on Monday. Can you confirm that when you call the webservice via a URL in a browser that it runs the enque VI and an element gets added to the queue in the main test executive? I would like to confirm that I am getting my webservice correctly set up in build specifications. I imagine your url mapping is something like /enqueue/:Action with a URL test of http://localhost/enqueue/1. I have my HTTP method as GET is that correct? As I said in my last post have a great weekend! And thanks for the help. Neil.
  17. Thanks for your help here but I think I may have misled you with my last post. I do not get an error in my web method it just does not appear to run the vi within the web service correctly. I have attached my webservice VI Block diagram (simple and messy - trying to prove a concept atm) this runs fine when from the run button and when my executive app is running it adds a test to the queue perfectly. My problem is that when I use internet explorer and call the vi as a web service using the prviously posted url mapping it doesnt do the same as when I press the run button. It also doesnt throw up an error when my exec prog isn't running. Both of these things are different to normal running of the VI from the run button, therefore I think this may be important since I would imagine both of these things to work the same just implemented differently. I have tried adding the Open Application Ref VI (I don't know if this is needed since it runs fine as is) but cant make this way work at all. If I have missed something here (easily done as this is new territory) and this is neccesary could you please post how I should be applying the address to the VI. I have enable the port I used 13363 like you said. Thanks again, Neil.
  18. Hi, Thankyou very much for your help. I have researched and implemented the VI server suggestions you made and they work to a degree. My problem is if the QSM (main prog) is running and I run the web service VI (this now includes the VI Server ref to the VI that adds to the queue in the main prog) directly from the run button I have an addition to the queue and a dummy test is triggered. If I invoke the web service method from a browser it doesnt invoke a test. I have the inputs to the webservice VI indicated on the connetor pane so that when I invoke the method from a browser the returned values show up in the browser in XML. However the values are not correct. I Send a message ie Execute and a test no. ie 1 (we call it MTI) I have the url mappings set to /:message/:MTI and if send http://localhost/RMSClient/Execute/1 I get this returned: - <Response>- <Terminal> <Name>MTI 2</Name> <Value>0</Value> </Terminal>- <Terminal> <Name>Message 2</Name> <Value>execute</Value> </Terminal></Response> I dont think the webservice is running the VI behind it properly. If I click the run button on my webservice VI without the main prog running I get an error based on the queue not being available and VI server getting an error because of this. But, if I do the same from via a browser call to the webservice VI NO Error! this leads me to believe that the VI may not be running properly. Are there any issues that I may not have realised that are glaringly obvious to those in the know? Once again thanks for the help! Neil.
  19. I think you cleared it up really, by backing up what I had thought. I meant that the method called does not directly "run" the VI (like clicking the run button) so there are no changes to a specific instance of a VI output. If I was to place the "Webservice VI" on the block diagram of another VI even if the web service VI is executed before the outputs are needed they will not have changed. By calling the webservice I only call a version of the method in reply to the html call. I think that is right? I am really new to this level of labview programming. I am an elec/RF eng based on training and experience but got my current job because of my LabVIEW basics training and RF experience. I only have basics 1 and 2 and that was back in the days of version 7. Another quick question then, of the examples you gave for variables etc which would be best to use in an event driven system like a QSM or AE. I need to build this based on a slick GUI for local use to automate testing but with probably 50% remote use also. So I thought that the base of a QSM-PC form would be best so that I can have a few parallel queues for test data, status of testing etc. So it is important to pick an adequate variable type. As you may be able to tell I am on a very sharp learning curve at the moment. I realise I am asking akward questions when you dont really have much of a clue what I am doing so thanks in again for any help!! Neil.
  20. I have a need to have an executive program which will be fed by a web service. For example I will have a remote computer running a sequencer that calls for example an execute method on my machine that will start a test on RF equipment based on a test number. Now my first problem is that my company is already getting some one to develop a SOAP to Restful service converter so that the services can be called in my program. I have read and read through info on the net and tried examples etc and cant work this out. What I cant fathom in my stupidity is how do you get the VI to run within my executive VI. From what I can tell from what I have played with so far, the VI doesn't seem to execute it just executes the method called and gives you the output vi HTML in the web client you make the request from. I need the outputs to be passed on to the later items in my executiv VI. The idea of using web methods is so that the system is effectively idling while no messages are sent so I don't want to be pollonig outputs of a VI etc. like using event structures instead of timed while loops. I may be being totally silly but I cant figure this out. I am having to figure out lots of things I don't know anything about in my new job and I think I have stewed my brain. Many thanks in advance. Neil.
  21. QUOTE (profquail @ Jul 29 2008, 04:16 PM) Did you put this in to the code respository? I am also interested in this and your solution may be very helpful. I can supply an email privately if you dont want use the code repository!! Many Thanks, Neil.
  22. Thanks for all your replies. Sorry I have not thanked you sooner I have been away on a stag weekend for a friend. I think I may have to struggle on with a semi-generic self written XML parser. It feels like I am re-inventing the wheel but I think that I may run into copyright issues using the easyXML tool as it is not open source/ purchasing a copy for all the machines that will use it in the end is not really the best solution. Thanks again.
  23. Hi there, Thanks for the demo/tutorial I am an RF engineer who is now in a software role as a LabVIEW programmer and I have found learning to use XML really difficult as all the examples are are in code like javascript or c# etc. All my colleagues have never seen LabVIEW and I dont really know with any ability any other programming languages so there is a massive barrier to learning to use XML and .NET calls. First I'll give a brief description of my task and then tell you my problems. I have to program a system for making some RF tests on a satellite payload. My system will be used for some of the smaller tests and is based on Off the shelf Agilent RF equipment. This will be part of a larger system that commands the payload configuration, stores data, graphically shows the payload configuration and monitors the payoad temp/volts/amps etc. These parts are done using teststand, SQL, in-house created software and webservices. This is the way it has to be done since the flexibilty to change supplier of the Main RF Measurement System is needed for future flexibility. What my specific problem is that I am subscribing to the webservice and from this service I am given a string XML which I have just about managed to read and query using similar methods from your demo. Your demo uses single elements with lots of attributes for data this make it easy to iterate through and grab out an array and is ideal for your suggested gonfiguration use. However, the format of the parameters passed in the webservice conforms more strictly to the 'best form' w3c standard which moves away from attribute use and adds them as sub elements. Are you familiar with parsing this type of XML. As I am quite fresh to the XML scene do you consider it to be very/too difficult to iterate the elements instead. My biggest problem with XML something you may be able to help/make clearer for me is it seems like you can only really rip out data/info to a table or something structured if you know what it is you are going to receive. I am wondering if this is where the schema should be used or if there are better more generic element searches that can be used. I have had some success using the wildcard functions with in the xpath.selectnodes function to get the info but due to the varying attributes and elements sizes it is extremely tricky to align the data correctly in tables. Here is an excerpt from the xml from altova:- <Parameter xmlns="" Name="MaskSet1" Type="Mask"> <ARRAY> <ARRAY xmlns="" Name="MaskXcoord" Type="FloatArray"> <VALUE Col="1">-2.000000000000000e+001</VALUE> <VALUE Col="2">-1.500000000000000e+001</VALUE> <VALUE Col="3">1.500000000000000e+001</VALUE> <VALUE Col="4">2.000000000000000e+001</VALUE> </ARRAY> <ARRAY xmlns="" Name="MaskYcoord" Type="FloatArray"> <VALUE Col="1">-3.000000000000000e+001</VALUE> <VALUE Col="4">-3.000000000000000e+001</VALUE> <VALUE Col="2">-2.500000000000000e+001</VALUE> <VALUE Col="3">-2.500000000000000e+001</VALUE> </ARRAY> <ARRAY xmlns="" Name="MaskId" Type="IntegerArray"> <VALUE Col="1">1</VALUE> <VALUE Col="2">1</VALUE> <VALUE Col="3">2</VALUE> <VALUE Col="4">2</VALUE> </ARRAY> </ARRAY> </Parameter> Altova recognises the nesting correctly but the system xml amd xpath functions don't seem to recognise child and parent elements correctly. Any help would be greatly appreciated and thanks in advance.
  24. Thanks for the response. You may well be correct suggesting TestStand thankyou. TestStand is already used here, it is currently the part of the system that is supposed to be changed to webservices. The intention is to make all the parts of the system above the RF Test system OS independant (hence webservices) with the RF Test System being a black box that can be commanded by SOAP commands. Shifting the current complicated use of TestStand down to the RF test system and removing the knowledge and understanding of the tests from the database and TestStand. In our current solution the use of TestStand is very convoluted, the system has too many layers and is balanced on top of a 20 year old programming language. I have had a small introduction to TestStand from my collegues and as I see it they do not use it in the way NI intended. So I may not understand how I could benefit from using it in the system I am putting together. My first concern with TestStand is will I have the same problem with the TestStand where each system has to act as well on its own as it does together with a second test system? I am reluctant to suggest we have a seperate master PC with TestStand installed just to asset control the RF Test Systems i.e. I would like my final solution to be deployable as a rack with an embedded PC that can perform measurements on its own or with another rack. Either with a LabVIEW application on the webservice machine or the racks able to detect one another and demand a selection of which is master and slave. Thanks again, Neil.
  25. I am newish to this forum I have done some more basic labview programming in the past and was taken on in my new job for my RF understanding. I have been thrown in at the deep end by updating an ols system based around HTBasic with LabVIEW at the same time the other software guys want to upgrade the surrounding architecture to bring it in line with a more modern approach so I would like to thank you in advance for any help/pointers that are provided. I would also like to appologise for the slightly vague descriptions of measurements and systems, i am unsure of the IP implications of being exact with my descriptions at this time. I am beggining to plan the development of a test system that is going to use Agilent equipment to perform lots of different RF tests on a DUT. The test system will include switching matrices to control how the incoming/outgoing RF will be routed to/from the equipment. From a manual front panel control point of view, though not a walk in the park ,this should be acheivable in LabVIEW with my current knowledge (so you should consider this a black box). The test system needs to be controlled remotely from a Web service front end as this service also links to a database, fileserver and the control systems for the device under test. I have researched the webservice information on the NI site and it all seems relatively straight forward (read not had a chance to play with it so may have more questions later LOL!). Where the problem lies is that there may need to be a requirement for two of the test systems to be used simultaneously so one of the systems (master?) will provide an output while the other (slave?) performs the measurement. I need to create some sort of asset managment/assignment where by I decide in advance (possibly on the PC that handles the webservice) which system is the output and which is the receive (master/slave). I also need to incorporate in my system a way to share the test setup information between 2 seperate vis running on 2 seperate systems. I am guessing the easiest way to set the systems up at the start would be using a standalone master vi as a GUI that you can manually set all the flags for master/slave etc and this could be done at system build and calibration. The systems will always be on a LAN at run time but I am unsure how I can dynamically search the LAN and find the systems and assign their duties? Secondly I am uncertain the best way to store transfer the settings to the test systems, would a simple text file that each system checks at vi start be the best way? My main concern though is the two standalone systems operating to gether to perform measurements. I am used to standard sequencial programming (command>read>result sort of thing). Would this type of system be as simple as a case select at run time (i.e. master true/false)? Or should I be looking into a more complicated but more stable programming standard? I feel that due to the many different types of test need lots of cases to cater for them all on each system if used stand alone, maybe it would be enough to have a couple of extra cases where on case is output and the other is receive. Is this to simple? Am I missing something with this architecture that would make this sort of implementation not work? Many thanks, I hope you can help sorry for the long post, Neil Andrew.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.