Scott,

Sorry It took so long to reply.  Anyway I have  generated patch for two files org.apache.soap.rpc.Call  and org.apache.soap.util.xml.DOMUtils,  these files are attached to the mail. And  here is the patch file

diff -r xml-soap/java/src/org/apache/soap/rpc/Call.java /home/rgc/rajfix/xml-soap/java/src/org/apache/soap/rpc/Call.java
76a77,84
> import javax.xml.transform.dom.DOMResult; // JAXP
> import javax.xml.transform.sax.SAXSource; // JAXP
> import javax.xml.transform.TransformerFactory; // JAXP
> import javax.xml.transform.Transformer; // JAXP
> import javax.xml.transform.dom.DOMSource; // JAXP
> import javax.xml.transform.stream.StreamResult; // JAXP
>
>
215,216c223,243
<       Document respDoc =
<         xdb.parse(new InputSource(new StringReader(payloadStr)));
---
>       Document respDoc = null;
> // author Raj Yellapragada
>   // Here I have generated SAX document instead of DOM document using Transformation functions in
>   //  JAXP tools. This is way faster than DOM parser (xdb).  
> //    Document respDoc =
> //        xdb.parse(new InputSource(new StringReader(payloadStr)));
> //     Document document = null;
>  try
>  {
>
>   DOMResult output = new DOMResult();
>   TransformerFactory xformFactory = TransformerFactory.newInstance();
>   Transformer idTransform = xformFactory.newTransformer();
>   idTransform.transform(new SAXSource(new InputSource(new StringReader(payloadStr))), output);
>   respDoc = (Document) output.getNode();
>  }
>  catch(Exception e)
>  {
>  System.out.println("Error in Transformation of DOM Document to Sax Document  " + e);
>  }
>  
234d260
<
248,253c274,279
<     catch (SAXException e)
<     {
<       throw new SOAPException(Constants.FAULT_CODE_CLIENT,
<                               "Parsing error, response was:\n" +e.getMessage(),
<          e);
<     }
---
> //    catch (SAXException e)
> //    {
> //      throw new SOAPException(Constants.FAULT_CODE_CLIENT,
> //                              "Parsing error, response was:\n" +e.getMessage(),
> //         e);
> //    }
diff -r xml-soap/java/src/org/apache/soap/util/xml/DOMUtils.java /home/rgc/rajfix/xml-soap/java/src/org/apache/soap/util/xml/DOMUtils.java
70c70
<   private static String NS_URI_XMLNS = "http://www.w3.org/2000/xmlns/";
---
>    private static String NS_URI_XMLNS = "http://www.w3.org/2000/xmlns/";
106d105
<
249a249
>  
252,255c252
<       Element tempEl = (Element) tempNode;
<       String namespaceURI = (prefix == null)
<                             ? getAttribute (tempEl, "xmlns")
<                             : getAttributeNS (tempEl, NS_URI_XMLNS, prefix);
---
>      Element tempEl = (Element) tempNode;
257,264c254,276
<       if (namespaceURI != null)
<       {
<         return namespaceURI;
<       }
<       else
<       {
<         tempNode = tempEl.getParentNode ();
<       }
---
>   String namespaceURI ;
>   
>   try
>   {
>       namespaceURI  = (prefix == null)
>                            ? getAttribute (tempEl, "xmlns")
>                            : getAttributeNS (tempEl, NS_URI_XMLNS, prefix);
>   }
>  // Raj Yellapragada Here I am checking for NullPointerException and if it is I am using
>  // Element getattribute method to get to namespaceURI.  
>   catch(java.lang.NullPointerException e)
>   {
>    namespaceURI = tempEl.getAttribute("xmlns:" + prefix);
>   }
>      if (namespaceURI != null)
>      {
>
>         return namespaceURI;
>      }
>      else
>      {
>        tempNode = tempEl.getParentNode ();
>      }
266c278
<
---
>    

 

  Scott Nichol <[EMAIL PROTECTED]> wrote:

Raj,

Are you still interested in contributing this code?

Scott Nichol

--- yellapragada rajasekhar <[EMAIL PROTECTED]>wrote:
>
> Hi ,
>
> My Name is Raj . I work for Insurance Company in
> Scottsdale. Recently
> my company asked me to look into web services. I
> started downloading
> SOAP stuff from apache site, I wrote small programs
> every thing works
> great. But when I really started doing prototype of
> an existing application
> , it doesn't seem to be working right. Like if Data
> over the wire from
> Database to Tomcat/SOAP server to Browser is minimal
> then it
> takes few seconds to process, but if data is huge (>
> 300 Kb) then it really
> slows down. Then I started digging into your code, I
> found couple of
> things I can change like you guys are using DOM
> Parser which is Memory
> intensive , So started changing your code to use
> SAXParser and also I need
> to changing couple of things in your DOMUtils code
> too. So now it works
> very fast like in seconds I can see output. So I
> would like share my
> code and see what you guys think , also wants to
> contribute to
> development. Not sure how to proceed can some body
> help me on this...
>
>
>
> Thanks,
> Raj
>
>
>
>
>
> Raja Sekhar.Y
Software Eng.

>
>
> ---------------------------------
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:
For additional commands, e-mail:


Raja Sekhar.Y<BR>Software Eng.<BR>



Do You Yahoo!?
New! SBC Yahoo! Dial - 1st Month Free & unlimited access

Attachment: Call.java
Description: Call.java

Attachment: DOMUtils.java
Description: DOMUtils.java

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to