Classes to Know
org.apache.axis.MessageContext
The answer to most "where do I find..." questions for an Axis web service is "in the MessageContext." Essentially everything Axis knows about a given request/response can be retrieved via the MessageContext. Here Axis stores:A reference to the AxisEngine
The request and response messages (org.apache.axis.Message objects available via getter and setter methods)
Information about statefulness and service scope (whether the service is maintaining session information, etc.)
The current status of processing (whether or not the "pivot" has been passed, which determines whether the request or response is the current message)
Authentication information (username and password, which can be provided by a servlet container or other means)
Properties galore. Almost anything you would want to know about the message can be retrieved via MessageContext.getProperty(). You only need to know the name of the property. This can be tricky, but it is usually a constant, like those defined in org.apache.axis.transport.http.HTTPConstants. So, for example, to retrieve the ServletContext for the Axis Servlet, you would want: ((HttpServlet)msgC.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext();From within your service, the current MessageContext object is always available via the static method MessageContext.getCurrentContext(). This allows you to do any needed customization of the request and response methods, even from within an RPC service that has no explicit reference to the MessageContext.org.apache.axis.Message
An org.apache.axis.Message object is Axis's representation of a SOAP message. The request and response messages can be retrieved from the MessageContext as described above. A Message has:MIME headers (if the message itself has MIME information)
Attachments (if the message itself has attachments)
A SOAPPart (and a convenience method for quick retrieval of the SOAPPart's SOAPEnvelope). The SOAPPart gives you access to the SOAP "guts" of the message (everything inside the <soap:Envelope> tags)
org.apache.axis.MessageContext
The answer to most "where do I find..." questions for an Axis web service is "in the MessageContext." Essentially everything Axis knows about a given request/response can be retrieved via the MessageContext. Here Axis stores:A reference to the AxisEngine
The request and response messages (org.apache.axis.Message objects available via getter and setter methods)
Information about statefulness and service scope (whether the service is maintaining session information, etc.)
The current status of processing (whether or not the "pivot" has been passed, which determines whether the request or response is the current message)
Authentication information (username and password, which can be provided by a servlet container or other means)
Properties galore. Almost anything you would want to know about the message can be retrieved via MessageContext.getProperty(). You only need to know the name of the property. This can be tricky, but it is usually a constant, like those defined in org.apache.axis.transport.http.HTTPConstants. So, for example, to retrieve the ServletContext for the Axis Servlet, you would want: ((HttpServlet)msgC.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext();From within your service, the current MessageContext object is always available via the static method MessageContext.getCurrentContext(). This allows you to do any needed customization of the request and response methods, even from within an RPC service that has no explicit reference to the MessageContext.org.apache.axis.Message
An org.apache.axis.Message object is Axis's representation of a SOAP message. The request and response messages can be retrieved from the MessageContext as described above. A Message has:MIME headers (if the message itself has MIME information)
Attachments (if the message itself has attachments)
A SOAPPart (and a convenience method for quick retrieval of the SOAPPart's SOAPEnvelope). The SOAPPart gives you access to the SOAP "guts" of the message (everything inside the <soap:Envelope> tags)
解决方案 »
- 请问一个有关myeclipse的相关问题
- Spring datasource注入,如何查看当前连接数
- strus2,OGNL做判断的问题
- axis2 fireAndForget 调用服务端没有响应
- tomcat 发布应用程序后的问题 解决后另给100分
- JSTL(JSP标准标签库)介绍
- img标签的src属性等于servlet名,求详细的解释
- 只要会C,C++,JAVA,WAP,HTTP其中一种就进来拿分!
- weblogic中如何使用微软自带的连接池驱动
- 高分请教web service leftcycle的问题
- Session Bean <-> DAO <-> Hibernate <-> DB 哪位高手帮我解释一下其中的DAO
- 高分求struts-logic.tld标签使用方法(100)
http://www.fawcette.com/china/XmlFile.aspx?ID=312