Search in sources :

Example 31 with W3CEndpointReference

use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class HelloLiteralTest method testDispatchGetW3CEPRFromClass.

public void testDispatchGetW3CEPRFromClass() {
    EndpointReference epr = ((BindingProvider) getDispatchSOAPMessage()).getEndpointReference(W3CEndpointReference.class);
    assertTrue(epr != null);
    assertTrue(epr instanceof W3CEndpointReference);
}
Also used : W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 32 with W3CEndpointReference

use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class HelloLiteralTest method testGetEPRMethodNoArg.

public void testGetEPRMethodNoArg() {
    EndpointReference epr = ((BindingProvider) stub).getEndpointReference();
    assertTrue(epr != null);
    assertTrue(epr instanceof W3CEndpointReference);
}
Also used : W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 33 with W3CEndpointReference

use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class HelloLiteralTest method testDispatchGetEPRMethodNoArg.

// functionality above needs to be clarified
public void testDispatchGetEPRMethodNoArg() {
    EndpointReference epr = ((BindingProvider) getDispatchJAXB()).getEndpointReference();
    assertTrue(epr != null);
    assertTrue(epr instanceof W3CEndpointReference);
}
Also used : W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 34 with W3CEndpointReference

use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class ClientEprTest method msEprGettertest.

private void msEprGettertest(BindingProvider bp, boolean hasWSDL) throws Exception {
    Service service = Service.create(serviceName);
    service.addPort(portName, jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
    Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
    // validate ms epr
    MemberSubmissionEndpointReference msEpr = bp.getEndpointReference(MemberSubmissionEndpointReference.class);
    // printEPR(msEpr);
    assertTrue(EprUtil.validateEPR(msEpr, endpointAddress, serviceName, portName, portTypeName, hasWSDL));
    W3CEndpointReference w3cEpr = bp.getEndpointReference(W3CEndpointReference.class);
    // printEPR(w3cEpr);
    // assertTrue(EprUtil.validateEPR(w3cEpr,endpointAddress, serviceName, portName, portTypeName, hasWSDL));
    assertTrue(EprUtil.validateEPR(w3cEpr, endpointAddress, null, null, null, false));
}
Also used : W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) Service(jakarta.xml.ws.Service) Dispatch(jakarta.xml.ws.Dispatch) MemberSubmissionEndpointReference(com.sun.xml.ws.developer.MemberSubmissionEndpointReference)

Example 35 with W3CEndpointReference

use of jakarta.xml.ws.wsaddressing.W3CEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EprMarshalUnmarshalTest method testW3CEprMarshalling.

public void testW3CEprMarshalling() throws Exception {
    JAXBContext ctx = JAXBContext.newInstance(W3CEndpointReference.class);
    JAXBResult res = new JAXBResult(ctx);
    W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
    builder.address("http://example.com");
    W3CEndpointReference epr = builder.build();
    // You will get the NPE
    epr.writeTo(res);
}
Also used : W3CEndpointReferenceBuilder(jakarta.xml.ws.wsaddressing.W3CEndpointReferenceBuilder) W3CEndpointReference(jakarta.xml.ws.wsaddressing.W3CEndpointReference) JAXBContext(jakarta.xml.bind.JAXBContext) JAXBResult(jakarta.xml.bind.util.JAXBResult)

Aggregations

W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)44 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)19 W3CEndpointReferenceBuilder (jakarta.xml.ws.wsaddressing.W3CEndpointReferenceBuilder)10 StreamResult (javax.xml.transform.stream.StreamResult)9 StreamSource (javax.xml.transform.stream.StreamSource)9 Endpoint (jakarta.xml.ws.Endpoint)6 WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)5 ByteArrayInputStream (java.io.ByteArrayInputStream)5 QName (javax.xml.namespace.QName)5 Source (javax.xml.transform.Source)5 DOMResult (javax.xml.transform.dom.DOMResult)5 ByteArrayOutputStream (java.io.ByteArrayOutputStream)4 URL (java.net.URL)4 ArrayList (java.util.ArrayList)4 Node (org.w3c.dom.Node)3 JAXBContext (jakarta.xml.bind.JAXBContext)2 JAXBException (jakarta.xml.bind.JAXBException)2 Marshaller (jakarta.xml.bind.Marshaller)2 JAXBResult (jakarta.xml.bind.util.JAXBResult)2 BindingProvider (jakarta.xml.ws.BindingProvider)2