use of org.apache.cxf.jaxb.JAXBDataBinding in project BIMserver by opensourceBIM.
the class SoapChannel method newToken.
@Override
public void newToken(String token) {
if (useSoapHeaderSessions) {
for (PublicInterface p : getServiceInterfaces().values()) {
List<Header> headers = new ArrayList<Header>();
try {
Token tokenObject = new Token(token);
Header sessionHeader = new Header(new QName("uri:org.bimserver.shared", "token"), tokenObject, new JAXBDataBinding(Token.class));
headers.add(sessionHeader);
} catch (JAXBException e) {
LOGGER.error("", e);
}
((BindingProvider) p).getRequestContext().put(Header.HEADER_LIST, headers);
}
}
}
Aggregations