/* 166 */ Style style = opMetaData.getStyle();
/* 167 */ SOAPElement soapBodyElement = soapBody;
/* 168 */ if (style == Style.RPC)
/* */ {
/* 170 */ QName opQName = opMetaData.getQName();
/* 171 */ Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
/* */
/* 173 */ if (this.log.isDebugEnabled()) {
/* 174 */ this.log.debug("Create RPC body element: " + opName);
/* */ }
/* 176 */ soapBodyElement = new SOAPBodyElementRpc(opName);
/* 177 */ soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
/* */
/* 180 */ if (opMetaData.getUse() == Use.ENCODED)
/* */ {
/* 182 */ String envURI = soapEnvelope.getNamespaceURI();
/* 183 */ String envPrefix = soapEnvelope.getPrefix();
/* 184 */ soapBodyElement.setAttributeNS(envURI, envPrefix + ":encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/");
/* */ }
/* */ }
/* */
/* 188 */ for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
/* */ {
/* 190 */ QName xmlName = paramMetaData.getXmlName();
/* 191 */ Object value = epInv.getRequestParamValue(xmlName);
/* */
/* 193 */ if (paramMetaData.isSwA())
/* */ {
/* 196 */ CIDGenerator cidGenerator = reqMessage.getCidGenerator();
/* 197 */ AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
/* 198 */ reqMessage.addAttachmentPart(part);
/* */
/* 201 */ if (((value instanceof DataHandler)) && ((msgContext instanceof MessageContextJAXWS)))
/* */ {
/* 203 */ DataHandler dataHandler = (DataHandler)value;
/* 204 */ Map attachments = (Map)msgContext.get("javax.xml.ws.binding.attachments.outbound");
/* 205 */ attachments.put(dataHandler.getContentType(), dataHandler);
/* */ }
/* */ }
/* */ else
/* */ {
/* 210 */ SOAPElement soapElement = paramMetaData.isInHeader() ? soapHeader : soapBodyElement;
/* 211 */ addParameterToMessage(paramMetaData, value, soapElement);
/* */ }
/* */
/* */ }
/* */
/* 216 */ if (unboundHeaders != null)
/* */ {
/* 218 */ Iterator it = unboundHeaders.values().iterator();
/* 219 */ while (it.hasNext())
/* */ {
/* 221 */ UnboundHeader unboundHeader = (UnboundHeader)it.next();
/* 222 */ if (unboundHeader.getMode() != ParameterMode.OUT)
/* */ {
/* 224 */ QName xmlName = unboundHeader.getXmlName();
/* 225 */ Object value = unboundHeader.getHeaderValue();
/* */
/* 227 */ xmlName = namespaceRegistry.registerQName(xmlName);
/* 228 */ Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());
/* */
/* 230 */ this.log.debug("Add unboundHeader element: " + soapName);
/* 231 */ SOAPContentElement contentElement = new SOAPHeaderElementImpl(soapName);
/* 232 */ contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
/* */