Friday, November 8, 2013

[ERROR] The prefix "soap" for element "soap:binding" is not bound.

I encountered the following Exception while making WSDL changes for JAX RPC to JAXWS:
 
INFO] jaxws:wsimport args: [-s, C:\workspace2013\test-search-parent\test-search\target\jaxws\wsimport\java, -d, C:\workspace2013\test-search-parent\test-search\target\classes, -extension, -Xnocompile, -b, C:\workspace2013\test-search-parent\test-search\src\main\wsdl\wsdl-customize.xml, C:\workspace2013\test-search-parent\test-search/src/main/wsdl/TesWebWSDL.wsdl]
parsing WSDL...


[ERROR] The prefix "soap" for element "soap:binding" is not bound.
  line 368 of file:/C:/workspace2013/test-search-parent/test-search/src/main/wsdl/TesWebWSDL.wsdl

[ERROR] The prefix "soap" for element "soap:binding" is not bound.

Its a small fix. I forgot to add the required prefix in wsdl definitions. We need to add the "soap" prefix in WSDL definition tag as shown below:

<wsdl:definitions name="TesWebWSDL" targetNamespace="http://www.testweburl.com/wsdl/TesWebServ" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:srch="http://www.testweburl.com/wsdl/TesWebServ" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:params="http://www.testweburl.com/TesWebServ/dataobj">

2 comments: