CXF 소스 코드 (WSDiscoveryServiceImpl
클래스)에보고 한 후 내가 답을 발견했습니다
public ProbeMatchesType handleProbe(ProbeType pt) {
List<HelloType> consider = new LinkedList<HelloType>(registered);
//step one, consider the "types"
//ALL types in the probe must be in the registered type
if (pt.getTypes() != null && !pt.getTypes().isEmpty()) {
ListIterator<HelloType> cit = consider.listIterator();
while (cit.hasNext()) {
HelloType ht = cit.next();
boolean matches = true;
for (QName qn : pt.getTypes()) {
if (!ht.getTypes().contains(qn)) {
matches = false;
}
}
if (!matches) {
cit.remove();
}
}
}
//next, consider the scopes
matchScopes(pt, consider);
if (consider.isEmpty()) {
return null;
}
ProbeMatchesType pmt = new ProbeMatchesType();
for (HelloType ht : consider) {
ProbeMatchType m = new ProbeMatchType();
m.setEndpointReference(ht.getEndpointReference());
m.setScopes(ht.getScopes());
m.setMetadataVersion(ht.getMetadataVersion());
m.getTypes().addAll(ht.getTypes());
m.getXAddrs().addAll(ht.getXAddrs());
pmt.getProbeMatch().add(m);
}
return pmt;
}
간단히 - 그것은 출판 서비스를 반복 처리의 QName를 비교합니다. 검색된 qname이 출판물에서 발견되면 ProbeMatch
에 추가됩니다. 그래서 그것을 구현하기 위해 필요한 QName 서비스를 구현하고 게시해야합니다.