1 23 package com.sun.enterprise.admin.wsmgmt; 24 25 import javax.xml.ws.handler.MessageContext; 26 import javax.xml.soap.SOAPMessage ; 27 import java.util.Iterator ; 28 import java.util.Set ; 29 import java.util.Map ; 30 31 35 public class SOAPMessageContext_2_0 implements SOAPMessageContext { 36 37 42 public SOAPMessageContext_2_0( 43 com.sun.xml.ws.spi.runtime.SOAPMessageContext smc) { 44 if (smc == null) { 45 throw new IllegalArgumentException (); 46 } 47 _smc = smc; 48 } 49 50 55 public SOAPMessage getMessage() { 56 return _smc.getMessage(); 57 } 58 59 64 public Iterator getPropertyNames() { 65 Set keySet = _smc.keySet(); 66 if ( keySet != null) { 67 return keySet.iterator(); 68 } else { 69 return null; 70 } 71 } 72 73 78 public Object getProperty(String name) { 79 if (( name != null) && ( 81 "com.sun.xml.rpc.server.http.HttpServletRequest".equals(name))) { 82 name = MessageContext.SERVLET_REQUEST; 83 } 84 return _smc.get(name); 85 } 86 87 92 public void setMessage(SOAPMessage msg) { 93 _smc.setMessage(msg); 94 } 95 100 public String getHTTPRequestHeaders() { 101 Map headerMap = (Map )_smc.get(MessageContext.HTTP_REQUEST_HEADERS); 102 return Utils.getString(headerMap); 103 } 104 105 110 public String getHTTPResponseHeaders() { 111 Map headerMap = (Map )_smc.get(MessageContext.HTTP_RESPONSE_HEADERS); 112 return Utils.getString(headerMap); 113 } 114 115 116 private com.sun.xml.ws.spi.runtime.SOAPMessageContext _smc = null; 118 } 119 | Popular Tags |