postfix = "\""; break;  case Type.DATE: prefix = "xs:date(\""; postfix = "\")"; break;  case Type.DATE_TIME: prefix = "xs:dateTime(\""; postfix = "\")"; break;  default: }
postfix = prefix; } }
    private String writeXQueryFunctionParameter(String paramType, int paramCardinality, Node nSOAPParam) throws XPathException    {    	String prefix = new String();    	String postfix = new String();    	    	//determine the type of the parameter    	int type = Type.getType(paramType);    	    	switch(type)    	{    		case Type.BASE64_BINARY:    			prefix ="xs:base64Binary(\"";    			postfix = "\")";    		break;    		    		case Type.STRING:    			prefix = "\"";    			postfix = "\"";    		break;    		    		case Type.DATE:    			prefix = "xs:date(\"";    			postfix = "\")";    		break;    		    		case Type.DATE_TIME:    			prefix = "xs:dateTime(\"";    			postfix = "\")";    		break;    		    		default:    	}        	//determine the cardinality of the parameter    	if(paramCardinality >= Cardinality.MANY)    	{    		//sequence    		StringBuffer param = new StringBuffer();    		    		param.append("(");    		    		NodeList nlParamSequenceItems = nSOAPParam.getChildNodes();    		for(int i=0; i < nlParamSequenceItems.getLength(); i++)    		{    			Node nParamSeqItem = nlParamSequenceItems.item(i);    			if(nParamSeqItem.getNodeType() == Node.ELEMENT_NODE)    			{    				param.append(prefix);    				param.append(nParamSeqItem.getFirstChild().getNodeValue());    				param.append(postfix);    	        		        		param.append(",");	//seperator for next item in sequence    	        	    			}    		}    		    		//remove last superflurous seperator    		if(param.charAt(param.length()-1) == ',')    		{    			param.deleteCharAt(param.length()-1);    		}    		    		param.append(")");    		    		return param.toString();    	}    	else    	{    		//atomic value    		return prefix +  nSOAPParam.getFirstChild().getNodeValue() + postfix;    	}    }