Hello everyone,
I have been given a task with regards to SOAP interfaces based on a shared WSDL
spec by a 3rd party organization.
This wsdl has one service with three bindings/ports, each offering methods.
I used the cxf-codegen-plugin to extract the Java classes and have written a
client that can interact with servers provinding the service/bindings.
Problems come when I want to expose the same on my servers and get a WSDL with
the same structure.
As the WSDL is by a 3rd party org, we need it to be matching (sans URLs o/c)
So the spec looks kinda like this:
<wsdl:service name="Lighting">
<wsdl:port name="SwitchPower" binding="tns:SwitchPower">
<soap:address location="INSERT_YOUR_URL_HERE" />
</wsdl:port>
<wsdl:port name="Dimming" binding="tns:Dimming">
<soap:address location="INSERT_YOUR_URL_HERE" />
</wsdl:port>
</wsdl:service>
And the generated classes like this:
@WebService
(
serviceName = "Lighting",
portName = "SwitchPower",
...
Simply deploying it on WF31 I can see the deployment:
08:24:01,099 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-5)
JBWS024061: Adding service endpoint metadata: id=org.blah.lighting.SwitchPower
address=http://localhost:8080/lighting/Lighting
implementor=org.blah.Lighting.SwitchPowerImpl
serviceName={http://blah/whatever}Lighting
portName={http://blah/whatever}SwitchPower
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
08:24:01,104 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-5)
JBWS024061: Adding service endpoint metadata: id=org.blah.lighting.Dimming
address=http://localhost:8080/lighting/Lighting/DimmingImpl
implementor=org.blah.lighting.DimmingImpl
serviceName={http://blah/whatever}Lighting
portName={http://blah/whatever}Dimming
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
But each of those only has it's own Webservice in the WSDL.
Had similar on Quarkus (using it's CXF extension), but was able to hack it by
creating a Rest service that returned a manipulated WSDL based off of the
original.
I had seen the 'wsdlLocation' but am usure as the WSDL would contain URLs that
are server instance dependent.
My question:
How can I get it to return such a 'unified' WSDL?
Thanks,
Frank