Hello,
I have problem using DefaultWsdl11Definition. Everything works fine if I use SimpleXsdSchema but when I switch to CommonsXsdSchemaCollection resulting wsdl has wrong default namespace in <schema> element. (I'm using VS 2008 to generate client based on wsdl and it works in one case and doesn't work in other). Here are the steps to reproduce the issue:
messages.xsd
spring-ws-servlet.xml with SimpleXsdSchema:Code:<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http*//www*w3.org/2001/XMLSchema" targetNamespace="http*//www*tta.com/tigre/schemas/messages" elementFormDefault="qualified"> <element name="testRequest" type="string"/> <element name="testResponse" type="string"/> </schema>
Resulting wsdl has the following 'wsdl:types' section:Code:... <bean id="someService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schema" ref="schema"/> ... </bean> <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema"> <property name="xsd" value="messages.xsd"/> </bean> ...
Please note default namespace above - it is standard XMLSchema namespace and VS2008 has no problem using this wsdl.Code:<wsdl:types> <schema xmlns="http*//www*w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http*//www*tta.com/tigre/schemas/messages"> <element name="testRequest" type="string"/> <element name="testResponse" type="string"/> </schema> </wsdl:types>
If I use spring-ws-servlet.xml with CommonsXsdSchemaCollection:
wsdl has the following 'wsdl:types' section:Code:... <bean id="someService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schemaCollection" ref="schemaCollection"/> ... </bean> <bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection"> <property name="xsds"> <list> <value>messages.xsd</value> </list> </property> <property name="inline" value="true"/> </bean> ...
and VS 2008 cannot use it. If I change 'red' namespace above to "http*//www*w3.org/2001/XMLSchema" everything works OK.Code:<wsdl:types> <schema xmlns="http*//www*tta.com/tigre/schemas/messages" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http*//www*tta.com/tigre/schemas/messages"> <element name="testRequest" type="string"/> <element name="testResponse" type="string"/> </schema> </wsdl:types>
It looks like a bug in DefaultWsdl11Definition/CommonsXsdSchemaCollection or maybe there is something wrong with my configuration?
Thanks,
Sergey


Reply With Quote