Hi Majula, Does Libxml2 support this kind of parsing? If it does then there will be no problem. But if Libxml2 doesn't support creation of a reader from a buffer and a stream our parser abstraction will be broken.
Regards, Supun.. On Sat, Jul 12, 2008 at 9:21 PM, Manjula Peiris <[EMAIL PROTECTED]> wrote: > On Sat, 2008-07-12 at 19:31 +0530, Milinda Pathirage wrote: > > As Thilina mentioned in above thread Axis2/Java keeps a instance of > > mime parser in it's xml builder. So I think it's ok to follow that > > method. AFAIK, I think if we enable MTOM caching we have to have this > > feature or is anybody have ideas about how to solve this without going > > to this method?. Manjula can you point out the changes we need in the > > parser. Then we can discuss the problem and available solutions. This > > will help us to avoid any problems occur in the future because of the > > changes. > > If we have two methods for xml reader creation, how we can use both of > > them in the Axis2/C engine. Are we going to check the MIME headers and > > create the required xml reader? > > In the MTOM case the serialized message is most probably in the > following format. > > --MimeBoundary > mime_header1:xxxxx > mime_header2:xxxxx > > <soapenv:Envelope>.......</soapenv:Envelope> > --MimeBoundary > mime_header1:xxxx > mime_header2:xxxx > > yyyyyyyyybinarydatayyyyyyyyyyyy > --MimeBoundary-- > > We have the information form http_headers whether this is a multipart > message or not. So will call the soap_builder straightaway with a flag > telling this is a multipart message. Since the modified soap_builder > will have a reference to mime_parser instance when seeing this flag it > will call the mime_parser. mime_parser will search for \r\n\r\n sequence > between SOAP part and first mime_headers set. When searching for this it > may read some part of the SOAP. So after this search we can't > straightaway call either xml_reader_create_for_io or > xml_reader_create_for_memory, because none of them will not get correct > xml. So what we need is first read from a buffer and then when that > buffer is finished read from the network stream. This will cause to > define and implement the new xml_reader function and corresponding > modifications at parser level as I mentioned in my previous mail. > > -Manjula. > > > > > > Thanks, > > Milinda... > > > > On Sat, Jul 12, 2008 at 6:53 PM, Manjula Peiris <[EMAIL PROTECTED]> > > wrote: > > Hi all, > > > > MTOM caching stuff is finished in both send and receiving > > sides.It is > > available here [1]. But due to this [2] problem, it cannot be > > integrated > > to Axis2/C trunk. > > > > In order to solve that problem we need to keep a reference of > > mime_parser instance in the soap_builder similarly > > stax_builder. So when > > parsing the soap part the xml_reader will not just read from > > the stream, > > but also need to read from the buffer which will be available > > after > > parsing mime_headrs. So we need to create a parser instance > > which will > > first read from the buffer and when that buffer is not > > containing any > > more data, it will read from the stream. So we may need to add > > a new > > function say, > > xml_reader_create_for_memory_and_io and change some of the > > logic in > > parser. > > Your suggestions are highly appreciated. > > > > [1] > https://svn.apache.org/repos/asf/webservices/axis2/branches/c/post_1_4_mtom/c > > > > [2]http://marc.info/?l=axis-c-dev&m=121320959601769&w=2 > > > > Thanks, > > -Manjula. > > > > > > -- > > Manjula Peiris: http://manjula-peiris.blogspot.com/ > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > http://mpathirage.com > > http://wso2.org "Oxygen for Web Service Developers" > > http://wsaxc.blogspot.com "Web Services With Axis2/C" > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >