use of com.sun.xml.ws.developer.MemberSubmissionEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class HelloLiteralTest method xxtestMSReadFrom.
public void xxtestMSReadFrom() {
Source mssrc = makeStreamSource(msEprString);
EndpointReference result = EndpointReference.readFrom(mssrc);
assertTrue(result != null);
assertTrue(result instanceof MemberSubmissionEndpointReference);
// result.writeTo(new StreamResult(System.out));
}
use of com.sun.xml.ws.developer.MemberSubmissionEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class HelloLiteralTest method testGetMSEPRFromClass.
// functionality needs to be clarrified
public void testGetMSEPRFromClass() {
EndpointReference epr = ((BindingProvider) stub).getEndpointReference(MemberSubmissionEndpointReference.class);
assertTrue(epr != null);
assertTrue(epr instanceof MemberSubmissionEndpointReference);
}
use of com.sun.xml.ws.developer.MemberSubmissionEndpointReference 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));
}
use of com.sun.xml.ws.developer.MemberSubmissionEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class EprMarshalUnmarshalTest method testMSEprMarshalling.
public void testMSEprMarshalling() throws JAXBException {
HelloService service = new HelloService();
BindingProvider bp = (BindingProvider) service.getHelloPort();
// validate w3c epr
W3CEndpointReference w3cEpr = (W3CEndpointReference) bp.getEndpointReference();
w3cEpr.writeTo(new StreamResult(System.out));
// assertTrue(EprUtil.validateEPR(w3cEpr, endpointAddress, serviceName, portName, portTypeName, true));
assertTrue(EprUtil.validateEPR(w3cEpr, endpointAddress, null, null, null, false));
Marshaller m = jaxbCtx.createMarshaller();
DOMResult w3cResult = new DOMResult();
m.marshal(w3cEpr, w3cResult);
// assertTrue(EprUtil.validateEPR(w3cResult.getNode(), W3CEndpointReference.class, endpointAddress, serviceName, portName, portTypeName, true));
assertTrue(EprUtil.validateEPR(w3cResult.getNode(), W3CEndpointReference.class, endpointAddress, null, null, null, false));
// validate ms epr
MemberSubmissionEndpointReference msEpr = bp.getEndpointReference(MemberSubmissionEndpointReference.class);
w3cEpr.writeTo(new StreamResult(System.out));
assertTrue(EprUtil.validateEPR(msEpr, endpointAddress, serviceName, portName, portTypeName, false));
DOMResult msResult = new DOMResult();
m.marshal(msEpr, msResult);
assertTrue(EprUtil.validateEPR(msResult.getNode(), MemberSubmissionEndpointReference.class, endpointAddress, serviceName, portName, portTypeName, true));
}
use of com.sun.xml.ws.developer.MemberSubmissionEndpointReference in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTest method testMSEPR.
public void testMSEPR() throws Exception {
int port = PortAllocator.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
List<Source> metadata = new ArrayList<Source>();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String[] docs = { "RpcLitEndpoint.wsdl", "RpcLitAbstract.wsdl", "RpcLitEndpoint.xsd" };
for (String doc : docs) {
URL url = cl.getResource(doc);
metadata.add(new StreamSource(url.openStream(), url.toExternalForm()));
}
endpoint.setMetadata(metadata);
endpoint.publish(address);
MemberSubmissionEndpointReference epr = endpoint.getEndpointReference(MemberSubmissionEndpointReference.class);
endpoint.stop();
EprUtil.validateEPR(epr, address, serviceName, portName, portTypeName, Boolean.TRUE);
printEPR(epr);
}
Aggregations