In service.rb line 413, ::Tempfile objects don't have the .string method, so it died there. I hacked the following in an attempt to get around, but I don't know if this is correct:
mycontent_length=content_length
if 10240 < content_length
require "tempfile"
body = Tempfile.new("CGI")
* 410,416 **
""
end
! parts << {:head => head, :body => body.string}
break if buf.size == 0
break if content_length == -1
end
--- 411,425 ----
""
end
! if body.kind_of? ::StringIO then
! parts << {:head => head, :body => body.string}
! elsif body.kind_of? ::Tempfile then
! bodystring=""
! body.read(mycontent_length, bodystring)
! parts << {:head => head, :body => bodystring}
! else
! raise "body must be StringIO or Tempfile"
! end
break if buf.size == 0
break if content_length == -1
end
Anyway, after changing the service.rb, I now get:
"Exception `Handsoap::XmlQueryFront::ParseError' at /var/lib/gems/1.8/gems/troelskn-handsoap-0.4.3/lib/handsoap/xml_query_front.rb:56 - Handsoap::XmlQueryFront::ParseError"
This is probably to do with my hack not being the right way to do it, specifically I couldn't figure out whether "content_length" is the right size to use for the body.read.
Before throwing the parse error, I receive 3 parts of the response. The first two (64894 bytes and 34174 bytes) go fine. I'll forward all the files in an email.
In service.rb line 413, ::Tempfile objects don't have the .string method, so it died there. I hacked the following in an attempt to get around, but I don't know if this is correct:
*\ /var/lib/gems/1.8/gems/troelskn-handsoap-0.4.3/lib/handsoap/service.rb 2009-08-09 11:41:50.433057698 -0400 --- /var/lib/gems/1.8/gems/troelskn-handsoap-0.4.3/lib/handsoap/service-dannys.rb 2009-08-09 11:39:26.297058435 -0400
* 360,365 ** --- 360,366 ----
* 410,416 ** "" end
! parts << {:head => head, :body => body.string} break if buf.size == 0 break if content_length == -1 end --- 411,425 ---- "" end
! if body.kind_of? ::StringIO then ! parts << {:head => head, :body => body.string} ! elsif body.kind_of? ::Tempfile then ! bodystring="" ! body.read(mycontent_length, bodystring) ! parts << {:head => head, :body => bodystring} ! else ! raise "body must be StringIO or Tempfile" ! end break if buf.size == 0 break if content_length == -1 end
Anyway, after changing the service.rb, I now get:
"Exception `Handsoap::XmlQueryFront::ParseError' at /var/lib/gems/1.8/gems/troelskn-handsoap-0.4.3/lib/handsoap/xml_query_front.rb:56 - Handsoap::XmlQueryFront::ParseError"
This is probably to do with my hack not being the right way to do it, specifically I couldn't figure out whether "content_length" is the right size to use for the body.read.
Before throwing the parse error, I receive 3 parts of the response. The first two (64894 bytes and 34174 bytes) go fine. I'll forward all the files in an email.
--- Request --- URI: http://10.0.1.231:8080/axis2/services/DataCentricService SOAPAction: GetObjectViewByCategoryRequest
Content-Type: text/xml;charset=UTF-8
<?xml version='1.0' ?>