收录日期:2020/05/27 17:06:55 时间:2009-08-11 12:07:38 标签:java,axis,wsdl2java

I'm using the Axis 1.4 axis-wsdl2java ant task to create stub code for a web service hosted on port 8080 of a webserver. I've used the NStoPkg.properties file successfully in the past to map the webserver namespace to a convenient java package name with config lines like this:

http\://webserver/somedir/service=com.blah.blah

But when I try to do the same thing for the service hosted on port 8080 like this:

http\://webserver\:8080/somedir/service=com.blah.blah

the wsdl2java tool doesn't seem to recognize the mapping. I've tried as many variations as I can think of, all to no avail. Is this not possible, or am I doing something wrong?

[Edit: I forgot to mention that when using the command-line WSDL2Java utility's -N option, there is no problem and the packages are remapped successfully. It's just the options file-based version of this that I can't get to work.]

  1. Make sure namespace in wsdl file matches
  2. You can see log "[axis-wsdl2java] INFO: Loaded namespace-to-package mapping file "NStoPkg.propertis" if the AXIS ant task read the NStoPkg.propertis file.

It works as i tried http\://host\:port/url, but http://host:port/url does not work.

strange that doesn't work. Can't recall why you might need the escape character. Did you try enclosing in quotes?