Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.2.7, 2.2.8, 2.2.12, 2.3.1
-
None
Description
In WSDL there is wrong namespaces on arguments.
Version 2.2.6 and below is OK, 2.2.7 and 2.2.8 generate invalid WSDL.
2.2.6 OK
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2_0_0.smlouva.ws.aa.marbes.cz" >
<soapenv:Header/>
<soapenv:Body>
<v2:updateSmlouvy>
<v2:smlouva>
<v2:cenaKupni>?</v2:cenaKupni>
<v2:dodatkyKeSmlouve>
<v2:AaSmlouvaDodatek>
<v2:zadavaciDok>?</v2:zadavaciDok>
<v2:zakon>?</v2:zakon>
</v2:AaSmlouvaDodatek>
</v2:dodatkyKeSmlouve>
</v2:smlouva>
<v2:idempotentGuid>?</v2:idempotentGuid>
</v2:updateSmlouvy>
</soapenv:Body>
</soapenv:Envelope>
2.2.7 WRONG - there is "wo" namespace from java package
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2_0_0.smlouva.ws.aa.marbes.cz" xmlns:wo="http://wo.v2_0_0.ws.smlouva.modules.aa.modules.daisy.marbes.cz">
<soapenv:Header/>
<soapenv:Body>
<v2:updateSmlouvy>
<v2:smlouva>
<wo:cenaKupni>?</wo:cenaKupni>
<wo:dodatkyKeSmlouve>
<v2:AaSmlouvaDodatek>
<v2:zadavaciDok>?</v2:zadavaciDok>
<v2:zakon>?</v2:zakon>
</v2:AaSmlouvaDodatek>
</wo:dodatkyKeSmlouve>
</v2:smlouva>
<v2:idempotentGuid>?</v2:idempotentGuid>
</v2:updateSmlouvy>
</soapenv:Body>
</soapenv:Envelope>
If I call WS from SOAPUI, all values shows as NULL. When I modify SOAPUI XML - replace wo with v2 - WS start working.
So CXF expects "v2" namespace in request XML, but in WSDL generate "wo" namespace.
Server code:
JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean(); serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); serverFactoryBean.setServiceBean(implementor); serverFactoryBean.setDataBinding(new AegisDatabinding()); serverFactoryBean.setAddress(url); serverFactoryBean.setBus(cxfServlet.getBus()); serverFactoryBean.create();
Interface:
@WebService(name = "aa_smlouva_v2_0_0", targetNamespace = "http://v2_0_0.smlouva.ws.aa.marbes.cz") public interface AaSmlouvaWS { @WebMethod public WOrepeatable_result updateSmlouvy ( @WebParam(name = "smlouva") WOAaSmlouva smlouva, @WebParam(name = "idempotentGuid") String idempotentGuid ); } @org.apache.cxf.aegis.type.java5.XmlType(name = "AaSmlouva", namespace = "http://v2_0_0.smlouva.ws.aa.marbes.cz") public class WOAaSmlouva { ... }