On Sun, Jul 20, 2008 at 10:47 PM, Simon Nash <[EMAIL PROTECTED]> wrote:
> Simon Nash wrote: > >> Raymond Feng wrote: >> >>> Hi, >>> >>> I did some investigation and it turned out it is not a trivial issue. >>> >>> Recently we now move the Java2WSDL generation to the "build" phase. When >>> Tuscany is deployed as a web application, we don't know the HTTP port number >>> configured when the Tuscany runtime is bootstrapped by the ServletFilter. >>> The information is only available when the HTTP request comes. Simon Nash >>> can probably provide more information about the changes. >>> >>> There is code in the Axis2 Web Service binding provider that is intended >> to resolve this information at runtime (i.e., before the Axis2 service >> is started). See the call to servletHost.getURLMapping(uri) in >> Axis2ServiceProvider.computeEndpointURI(). The provider should call this >> and us ethe result to fix up the port URI in the WSDL document that's used >> by Axis2 to return the ?wsdl information. I'll investigate further to see >> why this is not happening. >> >> I added debug printouts around this call. Here's the input and output: > input uri configured by the builder == "/AddServiceComponent" > output uri returned by getURLMapping(uri) == " > http://SouthRim:8080/sample-calculator-ws-webapp/AddServiceComponent" > > My Tomcat server.xml file is configured to use port 8090. Why is > ServletHost.getURLMapping() returning 8080? If this could be fixed, > no other changes would be needed for ?wsdl to work correctly. > > Simon > The problem is that with the way the current code is the port is not known until the ?wsdl request comes in. The way it worked in previous releases is that the Axis2 code extracted the port from the ?wsdl request and set it in the wsdl endpoint. This isn't happening now because at line 495 of the Tuscany Axis2ServiceProvider is sets the parameter "modifyUserWSDLPortAddress" to "false" so Axis2 does not try to set the port. There is a comment above line 495 saying that is to work around a bug, anyone know what that bug is? ...ant
