use of org.apache.cxf.tools.misc.processor.address.Address in project cxf by apache.
the class WSDLToServiceProcessor method setAddrElement.
private void setAddrElement() throws ToolException {
String transport = (String) env.get(ToolConstants.CFG_TRANSPORT);
Address address = AddressFactory.getInstance().getAddresser(transport);
Map<String, String> ns = address.getNamespaces(env);
for (Map.Entry<String, String> entry : ns.entrySet()) {
wsdlDefinition.addNamespace(entry.getKey(), entry.getValue());
}
WSDLExtensibilityPlugin plugin = getWSDLPlugin(transport, Port.class);
try {
ExtensibilityElement extElement = plugin.createExtension(address.buildAddressArguments(env));
port.addExtensibilityElement(extElement);
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAP_ADDRESS", LOG);
throw new ToolException(msg, wse);
}
}
use of org.apache.cxf.tools.misc.processor.address.Address in project cxf by apache.
the class WSDLToXMLProcessor method setAddrElement.
private void setAddrElement() throws ToolException {
Address address = AddressFactory.getInstance().getAddresser("xml");
for (Map.Entry<String, String> entry : address.getNamespaces(env).entrySet()) {
wsdlDefinition.addNamespace(entry.getKey(), entry.getValue());
}
WSDLExtensibilityPlugin generator = getWSDLPlugin("xml", Port.class);
try {
ExtensibilityElement extElement = generator.createExtension(address.buildAddressArguments(env));
port.addExtensibilityElement(extElement);
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG);
throw new ToolException(msg);
}
}
Aggregations