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 "Ashutosh Shahi (JIRA)" <ax...@ws.apache.org> on 2004/11/02 16:23:33 UTC
[jira] Commented: (AXIS-1469) Updates not effective after saveChanges() or writeTo()
[ http://nagoya.apache.org/jira/browse/AXIS-1469?page=comments#action_54939 ]
Ashutosh Shahi commented on AXIS-1469:
--------------------------------------
As I said earlier, the above problem occurs because each time saveChanges() is called on soapEnvelope, the representation of soap envelope is changed to FORM_OPTIMIZED.
So, to get over this issue, we can remove the statement at org.apache.axis.SOAPPart, line 487, from axis code:
setCurrentForm( array, FORM_OPTIMIZED );
This will solve the problem of saveChanges() not being effective on second call. As i see it, we are converting to FORM_OPTIMIZED just to get a byte or binary representation of contents for optimization, which anyway is being obtained when required. So, it should not affect any other part of code. Can i go ahead and remove the above line from saveChanges() method to solve the above problem? Any comments?
Ashutosh
> Updates not effective after saveChanges() or writeTo()
> ------------------------------------------------------
>
> Key: AXIS-1469
> URL: http://nagoya.apache.org/jira/browse/AXIS-1469
> Project: Axis
> Type: Bug
> Components: SAAJ
> Versions: 1.2 Beta
> Environment: JDK 1.4.2, Resin 2.1.14
> Reporter: Mattias Jiderhamn
> Priority: Critical
>
> Not sure how to explain this in an understandable manner, but run this code and you will clearly see the problem:
> SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();
> SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); // Get handle to envelope
> // soapMessage.writeTo(System.out); // This would give the same results
> soapMessage.saveChanges(); // This converts the SOAP message to String form (as a Fix for Bug 16418???)
> soapEnvelope.addChildElement("foo", "bar", "http://foo/bar"); // Add child elements
> soapMessage.writeTo(System.out); // The message is already in String form, and changes have no effect
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira