src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java

changeset 384
8f2986ff0235
parent 368
0989ad8c0860
child 408
b0610cd08440
equal deleted inserted replaced
380:7386eca865e1 384:8f2986ff0235
263 } 263 }
264 features.mergeFeatures(configFtrs, true); 264 features.mergeFeatures(configFtrs, true);
265 terminal = createProviderInvokerTube(implType, binding, invoker, container); 265 terminal = createProviderInvokerTube(implType, binding, invoker, container);
266 } else { 266 } else {
267 // Create runtime model for non Provider endpoints 267 // Create runtime model for non Provider endpoints
268 seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding); 268 seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding, primaryDoc);
269 if(binding instanceof SOAPBindingImpl){ 269 if(binding instanceof SOAPBindingImpl){
270 //set portKnownHeaders on Binding, so that they can be used for MU processing 270 //set portKnownHeaders on Binding, so that they can be used for MU processing
271 ((SOAPBindingImpl)binding).setPortKnownHeaders( 271 ((SOAPBindingImpl)binding).setPortKnownHeaders(
272 ((SOAPSEIModel)seiModel).getKnownHeaders()); 272 ((SOAPSEIModel)seiModel).getKnownHeaders());
273 } 273 }
434 return false; 434 return false;
435 } 435 }
436 436
437 437
438 private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort, 438 private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
439 Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding) { 439 Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
440 // RuntimeModeler rap; 440 SDDocumentSource primaryWsdl) {
441 // // Create runtime model for non Provider endpoints
442 //
443 // // wsdlPort will be null, means we will generate WSDL. Hence no need to apply
444 // // bindings or need to look in the WSDL
445 // if(wsdlPort == null){
446 // rap = new RuntimeModeler(implType,serviceName, binding.getBindingId(), binding.getFeatures().toArray());
447 // } else {
448 // /*
449 // This not needed anymore as wsdlFeatures are merged later anyway
450 // and so is the MTOMFeature.
451 // applyEffectiveMtomSetting(wsdlPort.getBinding(), binding);
452 // */
453 // //now we got the Binding so lets build the model
454 // rap = new RuntimeModeler(implType, serviceName, (WSDLPortImpl)wsdlPort, binding.getFeatures().toArray());
455 // }
456 // rap.setClassLoader(implType.getClassLoader());
457 // rap.setPortName(portName);
458 // return rap.buildRuntimeModel();
459 DatabindingFactory fac = DatabindingFactory.newInstance(); 441 DatabindingFactory fac = DatabindingFactory.newInstance();
460 DatabindingConfig config = new DatabindingConfig(); 442 DatabindingConfig config = new DatabindingConfig();
461 config.setEndpointClass(implType); 443 config.setEndpointClass(implType);
462 config.getMappingInfo().setServiceName(serviceName); 444 config.getMappingInfo().setServiceName(serviceName);
463 config.setWsdlPort(wsdlPort); 445 config.setWsdlPort(wsdlPort);
464 config.setWSBinding(binding); 446 config.setWSBinding(binding);
465 // config.setFeatures(binding.getFeatures().toArray());
466 // config.getMappingInfo().setBindingID(binding.getBindingId());
467 config.setClassLoader(implType.getClassLoader()); 447 config.setClassLoader(implType.getClassLoader());
468 config.getMappingInfo().setPortName(portName); 448 config.getMappingInfo().setPortName(portName);
469 449 if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
470 config.setMetadataReader(getExternalMetadatReader(implType, binding)); 450 config.setMetadataReader(getExternalMetadatReader(implType, binding));
471 451
472 com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config); 452 com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
473 return (AbstractSEIModelImpl) rt.getModel(); 453 return (AbstractSEIModelImpl) rt.getModel();
474 } 454 }

mercurial