for (WSDLInterfaceOperation wsdlOperation : wsdlInterface.getOperations())
{
QName opQName = wsdlOperation.getName();
String opName = opQName.getLocalPart();
WSDLBindingOperation wsdlBindingOperation = wsdlOperation.getBindingOperation();
if (wsdlBindingOperation == null)
log.warn("Could not locate binding operation for:" + opQName);
// Change operation according namespace defined on binding
// <soap:body use="encoded" namespace="http://MarshallTestW2J.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
String namespaceURI = wsdlBindingOperation.getNamespaceURI();
if (namespaceURI != null)
opQName = new QName(namespaceURI, opName);
// Set java method name
String javaName = opName.substring(0, 1).toLowerCase() + opName.substring(1);
ServiceEndpointMethodMapping seiMethodMapping = null;
if (seiMapping != null)
{
epMetaData.setServiceEndpointInterfaceName(seiMapping.getServiceEndpointInterface());
seiMethodMapping = seiMapping.getServiceEndpointMethodMappingByWsdlOperation(opName);
if (seiMethodMapping == null)
throw new WSException("Cannot obtain method mapping for: " + opName);
javaName = seiMethodMapping.getJavaMethodName();
}
OperationMetaData opMetaData = new OperationMetaData(epMetaData, opQName, javaName);
epMetaData.addOperation(opMetaData);
// Set the operation style
String style = wsdlOperation.getStyle();
epMetaData.setStyle((Constants.URI_STYLE_DOCUMENT.equals(style) ? Style.DOCUMENT : Style.RPC));
// Set the operation MEP
if (Constants.WSDL20_PATTERN_IN_ONLY.equals(wsdlOperation.getPattern()))
opMetaData.setOneWay(true);
// Set the operation SOAPAction
if (wsdlBindingOperation != null)
opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
// Get the type mapping for the encoding style
String encStyle = epMetaData.getEncodingStyle().toURI();
TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle);