[
https://issues.apache.org/jira/browse/AXIS2-5732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Detelin Yordanov updated AXIS2-5732:
------------------------------------
Attachment: axis2.patch
I checked CXF and noticed that it does NOT have problems processing this wsdl.
This is because CXF does not obtain the port type from the binding, but instead
looks it up in the wsdl definition :
{code:title=WSDLServiceBuilder.java}
PortType bindingPt = binding.getPortType();
//TODO: wsdl4j's bug. if there is recursive import,
//wsdl4j can not get operation input message
PortType pt = def.getPortType(bindingPt.getQName());
if (pt == null) {
pt = bindingPt;
}
{code}
See
[WSDLServiceBuilder.buildServices|https://github.com/apache/cxf/blob/master/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java#L330]
method.
This means that Axis2 could do similarly and avoid the MEP exception issue, at
least when there are no circular imports (which is the case in the attached
sample). I'm attaching an updated patch that uses same mechanism to obtain the
port type as CXF. This patch should work with vanilla wsdl4j 1.6.3 at least
when there are no circular imports. The question why Axis2 did not use
Definition.getPortType(QName), but instead used a depth-first search to find
the port type still remains.
> WSDL11ToAxisServiceBuilder fails to determine the MEP when wsdl bindings are
> defined in an imported document
> ------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5732
> URL: https://issues.apache.org/jira/browse/AXIS2-5732
> Project: Axis2
> Issue Type: Bug
> Components: kernel, wsdl
> Affects Versions: 1.6.3
> Reporter: Detelin Yordanov
> Attachments: EchoService.aar, axis2.patch, axis2.patch,
> stacktrace.txt, wsdl4j.patch
>
>
> When deploying a web service archive with 'useOriginalwsdl=true' and a wsdl
> which imports the bindings from another document, the
> WSDL11ToAxisServiceBuilder fails with "Cannot Determine the MEP" exception.
> The issue seems to be caused by wsdl4j which does not properly populate
> binding's port type operations, this is reported in wsdl4j jira:
> https://sourceforge.net/p/wsdl4j/bugs/39/
> Additionally, since Axis2 will do a depth-first search in imported wsdls to
> find the port type, it will not use the port type in the parent wsdl, but the
> unpopulated/undefined port type in the bindings' wsdl.
> I'm providing an 'EchoService.aar' that demonstrates the issue - please raise
> Axis2 log level to DEBUG to see the exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]