English 中文(简体)
wsimport ant task assumptions and how to work around those
原标题:
  • 时间:2009-11-13 10:46:29
  •  标签:
  • jax-ws

I use the ant task from jax-ws - wsimport to generate my dto s.

What I m wanting to know is what assumptions does wsimport make? for example, w.r.t to the service endpoint and the location of the wsdl, where does it expect these to be and what if they re not there. Wsimport generates the code with the wsdl being loaded from the location specified when invoking wsimport, which is on the file system in my case. This won t do and I m looking for how to change this. At the moment I have to go in afterwards and change the generated code.

I don t pull the wsdl from the runtime end point, I have it locally. How do I handle this? AFAIK, catalog.xml can help in this regard, but I don t know how.

最佳回答

Okay, looks like I solved the problem.

I specified a "wsdlLocation" directive in my wsimport invocation - this then set the wsdlLocation in the generated code to be that. This wsdl location is valid and the application now picks up the default wsdl from this location. I set the wsdlLocation to be "WEB-INF/wsdl/.wsdl". Thus if I put the wsdl file there then no modification of generated code is necessary.

问题回答

暂无回答




相关问题
Groovy & Jax-ws: @WebMethod annotation ignored

I recently found an example on implementing a We3bService with groovy and jax-ws: the problem is that the @webmethod annotation seems to be ignored. This is the source code of the groovy script: ...

JBoss Web Services Behind IIS Through HTTPs

This is a tangled web that s woven, I suppose, but it really shouldn t be all that hard. Let me see if I can paint the picture: I have written a web service, starting with a WSDL, which is to run in ...

Advantages of using a Dynamic Client with JAX-WS

What are the advantages of using a dynamic client with JAX-WS services as opposed to just using generated client classes? What are the disadvantages? **For my particular case I am using Apache CXF, I ...

wsimport ant task assumptions and how to work around those

I use the ant task from jax-ws - wsimport to generate my dto s. What I m wanting to know is what assumptions does wsimport make? for example, w.r.t to the service endpoint and the location of the ...

Jaxb2Marshaller and primitive types

Is it possible to create a web service operation using primitive or basic Java types when using the Jaxb2Marschaller in spring-ws? For example a method looking like this: @Override @PayloadRoot(...

热门标签