New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAX-WS Generating code with lower case operations with breaks WSDL compliance #2
Comments
Build WsImport and run via debugger. Tracing this it is apparent that the "name mangling" of identifiers doe not seem to allow for maintaining WSDL compliance. Tracing wsdl based generation here is where name mangling occurs:
This code is part of Jakarta JAX-WS (Metro) reference implementation: https://github.com/eclipse-ee4j/metro-jax-ws Need to determine if this is Jakarta defect. |
Careful reading of Jakarta JAX-WS specification:
Make it clear that "value of name" does not mean "verbatim" equality and that without customisation, Java can still apply its "naming convention" is applied:
To to remove Java naming on methods required XML Binding customisation. There are three ways to achieve this:
I have done (3) and created a utility script to read WSDL and generate (2). (3) is tested for Jakarta but fails for Javax, (2) needs testing but should work for both JAX & JAK. See hacked metro fork for (3) and src/main/xml for xslt script for (2). Closing issue, |
This is not bug but "correct by specification" behaviour. |
Issues:
ONVIF WSDL specifies all operation starting with upper case letters:
Example:
But JAX-WS converts these to lower case first letter ie "getDeviceInformation"
This means that the message interface is no longer conformant with WSDL.
Can this be disabled ?
Testing:
via curl
curl --verbose http://127.0.0.1:9080/onvif/device_service -H "Content-Type: text/xml" --data '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><getDeviceInformation xmlns="http://www.onvif.org/ver10"></getDeviceInformation></s:Body></s:Envelope>'
Works.
curl --verbose http://127.0.0.1:9080/onvif/device_service -H "Content-Type: text/xml" --data '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetDeviceInformation xmlns="http://www.onvif.org/ver10/device/wsdl"></GetDeviceInformation></s:Body></s:Envelope>'
Fails
The text was updated successfully, but these errors were encountered: