Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Minor format improvements
Source Link
RubioRic
  • 2.5k
  • 4
  • 32
  • 38

I have hard times using maven to generate my web service client. So please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice;  import javax.jws.WebService;  @WebService  public class Hello { public String sayHello(String param) { return "Hello " + param; }  } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my web service client. So please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice;  import javax.jws.WebService;  @WebService  public class Hello { public String sayHello(String param) { return "Hello " + param; }  } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my web service client. So please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

Minor format improvements
Source Link
RubioRic
  • 2.5k
  • 4
  • 32
  • 38

I have hard times using maven to generate my web service client. So Pleaseplease refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice;  import javax.jws.WebService;   @WebService public class Hello { public String sayHello(String param) { ;  return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService  extends Service   { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger =  Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgenwsgen AND wsimportwsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my client. So Please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService  extends Service  { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my web service client. So please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice;  import javax.jws.WebService;   @WebService public class Hello { public String sayHello(String param) {   return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger =  Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I have hard times using maven to generate my client. So Please refer to Creating a web-service client directly from the sourceCreating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my client. So Please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

I have hard times using maven to generate my client. So Please refer to Creating a web-service client directly from the source for the first part of my question.

To keep it simple and short, I want to go from here (a file in src/main/java) :

 package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } 

to there :

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.7-b01- * Generated source version: 2.1 * */ @WebServiceClient(name = "HelloService", targetNamespace = "http://helloservice.jaxws.maven.example.com/", wsdlLocation = "http://localhost:8080/test/") public class HelloService extends Service { private final static URL HELLOSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.example.wsimport.HelloService.class.getName()); ...etc 

using only 1 pom.xml file.

Please note the wsdlLocation set on the end. The pom.xml file will probably use both maven-jaxws-plugin wsgen AND wsimport with some tricky configuration to achieve this.

edited tags
Link
Jon Seigel
  • 12.5k
  • 8
  • 61
  • 93
Loading
Source Link
benji
  • 2.5k
  • 8
  • 41
  • 67
Loading