use of org.apache.cxf.service.model.OperationInfo in project cxf by apache.
the class ServiceModelVisitor method walk.
public void walk() {
begin(serviceInfo);
begin(serviceInfo.getInterface());
for (OperationInfo o : serviceInfo.getInterface().getOperations()) {
begin(o);
visitOperation(o);
end(o);
}
end(serviceInfo.getInterface());
for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) {
begin(endpointInfo);
end(endpointInfo);
}
for (BindingInfo bindingInfo : serviceInfo.getBindings()) {
begin(bindingInfo);
end(bindingInfo);
}
end(serviceInfo);
}
use of org.apache.cxf.service.model.OperationInfo in project cxf by apache.
the class ServiceModelVisitor method visitOperation.
private void visitOperation(OperationInfo o) {
MessageInfo in = o.getInput();
if (in != null) {
begin(in);
for (MessagePartInfo part : in.getMessageParts()) {
begin(part);
end(part);
}
end(in);
}
MessageInfo out = o.getOutput();
if (out != null) {
begin(out);
for (MessagePartInfo part : out.getMessageParts()) {
begin(part);
end(part);
}
end(out);
}
for (FaultInfo f : o.getFaults()) {
begin(f);
for (MessagePartInfo part : f.getMessageParts()) {
begin(part);
end(part);
}
end(f);
}
if (o.isUnwrappedCapable()) {
OperationInfo uop = o.getUnwrappedOperation();
begin(uop);
visitOperation(o.getUnwrappedOperation());
end(uop);
}
}
use of org.apache.cxf.service.model.OperationInfo in project cxf by apache.
the class SimpleMethodDispatcher method getBindingOperation.
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) {
Map<BindingInfo, BindingOperationInfo> bops = infoMap.get(method);
if (bops == null) {
return null;
}
BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding());
if (bop == null) {
OperationInfo o = methodToOp.get(method);
if (o == null) {
return null;
}
BindingInfo b = endpoint.getEndpointInfo().getBinding();
for (BindingOperationInfo bop2 : b.getOperations()) {
if (bop2.getOperationInfo().equals(o)) {
bop2 = getRealOperation(o, bop2);
bops.put(b, bop2);
return bop2;
}
}
}
return bop;
}
use of org.apache.cxf.service.model.OperationInfo in project cxf by apache.
the class SoapPreProtocolOutInterceptorTest method setUpBindingOperationInfo.
private BindingOperationInfo setUpBindingOperationInfo(String nsuri, String opreq, String opresp, Method method) {
ServiceInfo si = new ServiceInfo();
InterfaceInfo iinf = new InterfaceInfo(si, new QName(nsuri, method.getDeclaringClass().getSimpleName()));
OperationInfo opInfo = iinf.addOperation(new QName(nsuri, method.getName()));
opInfo.setProperty(Method.class.getName(), method);
opInfo.setInput(opreq, opInfo.createMessage(new QName(nsuri, opreq), Type.INPUT));
opInfo.setOutput(opresp, opInfo.createMessage(new QName(nsuri, opresp), Type.INPUT));
return new BindingOperationInfo(null, opInfo);
}
use of org.apache.cxf.service.model.OperationInfo in project cxf by apache.
the class XMLBindingFactory method createBindingInfo.
public BindingInfo createBindingInfo(ServiceInfo service, String namespace, Object config) {
BindingInfo info = new BindingInfo(service, "http://cxf.apache.org/bindings/xformat");
info.setName(new QName(service.getName().getNamespaceURI(), service.getName().getLocalPart() + "XMLBinding"));
for (OperationInfo op : service.getInterface().getOperations()) {
adjustConcreteNames(op.getInput());
adjustConcreteNames(op.getOutput());
BindingOperationInfo bop = info.buildOperation(op.getName(), op.getInputName(), op.getOutputName());
info.addOperation(bop);
}
return info;
}
Aggregations