Home > Back-end > CXF web service framework, publishing services, targetNamespace problem
CXF web service framework, publishing services, targetNamespace problem
Time:12-31
1 service interface,
@ WebService Public interface IHelloWorld { Public String getHellow (@ the WebParam (name="name") String name); }
2 implementation class
@ WebService (endpointInterface="com. Web. Hellow. IHelloWorld", serviceName="hellow") Public class HelloWorld implements IHelloWorld { Public String getHellow (String name) { String STR="hello, world; Hello, "+ name; return str; } }
3 exposed Web service
Public static void main (String [] args) { String address="http://localhost:8000/hellow"; The HelloWorld hellow=new HelloWorld (); The Endpoint. The publish (address, hellow); }
Generate WSDL, right above the following
TargetNamespace as the default (package name inversion) ============================================================= The above are no problem, I want to modify the targetNamespace for "http://aaa/", the following code
@ WebService (targetNamespace="http://aaa/") Public interface IHelloWorld { Public String getHellow (@ the WebParam (name="name") String name); }
- service exposed to generate WSDL following
There are several problems as follows: 1. The targetNamespace is not modified, and the green line namespace is modified 2. WSDL great changes have taken place in the content of the