nilsmagnus / wsdl2java

Gradle plugin for generating java source from wsdl files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom namespace prefix

tomcyr opened this issue · comments

Standard use case generate in SOAP response prefix "ns2" for my namespace. Is it possible to generate custom namespace prefix with this plugin ??

I am not sure that I understand your question. Do you want the plugin to generate code into a specific package for a certain namespace? This plugin basically uses the apache wsdl-to-java plugin, so the options on apaches website are available to you: http://cxf.apache.org/docs/wsdl-to-java.html

No, the problem is how can I customize response prefix for namespace. Currently my example response looks like:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns2:alarmCloseByIncidentIDResponse xmlns:ns2="http://example.com/service">
         <ns2:summary>1</ns2:summary>
      </ns2:alarmCloseByIncidentIDResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope> 

I want to change

<ns2:alarmCloseByIncidentIDResponse xmlns:ns2="http://example.com/service">

into:

<abc:alarmCloseByIncidentIDResponse xmlns:abc="http://example.com/service">

so my response will be wrapped into:

<abc:summary>1</abc:summary>

Can I relay any options for xsd2java ??

This plugin generates java from your xsd and wsdl, it will not help you on your xsd-transformations.