Package com.jaxws.json.codec.decode

Examples of com.jaxws.json.codec.decode.JSONDecoder


    }
    //
    Message     message     = null;
    com.sun.xml.ws.encoding.ContentType   contentType    = new com.sun.xml.ws.encoding.ContentType(sContentType);
    if(contentType.getBaseType().equalsIgnoreCase(JSONContentType.JSON_MIME_TYPE)){
      JSONDecoder decoder = new JSONDecoder(this,in,packet);
      if(traceLog != null)traceLog.info("calling json to ws message converter: "+ new Date());
      try{
        message = decoder.getWSMessage();
      }catch(Exception exp){
        if(traceLog != null)traceLog.error(exp.getMessage());
        if(packet.supports(MessageContext.SERVLET_RESPONSE)){
          ((HttpServletResponse)packet.get(MessageContext.SERVLET_RESPONSE)).setStatus(400);
        }
        throwMessageCreationException(exp, traceLog);
      }
      if(traceLog != null)traceLog.info("Message decoded successfully: " + new Date());
    } else if(contentType.getBaseType().equalsIgnoreCase(FormDecoder.FORM_MULTIPART) ||
        contentType.getBaseType().equalsIgnoreCase(FormDecoder.FORM_URLENCODED)){
      FormDecoder decoder = new FormDecoder(this,in,packet, contentType);
      if(traceLog != null)traceLog.info("calling FORM data to ws message converter: "+ new Date());
      try{
        message = decoder.getWSMessage();
      }catch(Exception exp){
        if(traceLog != null)traceLog.error(exp.getMessage());
        if(packet.supports(MessageContext.SERVLET_RESPONSE)){
          ((HttpServletResponse)packet.get(MessageContext.SERVLET_RESPONSE)).setStatus(400);
        }
View Full Code Here

TOP

Related Classes of com.jaxws.json.codec.decode.JSONDecoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.