📄 bindingentry.java
字号:
headerParts.put(operationName, opMap); } Integer I = (Integer) opMap.get(partName); int i = (I == null) ? headerFlags : (I.intValue() | headerFlags); opMap.put(partName, new Integer(i)); } // setHeaderPart /** * Get this entry's WSDL4J Binding object. * * @return */ public Binding getBinding() { return binding; } // getBinding /** * Get this entry's binding type. One of BindingEntry.TYPE_SOAP, BindingEntry.TYPE_HTTP_GET, * BindingEntry.TYPE_HTTP_POST. * * @return */ public int getBindingType() { return bindingType; } // getBindingType /** * Set this entry's binding type. * * @param bindingType */ protected void setBindingType(int bindingType) { if ((bindingType >= TYPE_SOAP) && (bindingType <= TYPE_UNKNOWN)) { } this.bindingType = bindingType; } // setBindingType /** * Get this entry's binding style. * * @return */ public Style getBindingStyle() { return bindingStyle; } // getBindingStyle /** * Set this entry's binding style. * * @param bindingStyle */ protected void setBindingStyle(Style bindingStyle) { this.bindingStyle = bindingStyle; } // setBindingStyle /** * Do any of the message stanzas contain a soap:body which uses literal? * * @return */ public boolean hasLiteral() { return hasLiteral; } // hasLiteral /** * Set the literal flag. * * @param hasLiteral */ protected void setHasLiteral(boolean hasLiteral) { this.hasLiteral = hasLiteral; } // setHashLiteral /** * Get the input body type for the given operation. * * @param operation * @return */ public Use getInputBodyType(Operation operation) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { return attr.getInputBodyType(); } } // getInputBodyType /** * Set the input body type for the given operation. * * @param operation * @param inputBodyType */ protected void setInputBodyType(Operation operation, Use inputBodyType) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { attr = new OperationAttr(); attributes.put(operation, attr); } attr.setInputBodyType(inputBodyType); if (inputBodyType == Use.LITERAL) { setHasLiteral(true); } } // setInputBodyType /** * Get the output body type for the given operation. * * @param operation * @return */ public Use getOutputBodyType(Operation operation) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { return attr.getOutputBodyType(); } } // getOutputBodyType /** * Set the output body type for the given operation. * * @param operation * @param outputBodyType */ protected void setOutputBodyType(Operation operation, Use outputBodyType) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { attr = new OperationAttr(); attributes.put(operation, attr); } attr.setOutputBodyType(outputBodyType); if (outputBodyType == Use.LITERAL) { setHasLiteral(true); } } // setOutputBodyType /** * Set the body type for the given operation. If input is true, * then this is the inputBodyType, otherwise it's the outputBodyType. * (NOTE: this method exists to enable reusing some SymbolTable code. * * @param operation * @param bodyType * @param input */ protected void setBodyType(Operation operation, Use bodyType, boolean input) { if (input) { setInputBodyType(operation, bodyType); } else { setOutputBodyType(operation, bodyType); } } // setBodyType /** * Get the fault body type for the given fault of the given operation. * * @param operation * @param faultName * @return Use.ENCODED or Use.LITERAL */ public Use getFaultBodyType(Operation operation, String faultName) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { HashMap m = attr.getFaultBodyTypeMap(); SOAPFault soapFault = (SOAPFault) m.get(faultName); // This should never happen (error thrown in SymbolTable) if (soapFault == null) { return Use.ENCODED; } String use = soapFault.getUse(); if ("literal".equals(use)) { return Use.LITERAL; } return Use.ENCODED; } } /** * Return the map of BindingOperations to ArraList of FaultBodyType * * @return */ public HashMap getFaults() { return faults; } /** * Method setFaults * * @param faults */ public void setFaults(HashMap faults) { this.faults = faults; } /** * Get a {@link Set} of comprised {@link Operation} objects. * * @return */ public Set getOperations() { return attributes.keySet(); } /** * Set the fault body type map for the given operation. * * @param operation * @param faultBodyTypeMap */ protected void setFaultBodyTypeMap(Operation operation, HashMap faultBodyTypeMap) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { attr = new OperationAttr(); attributes.put(operation, attr); } attr.setFaultBodyTypeMap(faultBodyTypeMap); } // setInputBodyTypeMap /** * Contains attributes for Operations * - Body type: encoded or literal */ protected static class OperationAttr { /** Field inputBodyType */ private Use inputBodyType; /** Field outputBodyType */ private Use outputBodyType; /** Field faultBodyTypeMap */ private HashMap faultBodyTypeMap; /** * Constructor OperationAttr * * @param inputBodyType * @param outputBodyType * @param faultBodyTypeMap */ public OperationAttr(Use inputBodyType, Use outputBodyType, HashMap faultBodyTypeMap) { this.inputBodyType = inputBodyType; this.outputBodyType = outputBodyType; this.faultBodyTypeMap = faultBodyTypeMap; } /** * Constructor OperationAttr */ public OperationAttr() { this.inputBodyType = Use.ENCODED; this.outputBodyType = Use.ENCODED; this.faultBodyTypeMap = null; } /** * Method getInputBodyType * * @return */ public Use getInputBodyType() { return inputBodyType; } /** * Method setInputBodyType * * @param inputBodyType */ protected void setInputBodyType(Use inputBodyType) { this.inputBodyType = inputBodyType; } /** * Method getOutputBodyType * * @return */ public Use getOutputBodyType() { return outputBodyType; } /** * Method setOutputBodyType * * @param outputBodyType */ protected void setOutputBodyType(Use outputBodyType) { this.outputBodyType = outputBodyType; } /** * Method getFaultBodyTypeMap * * @return */ public HashMap getFaultBodyTypeMap() { return faultBodyTypeMap; } /** * Method setFaultBodyTypeMap * * @param faultBodyTypeMap */ protected void setFaultBodyTypeMap(HashMap faultBodyTypeMap) { this.faultBodyTypeMap = faultBodyTypeMap; } } // class OperationAttr} // class BindingEntry
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -