/** * Add an output parameter to the parameters object. * * @param outputs * @param outdex * @param parameters * @param trim */ private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) { Parameter p = (Parameter) outputs.get(outdex); // If this is an element, we want the XML to reflect the element name // not the part name. Same check is made in addInishParam above. if (p.getType() instanceof DefinedElement) { DefinedElement de = (DefinedElement) p.getType(); p.setQName(de.getQName()); } // If this is a collection we want the XML to reflect the type in // the collection, not foo[unbounded]. // Same check is made in addInishParam above. if (p.getType() instanceof CollectionElement) { p.setQName(p.getType().getRefType().getQName()); } if (trim) { outputs.remove(outdex); } p.setMode(Parameter.OUT); ++parameters.outputs; parameters.list.add(p); } // addOutParm
/** * Add an output parameter to the parameters object. * * @param outputs * @param outdex * @param parameters * @param trim */ private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) { Parameter p = (Parameter) outputs.get(outdex); // If this is an element, we want the XML to reflect the element name // not the part name. Same check is made in addInishParam above. if (p.getType() instanceof DefinedElement) { DefinedElement de = (DefinedElement) p.getType(); p.setQName(de.getQName()); } // If this is a collection we want the XML to reflect the type in // the collection, not foo[unbounded]. // Same check is made in addInishParam above. if (p.getType() instanceof CollectionElement) { p.setQName(p.getType().getRefType().getQName()); } if (trim) { outputs.remove(outdex); } p.setMode(Parameter.OUT); ++parameters.outputs; parameters.list.add(p); } // addOutParm
/** * Add an output parameter to the parameters object. * * @param outputs * @param outdex * @param parameters * @param trim */ private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) { Parameter p = (Parameter) outputs.get(outdex); // If this is an element, we want the XML to reflect the element name // not the part name. Same check is made in addInishParam above. if (p.getType() instanceof DefinedElement) { DefinedElement de = (DefinedElement) p.getType(); p.setQName(de.getQName()); } // If this is a collection we want the XML to reflect the type in // the collection, not foo[unbounded]. // Same check is made in addInishParam above. if (p.getType() instanceof CollectionElement) { p.setQName(p.getType().getRefType().getQName()); } if (trim) { outputs.remove(outdex); } p.setMode(Parameter.OUT); ++parameters.outputs; parameters.list.add(p); } // addOutParm
private TypeDescriptor processParameter(Parameter param) { TypeDescriptor typeDesc = constructType(param.getType()); typeDesc.setName(param.getName()); return typeDesc; }
/** * Set the MIME type. This can be determine in one of two ways: * 1. From WSDL 1.1 MIME constructs on the binding (passed in); * 2. From AXIS-specific xml MIME types. * * @param p * @param mimeInfo */ private void setMIMEInfo(Parameter p, MimeInfo mimeInfo) { // If there is no binding MIME construct (ie., the mimeType parameter is // null), then get the MIME type from the AXIS-specific xml MIME type. if (mimeInfo == null && p.getType() != null) { QName mimeQName = p.getType().getQName(); if (mimeQName.getNamespaceURI().equals(Constants.NS_URI_XMLSOAP)) { if (Constants.MIME_IMAGE.equals(mimeQName)) { mimeInfo = new MimeInfo("image/jpeg", ""); } else if (Constants.MIME_PLAINTEXT.equals(mimeQName)) { mimeInfo = new MimeInfo("text/plain", ""); } else if (Constants.MIME_MULTIPART.equals(mimeQName)) { mimeInfo = new MimeInfo("multipart/related", ""); } else if (Constants.MIME_SOURCE.equals(mimeQName)) { mimeInfo = new MimeInfo("text/xml", ""); } else if (Constants.MIME_OCTETSTREAM.equals(mimeQName)) { mimeInfo = new MimeInfo("application/octet-stream", ""); } } } p.setMIMEInfo(mimeInfo); } // setMIMEType
ret = parm.getType().getName(); if ((parm.isOmittable() && parm.getType().getDimensions().equals("")) || (parm.getType() instanceof CollectionType && ((CollectionType) parm.getType()).isWrapped()) || parm.getType().getUnderlTypeNillable()) { ret = getWrapperType(parm.getType()); ret = parm.getType().getName(); } else { ret += parm.getMIMEInfo().getDimensions();
ret = parm.getType().getName(); if ((parm.isOmittable() && parm.getType().getDimensions().equals("")) || (parm.getType() instanceof CollectionType && ((CollectionType) parm.getType()).isWrapped()) || parm.getType().getUnderlTypeNillable()) { ret = getWrapperType(parm.getType()); ret = parm.getType().getName(); } else { ret += parm.getMIMEInfo().getDimensions();
ret = parm.getType().getName(); if ((parm.isOmittable() && parm.getType().getDimensions().equals("")) || (parm.getType() instanceof CollectionType && ((CollectionType) parm.getType()).isWrapped()) || parm.getType().getUnderlTypeNillable()) { ret = getWrapperType(parm.getType()); ret = parm.getType().getName(); } else { ret += parm.getMIMEInfo().getDimensions();
/** * Set the MIME type. This can be determine in one of two ways: * 1. From WSDL 1.1 MIME constructs on the binding (passed in); * 2. From AXIS-specific xml MIME types. * * @param p * @param mimeInfo */ private void setMIMEInfo(Parameter p, MimeInfo mimeInfo) { // If there is no binding MIME construct (ie., the mimeType parameter is // null), then get the MIME type from the AXIS-specific xml MIME type. if (mimeInfo == null && p.getType() != null) { QName mimeQName = p.getType().getQName(); if (mimeQName.getNamespaceURI().equals(Constants.NS_URI_XMLSOAP)) { if (Constants.MIME_IMAGE.equals(mimeQName)) { mimeInfo = new MimeInfo("image/jpeg", ""); } else if (Constants.MIME_PLAINTEXT.equals(mimeQName)) { mimeInfo = new MimeInfo("text/plain", ""); } else if (Constants.MIME_MULTIPART.equals(mimeQName)) { mimeInfo = new MimeInfo("multipart/related", ""); } else if (Constants.MIME_SOURCE.equals(mimeQName)) { mimeInfo = new MimeInfo("text/xml", ""); } else if (Constants.MIME_OCTETSTREAM.equals(mimeQName)) { mimeInfo = new MimeInfo("application/octet-stream", ""); } } } p.setMIMEInfo(mimeInfo); } // setMIMEType
/** * Set the MIME type. This can be determine in one of two ways: * 1. From WSDL 1.1 MIME constructs on the binding (passed in); * 2. From AXIS-specific xml MIME types. * * @param p * @param mimeInfo */ private void setMIMEInfo(Parameter p, MimeInfo mimeInfo) { // If there is no binding MIME construct (ie., the mimeType parameter is // null), then get the MIME type from the AXIS-specific xml MIME type. if (mimeInfo == null && p.getType() != null) { QName mimeQName = p.getType().getQName(); if (mimeQName.getNamespaceURI().equals(Constants.NS_URI_XMLSOAP)) { if (Constants.MIME_IMAGE.equals(mimeQName)) { mimeInfo = new MimeInfo("image/jpeg", ""); } else if (Constants.MIME_PLAINTEXT.equals(mimeQName)) { mimeInfo = new MimeInfo("text/plain", ""); } else if (Constants.MIME_MULTIPART.equals(mimeQName)) { mimeInfo = new MimeInfo("multipart/related", ""); } else if (Constants.MIME_SOURCE.equals(mimeQName)) { mimeInfo = new MimeInfo("text/xml", ""); } else if (Constants.MIME_OCTETSTREAM.equals(mimeQName)) { mimeInfo = new MimeInfo("application/octet-stream", ""); } } } p.setMIMEInfo(mimeInfo); } // setMIMEType
/** * Method writeParameters * * @param pw * @param parms */ protected void writeParameters(PrintWriter pw, Parameters parms) { // Write the input and inout parameter list boolean needComma = false; for (int i = 0; i < parms.list.size(); ++i) { Parameter p = (Parameter) parms.list.get(i); if (p.getMode() != Parameter.OUT) { if (needComma) { pw.print(", "); } else { needComma = true; } String javifiedName = Utils.xmlNameToJava(p.getName()); if (p.getMode() != Parameter.IN) { javifiedName += ".value"; } if (p.getMIMEInfo() == null && !p.isOmittable()) { javifiedName = Utils.wrapPrimitiveType(p.getType(), javifiedName); } pw.print(javifiedName); } } } // writeParamters
/** * Method writeParameters * * @param pw * @param parms */ protected void writeParameters(PrintWriter pw, Parameters parms) { // Write the input and inout parameter list boolean needComma = false; for (int i = 0; i < parms.list.size(); ++i) { Parameter p = (Parameter) parms.list.get(i); if (p.getMode() != Parameter.OUT) { if (needComma) { pw.print(", "); } else { needComma = true; } String javifiedName = Utils.xmlNameToJava(p.getName()); if (p.getMode() != Parameter.IN) { javifiedName += ".value"; } if (p.getMIMEInfo() == null && !p.isOmittable()) { javifiedName = Utils.wrapPrimitiveType(p.getType(), javifiedName); } pw.print(javifiedName); } } } // writeParamters
/** * Method writeParameters * * @param pw * @param parms */ protected void writeParameters(PrintWriter pw, Parameters parms) { // Write the input and inout parameter list boolean needComma = false; for (int i = 0; i < parms.list.size(); ++i) { Parameter p = (Parameter) parms.list.get(i); if (p.getMode() != Parameter.OUT) { if (needComma) { pw.print(", "); } else { needComma = true; } String javifiedName = Utils.xmlNameToJava(p.getName()); if (p.getMode() != Parameter.IN) { javifiedName += ".value"; } if (p.getMIMEInfo() == null && !p.isOmittable()) { javifiedName = Utils.wrapPrimitiveType(p.getType(), javifiedName); } pw.print(javifiedName); } } } // writeParamters
/** * Get the QName that could be used in the xsi:type * when serializing an object for this parameter/return * * @param param is a parameter * @return the QName of the parameter's xsi type */ public static QName getXSIType(Parameter param) { if (param.getMIMEInfo() != null) { return getMIMETypeQName(param.getMIMEInfo().getType()); } return getXSIType(param.getType()); } // getXSIType
/** * Get the QName that could be used in the xsi:type * when serializing an object for this parameter/return * * @param param is a parameter * @return the QName of the parameter's xsi type */ public static QName getXSIType(Parameter param) { if (param.getMIMEInfo() != null) { return getMIMETypeQName(param.getMIMEInfo().getType()); } return getXSIType(param.getType()); } // getXSIType
/** * Get the QName that could be used in the xsi:type * when serializing an object for this parameter/return * * @param param is a parameter * @return the QName of the parameter's xsi type */ public static QName getXSIType(Parameter param) { if (param.getMIMEInfo() != null) { return getMIMETypeQName(param.getMIMEInfo().getType()); } return getXSIType(param.getType()); } // getXSIType