Package com.jaxws.json.codec

Examples of com.jaxws.json.codec.MessageBodyBuilder


        final String   payload    = message.getPayloadLocalPart();
        /*
         * Step 4.2: message is not fault. valid json response
         */
        try {
          new MessageBodyBuilder(this.codec).handleMessage(this.packet,payload);
          if(JSONCodec.responsePayloadEnabled){
            responseJSONMap.put(payload,invocationProperties.remove(JSONCodec.JSON_MAP_KEY));
          }else{
            responseJSONMap.putAll((Map<String, ? extends Object>) invocationProperties.remove(JSONCodec.JSON_MAP_KEY));
          }
View Full Code Here


      if(jsonMap.size() == 1){
        // Must be only one operation
        packet.invocationProperties.put(JSONCodec.FORCED_RESPONSE_CONTENT_TYPE, null);
        Entry<String, Object> operation = jsonMap.entrySet().iterator().next();
        this.packet.invocationProperties.put(JSONCodec.JSON_MAP_KEY, operation.getValue());
        return new MessageBodyBuilder(this.codec).handleMessage(this.packet,operation.getKey());
      }else if(jsonMap.containsKey("JSON_OPERATION") && jsonMap.get("JSON_OPERATION") instanceof String){
        String opertionName    = (String)jsonMap.get("JSON_OPERATION");
        this.packet.invocationProperties.put(JSONCodec.JSON_MAP_KEY, jsonMap);
        return new MessageBodyBuilder(this.codec).handleMessage(this.packet, opertionName);
      }else{
        throw new RuntimeException("Unknown or More than one operation found. " +
            "Your using form data. " +
            "Use your parameter as json like \"{operation:{\"myaparam\":.. OR specify " +
            "\"JSON_OPERATION\" parameter with your operation name.");
View Full Code Here

        if(traceLog != null){
          traceLog.info("Operaion identified as . " + operation.getKey());
        }
        this.packet.invocationProperties.put(JSONCodec.JSON_MAP_KEY, operation.getValue());
        try {
          return new MessageBodyBuilder(this.codec).handleMessage(this.packet,operation.getKey());
        } catch (Exception e) {
          throw new JSONFault("Client","Failed to create message body."+e.getMessage(),"MessageBody Builder",null,e);
       
      } else if(traceLog != null){
        traceLog.error("Operaion unknown in this endpoint. Please read endpoint documentation page for list of operations.");
View Full Code Here

TOP

Related Classes of com.jaxws.json.codec.MessageBodyBuilder

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.