use of com.sun.xml.ws.model.JavaMethodImpl in project metro-jax-ws by eclipse-ee4j.
the class DatabindingImpl method initStubHandlers.
// Refactored from SEIStub
private void initStubHandlers() {
stubHandlers = new HashMap<>();
Map<ActionBasedOperationSignature, JavaMethodImpl> syncs = new HashMap<>();
// first fill in sychronized versions
for (JavaMethodImpl m : seiModel.getJavaMethods()) {
if (!m.getMEP().isAsync) {
StubHandler handler = new StubHandler(m, packetFactory);
syncs.put(m.getOperationSignature(), m);
stubHandlers.put(m.getMethod(), handler);
}
}
for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
JavaMethodImpl sync = syncs.get(jm.getOperationSignature());
if (jm.getMEP() == MEP.ASYNC_CALLBACK || jm.getMEP() == MEP.ASYNC_POLL) {
Method m = jm.getMethod();
StubAsyncHandler handler = new StubAsyncHandler(jm, sync, packetFactory);
stubHandlers.put(m, handler);
}
}
}
use of com.sun.xml.ws.model.JavaMethodImpl in project metro-jax-ws by eclipse-ee4j.
the class SEIStub method initMethodHandlers.
private void initMethodHandlers() {
Map<WSDLBoundOperation, JavaMethodImpl> syncs = new HashMap<>();
// first fill in sychronized versions
for (JavaMethodImpl m : seiModel.getJavaMethods()) {
if (!m.getMEP().isAsync) {
SyncMethodHandler handler = new SyncMethodHandler(this, m);
syncs.put(m.getOperation(), m);
methodHandlers.put(m.getMethod(), handler);
}
}
for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
JavaMethodImpl sync = syncs.get(jm.getOperation());
if (jm.getMEP() == MEP.ASYNC_CALLBACK) {
Method m = jm.getMethod();
CallbackMethodHandler handler = new CallbackMethodHandler(this, m, m.getParameterTypes().length - 1);
methodHandlers.put(m, handler);
}
if (jm.getMEP() == MEP.ASYNC_POLL) {
Method m = jm.getMethod();
PollingMethodHandler handler = new PollingMethodHandler(this, m);
methodHandlers.put(m, handler);
}
}
}
use of com.sun.xml.ws.model.JavaMethodImpl in project metro-jax-ws by eclipse-ee4j.
the class WSDLGenerator method generateBinding.
/**
* Generates the Binding section of the WSDL
*/
protected void generateBinding() {
Binding newBinding = serviceDefinitions.binding().name(model.getBoundPortTypeName().getLocalPart());
extension.addBindingExtension(newBinding);
newBinding.type(model.getPortTypeName());
boolean first = true;
for (JavaMethodImpl method : model.getJavaMethods()) {
if (first) {
SOAPBinding sBinding = method.getBinding();
SOAPVersion soapVersion = sBinding.getSOAPVersion();
if (soapVersion == SOAPVersion.SOAP_12) {
com.sun.xml.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding();
soapBinding.transport(this.binding.getBindingId().getTransport());
if (sBinding.getStyle().equals(Style.DOCUMENT))
soapBinding.style(DOCUMENT);
else
soapBinding.style(RPC);
} else {
com.sun.xml.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding();
soapBinding.transport(this.binding.getBindingId().getTransport());
if (sBinding.getStyle().equals(Style.DOCUMENT))
soapBinding.style(DOCUMENT);
else
soapBinding.style(RPC);
}
first = false;
}
if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12)
generateSOAP12BindingOperation(method, newBinding);
else
generateBindingOperation(method, newBinding);
}
}
Aggregations