javax.xml.ws.soap.AddressingFeature Java Examples
The following examples show how to use
javax.xml.ws.soap.AddressingFeature.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WSServiceDelegate.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #2
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #3
Source File: AddressingPolicyMapConfigurator.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #4
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #5
Source File: WSServiceDelegate.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #6
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #7
Source File: JaxWsEndpointImpl.java From cxf with Apache License 2.0 | 6 votes |
public final void resolveFeatures() { AddressingFeature addressing = getAddressingFeature(); if (addressing == null) { return; } if (addressing.isEnabled()) { WSAddressingFeature feature = getWSAddressingFeature(); if (feature == null) { feature = new WSAddressingFeature(); addAddressingFeature(feature); } feature.setAddressingRequired(addressing.isRequired()); feature.setResponses(addressing.getResponses().toString()); } else { removeAddressingFeature(); getEndpointInfo().setProperty("org.apache.cxf.ws.addressing.MAPAggregator.addressingDisabled", Boolean.TRUE); } }
Example #8
Source File: AddressingPolicyMapConfigurator.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #9
Source File: WSADisableTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void testDiaptchWithWsaDisable() throws Exception { QName port = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersPort"); Dispatch<SOAPMessage> disptch = getService().createDispatch(port, SOAPMessage.class, javax.xml.ws.Service.Mode.MESSAGE, new AddressingFeature(false)); ((BindingProvider)disptch).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:" + PORT + "/jaxws/add"); InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml"); SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is); assertNotNull(soapReqMsg); try { disptch.invoke(soapReqMsg); fail("The MAPcodec ate the SOAPFaultException"); } catch (javax.xml.ws.soap.SOAPFaultException e) { //expected } }
Example #10
Source File: WSServiceDelegate.java From hottub with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #11
Source File: AddressingPolicyMapConfigurator.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #12
Source File: WSServiceDelegate.java From hottub with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #13
Source File: WSServiceDelegate.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #14
Source File: WSServiceDelegate.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #15
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #16
Source File: AddressingPolicyMapConfigurator.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #17
Source File: WSServiceDelegate.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #18
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, jaxbContext, mode, features); }
Example #19
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) { WSEndpointReference wsepr = null; boolean isAddressingEnabled = false; AddressingFeature af = features.get(AddressingFeature.class); if (af == null) { af = this.features.get(AddressingFeature.class); } if (af != null && af.isEnabled()) isAddressingEnabled = true; MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class); if (msa == null) { msa = this.features.get(MemberSubmissionAddressingFeature.class); } if (msa != null && msa.isEnabled()) isAddressingEnabled = true; if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) { wsepr = wsdlService.get(portName).getEPR(); } return createDispatch(portName, wsepr, aClass, mode, features); }
Example #20
Source File: AddressingPolicyMapConfigurator.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #21
Source File: AddressingPolicyMapConfigurator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Puts an addressing policy into the PolicyMap if the addressing feature was set. */ public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding) throws PolicyException { LOGGER.entering(policyMap, model, wsBinding); Collection<PolicySubject> subjects = new ArrayList<PolicySubject>(); if (policyMap != null) { final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("addressingFeature = " + addressingFeature); } if ((addressingFeature != null) && addressingFeature.isEnabled()) { //add wsam:Addrressing assertion if not exists. addWsamAddressing(subjects, policyMap, model, addressingFeature); } } // endif policy map not null LOGGER.exiting(subjects); return subjects; }
Example #22
Source File: DispatchOpTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void testResolveOperationWithSourceAndWSA() throws Exception { ServiceImpl service = new ServiceImpl(getBus(), getClass().getResource(WSDL_RESOURCE), SERVICE_NAME, null, new AddressingFeature()); Dispatch<Source> disp = service.createDispatch( PORT_NAME, Source.class, Service.Mode.PAYLOAD); disp.getRequestContext().put(MessageContext.WSDL_OPERATION, OP_NAME); disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ADDRESS); d.setMessageObserver(new MessageReplayObserver(RESP_RESOURCE)); BindingOperationVerifier bov = new BindingOperationVerifier(); ((DispatchImpl<?>)disp).getClient().getOutInterceptors().add(bov); Document doc = StaxUtils.read(getResourceAsStream(REQ_RESOURCE)); DOMSource source = new DOMSource(doc); Source res = disp.invoke(source); assertNotNull(res); BindingOperationInfo boi = bov.getBindingOperationInfo(); assertNotNull(boi); assertEquals(OP_NAME, boi.getName()); }
Example #23
Source File: W3CWsaServerTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) { try { if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) { return WSDLBoundOperation.ANONYMOUS.required; } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) { return WSDLBoundOperation.ANONYMOUS.prohibited; } } catch (NoSuchMethodError e) { //Ignore error, defaut to optional } //wsaw wsdl binding case will have some value set on wbo return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional; }
Example #24
Source File: W3CAddressingWSDLGeneratorExtension.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public void start(WSDLGenExtnContext ctxt) { WSBinding binding = ctxt.getBinding(); TypedXmlWriter root = ctxt.getRoot(); enabled = binding.isFeatureEnabled(AddressingFeature.class); if (!enabled) return; AddressingFeature ftr = binding.getFeature(AddressingFeature.class); required = ftr.isRequired(); root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix()); }
Example #25
Source File: AddressingPolicyMapConfigurator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void addWsamAddressing(Collection<PolicySubject> subjects, PolicyMap policyMap, SEIModel model, AddressingFeature addressingFeature) throws PolicyException { final QName bindingName = model.getBoundPortTypeName(); final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName); final Policy addressingPolicy = createWsamAddressingPolicy(bindingName, addressingFeature); final PolicySubject addressingPolicySubject = new PolicySubject(wsdlSubject, addressingPolicy); subjects.add(addressingPolicySubject); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("Added addressing policy with ID \"" + addressingPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\""); } }
Example #26
Source File: W3CAddressingWSDLGeneratorExtension.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public void start(WSDLGenExtnContext ctxt) { WSBinding binding = ctxt.getBinding(); TypedXmlWriter root = ctxt.getRoot(); enabled = binding.isFeatureEnabled(AddressingFeature.class); if (!enabled) return; AddressingFeature ftr = binding.getFeature(AddressingFeature.class); required = ftr.isRequired(); root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix()); }
Example #27
Source File: JMSClientServerSoap12Test.java From cxf with Apache License 2.0 | 5 votes |
@Test public void testWSAddressingWithJms() throws Exception { QName serviceName = new QName("http://apache.org/hello_world_doc_lit", "SOAPService8"); QName portName = new QName("http://apache.org/hello_world_doc_lit", "SoapPort8"); URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl"); SOAPService2 service = new SOAPService2(wsdl, serviceName); Greeter greeter = markForClose(service.getPort(portName, Greeter.class, cff, new AddressingFeature())); for (int idx = 0; idx < 5; idx++) { greeter.greetMeOneWay("test String"); String greeting = greeter.greetMe("Milestone-" + idx); Assert.assertEquals(new String("Hello Milestone-") + idx, greeting); String reply = greeter.sayHi(); Assert.assertEquals("Bonjour", reply); try { greeter.pingMe(); Assert.fail("Should have thrown FaultException"); } catch (PingMeFault ex) { Assert.assertNotNull(ex.getFaultInfo()); } } }
Example #28
Source File: BindingImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public AddressingVersion getAddressingVersion() { AddressingVersion addressingVersion; if (features.isEnabled(AddressingFeature.class)) addressingVersion = AddressingVersion.W3C; else if (features.isEnabled(MemberSubmissionAddressingFeature.class)) addressingVersion = AddressingVersion.MEMBER; else addressingVersion = null; return addressingVersion; }
Example #29
Source File: W3CAddressingWSDLParserExtension.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) { QName ua = reader.getName(); if (ua.equals(AddressingVersion.W3C.wsdlExtensionTag)) { String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required"); binding.addFeature(new AddressingFeature(true, Boolean.parseBoolean(required))); XMLStreamReaderUtil.skipElement(reader); return true; // UsingAddressing is consumed } return false; }
Example #30
Source File: WsaTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected WsaTubeHelper getTubeHelper() { if(binding.isFeatureEnabled(AddressingFeature.class)) { return new WsaTubeHelperImpl(wsdlPort, null, binding); } else if(binding.isFeatureEnabled(MemberSubmissionAddressingFeature.class)) { //seiModel is null as it is not needed. return new com.sun.xml.internal.ws.addressing.v200408.WsaTubeHelperImpl(wsdlPort, null, binding); } else { // Addressing is not enabled, WsaTube should not be included in the pipeline throw new WebServiceException(AddressingMessages.ADDRESSING_NOT_ENABLED(this.getClass().getSimpleName())); } }