if (writer == null) {
throw new SOAPException("Could not figure out how to marshal data");
}
if (isOutBound && callback.getWebResult() != null && callback.getWebResult().header()) {
SOAPHeader header = envelope.getHeader();
wroteHeader = true;
writer.write(objCtx.getReturn(), callback.getWebResultQName(), header);
addSOAPHeaderAttributes(header, callback.getWebResultQName(), true);
}
// Add the in,inout,out args depend on the inputMode
WebParam.Mode ignoreParamMode = isOutBound ? WebParam.Mode.IN : WebParam.Mode.OUT;
int noArgs = callback.getParamsLength();
// Marshal parts of mode that should notbe ignored and are not part of
// the SOAP Headers
Object[] args = (Object[])objCtx.getMessageObjects();
for (int idx = 0; idx < noArgs; idx++) {
WebParam param = callback.getWebParam(idx);
if ((param.mode() != ignoreParamMode) && param.header()) {
SOAPHeader header = envelope.getHeader();
wroteHeader = true;
Object partValue = args[idx];
if (param.mode() != WebParam.Mode.IN) {
partValue = ((Holder)args[idx]).value;
}