similar to: How to do xml post in test

Displaying 20 results from an estimated 40000 matches similar to: "How to do xml post in test"

2006 Jan 28
0
submitting xml documents from POST request/ test framework
Hi rails people, I have been experiencing a problem lately with my rails app. I send xml documents to a rails server through POST requests from a curl client. The request contains an XML document that has been properly escaped using entity escapement rules from the XML definition: each escaped entity is replaced by "&nn;". The documents POST to the server just fine unless the
2006 Jul 24
0
parsing xml from post
I am working on an application where the client sends an xml string. I was planning on using REXML and reading the raw post data. Then I noticed that if the content type is text/xml, rails parses the xml into the params hash. However, it chokes on attributes in the xml such as the xml below, throwing an error that it can''t typecast the attribute value in line 99 of cgi_methods.rb
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file with REXML. No matter what I try, I am only getting the last result returned from my query. I should be getting 365 results. Here is the code: include REXML require ''rexml/document'' require ''rexml/xpath'' class MakeFootprintController < ApplicationController def index
2006 Aug 30
1
xml - get values
Hi I have the following xml string that I have loaded into an REXML object as shown below. #xml stuff for saveRoute require ''rexml/document'' include REXML Xml = "<test> <name>sam</name> <description>this is a test</description> <description>this is a test2</description> </test>" XmlObject = Document.new(Xml)
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
On Sep 24, 2:14 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I''ve getting data like this: > > <![CDATA[a:1:{i:0;s:6:&quot;Sometext&quot;;}]]> > > I know in PHP I can unserialize and decode, but I''m not sure the best > way to do it in Rails. > > I''m already parsing the XML using REXML so I''m
2010 Mar 26
2
How to read a xml file?
How to read a xml file? I have this XML source: ------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fichas> <ficha> <nombre>Gabriel</nombre> <apellido>Molina</apellido> <direccion>Alfredo Vargas #36</direccion> </ficha>
2006 Jan 13
1
Send XML Document with SOAP
Hello, yes it''s another ruby-nuby question but i cant find the right docs so I hope either someone has an answer or can provide links to what i havent been able to find. I am trying to call a wsdl web service running on .net server with a ruby client. I can make the request and with a wiredump I see the SOAP request and responce XML files, the files are correct but I am not sure
2006 Jun 24
1
Parsing XML with REXML problem
Why can it not find my object? What am i missing here? Here is my code: require ''rexml/document'' include REXML # classes to represent the objects and relationships in the xml file class Article attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body, :fblurb, :fimage, :att, :source, :copy, :brand end # the base parser class BaseXMLParser def initialize(filename)
2009 Mar 16
0
Reading XML-file + saving to sqlite3 database
Hi! I''m new with Ruby On Rails, so I don''t really know how I can get this fixed. As a result of a program, I''ve got +/- 20 XML files, and I would like to import them to my sqlite3 database. Each XML-file having it''s own table. Now I think I need to read the xml-files first and process them later. I''ve done some research and found REXML, but I
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
Not really a solution, but this has to be a classic example of PHP- programmer-bass-ackwardness. They''re already writing to an extensible serialization format (XML) but then just whack language-specific serialized data in instead. That''s right up there with the HTTP-over- SOAP-over-HTTP stuff I''ve seen floating around... --Matt Jones On Sep 24, 9:14 am, Andy
2006 May 30
11
Display XML file, with some formatting.
Hi. Im quite new to this Rails thing, but it seems like a good product so why not try it out whit a little prototype i need to build. What i want is to load any given XML file, and display it with some formatting. I have some XSD shemes to validate the XML files against, but its not vital rigth now. But how should i approach this task? At first it would proberly be a good idea to load the
2006 Apr 08
1
How do I fix these annoying errors?
C:\rails\brablog>ruby script/generate scaffold c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class has `-'' without escape c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class has `-'' without escape c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class has `-'' without escape
2006 Apr 17
5
XML-RPC Webservice API
Hi, After following the excellent tutorials in the Agile Web Development with Rails book, I was able to get my webservice working pretty much perfectly :) I can access it via SOAP and XML-RPC and look at service.wsdl to find the API. What I can''t do however is get the API for the XML-RPC call. It fails with : Internal protocol error: NilClass is not a valid input stream. It must
2011 May 09
1
Failure when posting an XML file to a rails metal app
I''m trying to write some rails metal code to handle a large XML file post, but I''m receiving a 500 from my server. If I use a POST but don''t provide a file to upload, everything works and I receive a 200 response, but if I provide a file (the -d flag with curl), I receive a 500. Here''s the curl command I''m using: curl -siX POST
2006 Jun 26
0
DBI question. How do I load a database with data parsed from REXML?
I wrote a rexml script that parses rather big xml files (DOM parsing) and builds an object out of them. This is what it looks like after i parse the xml file and display the object: [#<Article:0xb79e7428 @brand="This is a story from ", @id=5337, @fblurb="burb", @ntype="news type here", @copy="Copyright \302\251 2006 ", @source="source",
2006 Aug 05
1
XML from Builder without the to_s element
Hi All, I''m trying to return XML from a Rails view of an object I built up using Builder::XmlMarkup and I find an annoying side effect is that I get an extra <to_xml/> or <to_s/> element back which makes REXML hiccup thinking I''m adding a recond root element when I try to parse the return. How can I return the XML without this last element? Thanks, Vince
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer - I am working on functionality to match on certain nodes of a largish (65mb) xml file. I implemented this with REXML and was 2 minutes and counting before I killed the process. After this, I just opened the console and loaded the file into a string and did a regex search for my data -- the result was almost instantaneous. The question is, if I can get
2006 Mar 24
4
Parsing Filemaker 6 XML into something I can use
Hi One of our customers has a Filemaker database which needs to be accessed for some data. Using the Web Companion, I can query the database for an XML version of the data. I need to be able to push this data into an array of hashes, so I can access it in a more convenient way. Filemaker is able to provide me with 2 XML formats (DSO-XML and FMP-XML): *********** DSO-XML ***********
2009 Feb 02
12
[RSpec] rcov and/or rexml bug?
Hi, Running: Ruby 1.8.7 p72, RSpec 1.1.12 and rcov 0.8.1.2.0, I get the following error message with $ rake spec:rcov -- /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in `[]'': no implicit conversion from nil to integer (TypeError) from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in `wrap'' from
2006 Oct 21
3
Transactions
Ok, how does everyone else do transactions in development mode? If I get a exception within a transaction, I get the ruby exception screen, I want rails to complete the block code, and then rollback the transaction. Is there a way to disable the exception screen before the transaction, and then enable it after the transaction? Thanks! --~--~---------~--~----~------------~-------~--~----~ You