You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use a custom processor for a ParentNode (not a text node) it doesn't work: the related fiels stay null.
Here is the code for the matching class:
@XMLObject("//RequestSecurityTokenResponse")
public class TokenWrapper {
public static class RequestedSecurityToken {
private String xml;
public RequestedSecurityToken(String lxml) {
xml=lxml;
}
public String getXml() {
return xml;
}
}
@XMLField(value="RequestedSecurityToken",processor=RequestedSecurityTokenProcessor.class)
private RequestedSecurityToken requestedSecurityToken;
public String getToken() {
return requestedSecurityToken.getXml();
}
public static class RequestedSecurityTokenProcessor implements Processor<RequestedSecurityToken> {
@Override
public RequestedSecurityToken process(String inputValue) {
return new RequestedSecurityToken(inputValue);
}
}
}
I did look at the code and I think that the bug is in the IseSoapParserImpl at line 401 in the needsParser function: should return true is hasProcessor is true:
private boolean needsParser(Field fieldToSet) {
// Is it a text node?
if (parserMap.containsKey(fieldToSet.getType())) {
return false;
}
// Does it have a processor to deal with it rather than a generic
// parser?
if (hasProcessor(fieldToSet)) {
//Should return true I think
//or else the cond should be !hasProcessor(fieldToSet)
return false;
}
// Is it a list of text nodes?
if (List.class.isAssignableFrom(fieldToSet.getType())
&& parserMap.containsKey(getListItemClass(fieldToSet.getGenericType()))) {
return false;
}
// No to all of the above, .'. it needs a parser
return true;
}
The text was updated successfully, but these errors were encountered:
Processors are for text nodes or attributes - what are you expecting it to do? I gather you want to have the processor get called with the raw serialized XML for that node?
When trying to use a custom processor for a ParentNode (not a text node) it doesn't work: the related fiels stay null.
Here is the code for the matching class:
I did look at the code and I think that the bug is in the IseSoapParserImpl at line 401 in the needsParser function: should return true is hasProcessor is true:
The text was updated successfully, but these errors were encountered: