service.getWsdlfile(), service.getJaxrpcmappingfile());
// Adding the additional port-component-ref, if any
Iterator portcomponent = service.getServiceendpoints();
while (portcomponent.hasNext()) {
String serviceendpoint = (String) portcomponent.next();
StringRefAddr refAddr = new StringRefAddr(ServiceRef.SERVICEENDPOINTINTERFACE, serviceendpoint);
ref.add(refAddr);
String portlink = (String) service.getPortlink(serviceendpoint);
refAddr = new StringRefAddr(ServiceRef.PORTCOMPONENTLINK, portlink);
ref.add(refAddr);
}
// Adding the additional parameters, if any
Iterator handlers = service.getHandlers();
while (handlers.hasNext()) {
String handlername = (String) handlers.next();
ContextHandler handler = (ContextHandler) service.getHandler(handlername);
HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
Iterator localParts = handler.getLocalparts();
while (localParts.hasNext()) {
String localPart = (String) localParts.next();
String namespaceURI = (String) handler.getNamespaceuri(localPart);
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
}
Iterator params = handler.listProperties();
while (params.hasNext()) {
String paramName = (String) params.next();
String paramValue = (String) handler.getProperty(paramName);
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
}
for (int i = 0; i < handler.getSoapRolesSize(); i++) {
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
}
for (int i = 0; i < handler.getPortNamesSize(); i++) {
handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
}
((ServiceRef) ref).addHandler(handlerRef);
}
try {