Write jax-ws web service and generate WSDL without XSD

后端 未结 3 1093
我在风中等你
我在风中等你 2021-02-14 02:57

I wrote a simple JAX-WS web service for tomcat application server on java.

I have one interface and on implementation class:
interface

@We         


        
3条回答
  •  情话喂你
    2021-02-14 03:40

    You can have JAX-WS insert the generated schema into your WSDL file by using the

    -inlineSchemas
    

    command line switch. [1]

    If you're using Maven in your project you can configure the JAX-WS maven plugin to do the same with the inlineSchemas configuration element in your execution configuration as follows: [2]

    
      org.jvnet.jax-ws-commons
      jaxws-maven-plugin
      2.2
      
        
          SomeId
          
            wsgen
          
          prepare-package
          
            some.class.Name
            true
            true
            some/target/dir
            true
          
        
      
    
    

    No changes to your Java class are necessary.

    [1] http://jax-ws.java.net/nonav/2.2.1/docs/wsgen.html

    [2] http://jax-ws-commons.java.net/jaxws-maven-plugin/wsgen-mojo.html

提交回复
热议问题