EndpointReferenceUtils.addService(axis2EPR, serviceName, portName, addressingNamespace);
if (wsdlDocumentLocation != null) {
URL wsdlURL = new URL(wsdlDocumentLocation);
// This is a temporary usage, so use a memory sensitive wrapper
WSDLWrapper wrapper = new WSDL4JWrapper(wsdlURL, true, 2);
if (serviceName != null) {
if (wrapper.getService(serviceName) == null) {
throw new IllegalStateException(
Messages.getMessage("MissingServiceName",
serviceName.toString(),
wsdlDocumentLocation));
}
if (portName != null) {
String[] ports = wrapper.getPorts(serviceName);
String portLocalName = portName.getLocalPart();
boolean found = false;
if (ports != null) {
for (String port : ports) {