Search in sources :

Example 76 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class WSEndpointReferenceTest method testCreateViaBuffer.

public void testCreateViaBuffer() throws Exception {
    WSEndpointReference epr = createEPR();
    System.out.println(epr.toString());
}
Also used : WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference)

Example 77 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class WseprTest method testMetadataWithNullParams.

/**
 * Empty Metadata element should not exsit in EndpointReference element.
 * @throws Exception
 */
public void testMetadataWithNullParams() throws Exception {
    WSEndpointReference wSEndpointReference = new WSEndpointReference(AddressingVersion.W3C, address, null, null, null, null, null, referenceParameters);
    Node md = string2Doc(wSEndpointReference.toString(), "wsa:Metadata");
    validateEndpointReference(wSEndpointReference.toString());
    assertNull("EndpointReference element should not contain empty Metadata element.", md);
}
Also used : WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) Node(org.w3c.dom.Node)

Example 78 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class WseprTest method testReferenceParameters.

/**
 * Empty ReferenceParameters element should not exist in  EndpointReference element.
 * @throws Exception
 */
public void testReferenceParameters() throws Exception {
    WSEndpointReference wSEndpointReference = new WSEndpointReference(AddressingVersion.W3C, address, serviceName, portName, portTypeName, null, null, referenceParameters);
    Node epr = string2Doc(wSEndpointReference.toString(), "wsa:ReferenceParameters");
    validateEndpointReference(wSEndpointReference.toString());
    assertNull("EndpointReference element should not contain empty ReferenceParameters element.", epr);
}
Also used : WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) Node(org.w3c.dom.Node)

Example 79 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EprExtensionsContributorTest method testEprInPublishedWSDL.

/**
 * Tests the published wsdl for EPR extensions
 * @throws Exception
 */
public void testEprInPublishedWSDL() throws Exception {
    HelloService service = new HelloService();
    Hello hello = service.getHelloPort();
    WSDLPort wsdlModel = ((WSBindingProvider) hello).getPortInfo().getPort();
    WSEndpointReference wsdlepr = wsdlModel.getExtension(WSEndpointReference.class);
    assertTrue(wsdlepr.getEPRExtensions().size() == 2);
    WSEndpointReference.EPRExtension idExtn = wsdlepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
    assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
Also used : QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) WSDLPort(com.sun.xml.ws.api.model.wsdl.WSDLPort)

Example 80 with WSEndpointReference

use of com.sun.xml.ws.api.addressing.WSEndpointReference in project metro-jax-ws by eclipse-ee4j.

the class EPRWriteNReadTest method test1.

public void test1() throws Exception {
    URL fileurl = getResource("hello_literal_identity1.wsdl");
    WSDLModel doc = RuntimeWSDLParser.parse(fileurl, new StreamSource(fileurl.toExternalForm()), getResolver(), true, null);
    WSDLService service = doc.getService(new QName("urn:test", "Hello"));
    WSDLPort port = service.getFirstPort();
    WSEndpointReference wsepr = port.getExtension(WSEndpointReference.class);
    verifyEPR(wsepr);
}
Also used : QName(javax.xml.namespace.QName) StreamSource(javax.xml.transform.stream.StreamSource) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) URL(java.net.URL)

Aggregations

WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)80 QName (javax.xml.namespace.QName)32 Element (org.w3c.dom.Element)17 URL (java.net.URL)16 StreamSource (javax.xml.transform.stream.StreamSource)16 EndpointReference (jakarta.xml.ws.EndpointReference)13 WSBindingProvider (com.sun.xml.ws.developer.WSBindingProvider)11 SAAJMessage (com.sun.xml.ws.message.saaj.SAAJMessage)11 SOAPMessage (jakarta.xml.soap.SOAPMessage)11 Packet (com.sun.xml.ws.api.message.Packet)10 XMLStreamReader (javax.xml.stream.XMLStreamReader)10 Message (com.sun.xml.ws.api.message.Message)9 WebServiceException (jakarta.xml.ws.WebServiceException)9 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)8 ByteArrayInputStream (java.io.ByteArrayInputStream)8 WSDLPort (com.sun.xml.ws.api.model.wsdl.WSDLPort)6 MessageFactory (jakarta.xml.soap.MessageFactory)6 MimeHeaders (jakarta.xml.soap.MimeHeaders)6 Service (jakarta.xml.ws.Service)6 W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)6