views:

432

answers:

1

Hi
Our application provides a SOAP API. Our wsdl starting lines are something like

<wsdl:definitions name='ControlDServices' ... xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' ...

This usually works OK, but a customer complained that when they try to use our SOAP API in NetBeans with the wsdl we provide they got this error:

Web Service can not be created by JAXWS:wsimport utility.
Reason: invalid extension element: "soap:body" (in namespace "http://schemas.xmlsoap.org/wsdl/soap/")

This can be easily recreated by running:

wsimport  -d . -extension -Xnocompile -keep -s . -verbose <our wsdl file>

wihch yield the error:

[ERROR] invalid extension element: "soap:body" (in namespace "http://schemas.xmlsoap.org/wsdl/soap/")
unknown location

Our support discovered that changing the xmlns:soap definition to use http://www.w3.org/2001/12/soap-envelope/ solves the problem, but this requires a change in our product, and also contradict most of the places I see on the web where a wsdl:definitions file is defined. Besides, that URI seems to belong to soap-envelop and not to wsdl, and is also for a specific date, and not a general URI.

Is there a way to solve the NetBeans / wsimport problem without changing our wsdl, e.g. by changing parameters? If no, and a change is needed, is it wise to change it to http://www.w3.org/2001/12/soap-envelope/, or should we use something else?

Thanks
splintor

A: 

It looks like they don't support SOAP 1.1, only SOAP 1.2.

John Saunders
So, what namespace URI should I use?
splintor
You aren't doing anything wrong - neither are they. You're just not compatible. See if they can handle SOAP 1.1, maybe there's a `-soap11` switch? Otherwise, your application will need to support SOAP 1.2, which is not just a namespace change. What platform is your application running on?
John Saunders