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 th...@apache.org on 2006/12/19 12:26:26 UTC
svn commit: r488637 -
/webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html
Author: thilina
Date: Tue Dec 19 03:26:25 2006
New Revision: 488637
URL: http://svn.apache.org/viewvc?view=rev&rev=488637
Log:
Correcting an outdated code sample in mtom guide
Modified:
webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html
Modified: webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html?view=diff&rev=488637&r1=488636&r2=488637
==============================================================================
--- webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html (original)
+++ webservices/axis2/branches/java/1_1/xdocs/1_1/mtom-guide.html Tue Dec 19 03:26:25 2006
@@ -821,15 +821,9 @@
attachment</strong></li>
</ul>
<source><pre>public class SwA {
- private OperationContext operationContext;
-
public SwA() {
}
-
- public void setOperationContext(OperationContext oc) throws AxisFault {
- operationContext = oc;
- }
-
+
public void uploadAttachment(OMElement omEle) throws AxisFault {
OMElement child = (OMElement) omEle.getFirstOMChild();
OMAttribute attr = child.getAttribute(new QName("href"));
@@ -841,7 +835,8 @@
contentID = contentID.substring(4);
}
- Attachments attachment = (Attachments) (operationContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)).getAttachmentMap();
+ MessageContext msgCtx = MessageContext.getCurrentMessageContext();
+ Attachments attachment = msgCtx.getAttachmentMap();
DataHandler dataHandler = attachment.getDataHandler(contentID);
...........
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org