/* 783 */ if (opMetaData.isDocumentWrapped())
/* */ {
/* 785 */ if (seiMethodMapping == null) {
/* 786 */ throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");
/* */ }
/* 788 */ WsdlReturnValueMapping returnValueMapping = seiMethodMapping.getWsdlReturnValueMapping();
/* 789 */ if (returnValueMapping != null)
/* */ {
/* 791 */ ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
/* 792 */ JavaWsdlMapping javaWsdlMapping = seiMapping.getJavaWsdlMapping();
/* 793 */ JavaXmlTypeMapping javaXmlTypeMapping = javaWsdlMapping.getTypeMappingForQName(xmlType);
/* 794 */ if (javaXmlTypeMapping == null) {
/* 795 */ throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);
/* */ }
/* 797 */ Map map = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
/* 798 */ String elementName = returnValueMapping.getWsdlMessagePartName();
/* 799 */ String variable = (String)map.get(elementName);
/* 800 */ if (variable == null) {
/* 801 */ throw new IllegalArgumentException("Could not determine variable name for element: " + elementName);
/* */ }
/* 803 */ String wrappedType = returnValueMapping.getMethodReturnValue();
/* 804 */ QName element = new QName(elementName);
/* 805 */ WrappedParameter wrappedParameter = new WrappedParameter(element, wrappedType, variable, -1);
/* 806 */ wrappedResponseParameters.add(0, wrappedParameter);
/* */ }
/* */
/* 809 */ outMetaData.setWrappedParameters(wrappedResponseParameters);
/* */ }
/* */ else
/* */ {
/* 813 */ if (seiMethodMapping != null)
/* */ {
/* 815 */ MethodParamPartsMapping part = seiMethodMapping.getMethodParamPartsMappingByPartName(opOutput.getPartName());
/* 816 */ String mode = null;
/* 817 */ if (part != null)
/* */ {
/* 819 */ WsdlMessageMapping wsdlMessageMapping = part.getWsdlMessageMapping();
/* 820 */ mode = wsdlMessageMapping.getParameterMode();
/* */ }
/* 822 */ if ("INOUT".equals(mode))
/* */ {
/* 824 */ ParameterMetaData inMetaData = opMetaData.getParameter(xmlName);
/* 825 */ if (inMetaData != null)
/* */ {
/* 827 */ inMetaData.setMode(ParameterMode.INOUT);
/* 828 */ return wsdlPosition;
/* */ }
/* */
/* 831 */ throw new WSException("Could not update IN parameter to be INOUT, as indicated in the mapping: " + opOutput.getPartName());
/* */ }
/* */
/* 834 */ if ("OUT".equals(mode))
/* */ {
/* 836 */ hasReturnMapping = false;
/* 837 */ javaTypeName = part.getParamType();
/* 838 */ outMetaData.setIndex(part.getParamPosition());
/* 839 */ outMetaData.setJavaTypeName(javaTypeName);
/* */ }
/* */ else
/* */ {
/* 843 */ WsdlReturnValueMapping returnValueMapping = seiMethodMapping.getWsdlReturnValueMapping();
/* 844 */ if (returnValueMapping != null)
/* */ {
/* 846 */ javaTypeName = returnValueMapping.getMethodReturnValue();
/* 847 */ outMetaData.setJavaTypeName(javaTypeName);
/* */ }
/* */ }
/* */ }
/* */