You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Abhijit Sharma <ab...@itellix.com> on 2004/06/18 19:26:48 UTC

Problem with DOM / SAAJ interface

I am  using the SAAJ implementation within Axis 1.2 Beta as per the
following code :

	final MessageFactory factory = MessageFactory.newInstance();
	final SOAPMessage message = factory.createMessage();
	final SOAPBody body = message.getSOAPBody();
	final SOAPFactory soapFactory = SOAPFactory.newInstance();
	final Name bodyName = 		soapFactory.createName("GetLastTradePrice",
			"m","http://wombats.ztrade.com");
	final SOAPBodyElement bodyElement = 		body.addChildElement(bodyName);
	final Name name = soapFactory.createName("symbol");
	final SOAPElement symbol = bodyElement.addChildElement(name);
	symbol.addTextNode("SUNW");
	
After this piece of code when I try to see the DOM representation of the
SOAPBody it only contains the Body element ( with a serialized form of
<Body/> )

Issue 1. Probing a little bit further the method in 
org.apache.axis.message.SOAPElement addChildElement calls
org.apache.axis.message.SOAPBody.addChild which adds to the bodyElements
vector within the SOAPBody class but does not call
MessageElement.addChild which adds to the children ArrayList of
MessageElement. 

Issue 2 There is also a problem with the SOAPBody.addBodyElement with
updation of the corresponding DOM children element in MessageElement
class. It also does not add to the bodyElement Vector in SOAPBody. 

Please let me know in case I have missed out something. In case things
are fine then I am attaching a proposed patch for Issue 1.Could you
please review the patches attached.


-- 
Regards,
Abhijit 

RE: Problem with DOM / SAAJ interface

Posted by Abhijit Sharma <ab...@itellix.com>.
Thanks Jarek
On Wed, 2004-06-23 at 02:08, Jarek Gawor wrote:
> Both should be fixed now. Please try latest code from cvs.
> 
> Jarek
> 
> > -----Original Message-----
> > From: Abhijit Sharma [mailto:abhijit.sharma@itellix.com] 
> > Sent: Friday, June 18, 2004 1:27 PM
> > To: axis-dev@ws.apache.org
> > Subject: Problem with DOM / SAAJ interface
> > 
> > 
> > I am  using the SAAJ implementation within Axis 1.2 Beta as 
> > per the following code :
> > 
> > 	final MessageFactory factory = MessageFactory.newInstance();
> > 	final SOAPMessage message = factory.createMessage();
> > 	final SOAPBody body = message.getSOAPBody();
> > 	final SOAPFactory soapFactory = SOAPFactory.newInstance();
> > 	final Name bodyName = 		
> > soapFactory.createName("GetLastTradePrice",
> > 			"m","http://wombats.ztrade.com");
> > 	final SOAPBodyElement bodyElement = 		
> > body.addChildElement(bodyName);
> > 	final Name name = soapFactory.createName("symbol");
> > 	final SOAPElement symbol = bodyElement.addChildElement(name);
> > 	symbol.addTextNode("SUNW");
> > 	
> > After this piece of code when I try to see the DOM 
> > representation of the SOAPBody it only contains the Body 
> > element ( with a serialized form of <Body/> )
> > 
> > Issue 1. Probing a little bit further the method in 
> > org.apache.axis.message.SOAPElement addChildElement calls 
> > org.apache.axis.message.SOAPBody.addChild which adds to the 
> > bodyElements vector within the SOAPBody class but does not 
> > call MessageElement.addChild which adds to the children 
> > ArrayList of MessageElement. 
> > 
> > Issue 2 There is also a problem with the 
> > SOAPBody.addBodyElement with updation of the corresponding 
> > DOM children element in MessageElement class. It also does 
> > not add to the bodyElement Vector in SOAPBody. 
> > 
> > Please let me know in case I have missed out something. In 
> > case things are fine then I am attaching a proposed patch for 
> > Issue 1.Could you please review the patches attached.
> > 
> > 
> > -- 
> > Regards,
> > Abhijit 
> > 
> 
-- 
Regards,
Abhijit Sharma
Director (Products)
Itellix Software Solutions Private Limited
Tel: +91-80-51125501
Fax: +91-80-51125504
Cell: +91-9845403028
e-mail: abhijit.sharma@itellix.com
Web: http://www.itellix.com


RE: Problem with DOM / SAAJ interface

Posted by Jarek Gawor <ga...@mcs.anl.gov>.
Both should be fixed now. Please try latest code from cvs.

Jarek

> -----Original Message-----
> From: Abhijit Sharma [mailto:abhijit.sharma@itellix.com] 
> Sent: Friday, June 18, 2004 1:27 PM
> To: axis-dev@ws.apache.org
> Subject: Problem with DOM / SAAJ interface
> 
> 
> I am  using the SAAJ implementation within Axis 1.2 Beta as 
> per the following code :
> 
> 	final MessageFactory factory = MessageFactory.newInstance();
> 	final SOAPMessage message = factory.createMessage();
> 	final SOAPBody body = message.getSOAPBody();
> 	final SOAPFactory soapFactory = SOAPFactory.newInstance();
> 	final Name bodyName = 		
> soapFactory.createName("GetLastTradePrice",
> 			"m","http://wombats.ztrade.com");
> 	final SOAPBodyElement bodyElement = 		
> body.addChildElement(bodyName);
> 	final Name name = soapFactory.createName("symbol");
> 	final SOAPElement symbol = bodyElement.addChildElement(name);
> 	symbol.addTextNode("SUNW");
> 	
> After this piece of code when I try to see the DOM 
> representation of the SOAPBody it only contains the Body 
> element ( with a serialized form of <Body/> )
> 
> Issue 1. Probing a little bit further the method in 
> org.apache.axis.message.SOAPElement addChildElement calls 
> org.apache.axis.message.SOAPBody.addChild which adds to the 
> bodyElements vector within the SOAPBody class but does not 
> call MessageElement.addChild which adds to the children 
> ArrayList of MessageElement. 
> 
> Issue 2 There is also a problem with the 
> SOAPBody.addBodyElement with updation of the corresponding 
> DOM children element in MessageElement class. It also does 
> not add to the bodyElement Vector in SOAPBody. 
> 
> Please let me know in case I have missed out something. In 
> case things are fine then I am attaching a proposed patch for 
> Issue 1.Could you please review the patches attached.
> 
> 
> -- 
> Regards,
> Abhijit 
>