[jbossws-issues] [JBoss JIRA] Commented: (JBWS-1939) URL port information of soap:address is different from import schemaLocation URL
Suresh Srinivas (JIRA)
jira-events at lists.jboss.org
Mon Dec 17 15:26:43 EST 2007
[ http://jira.jboss.com/jira/browse/JBWS-1939?page=comments#action_12392476 ]
Suresh Srinivas commented on JBWS-1939:
---------------------------------------
This can be fixed by changing the order of checking for port in jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java from:
if (ServerConfig.UNDEFINED_HOSTNAME.equals(orgHost))
{
URL newURL = new URL(wsdlHost);
String newHost = newURL.getHost();
int newPort = newURL.getPort();
String newLocation = orgProtocol + "://" + newHost;
if (orgPort != -1)
newLocation += ":" + orgPort;
else if (newPort != -1)
newLocation += ":" + newPort;
newLocation += orgPath;
locationAttr.setNodeValue(newLocation);
log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
if (ServerConfig.UNDEFINED_HOSTNAME.equals(orgHost))
{
URL newURL = new URL(wsdlHost);
String newHost = newURL.getHost();
int newPort = newURL.getPort();
// ****** Changed code
String newLocation = orgProtocol + "://" + newHost;
if (newPort != -1)
newLocation += ":" + newPort;
else if (orgPort != -1)
newLocation += ":" + orgPort;
// ****** Changed code
newLocation += orgPath;
locationAttr.setNodeValue(newLocation);
log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
> URL port information of soap:address is different from import schemaLocation URL
> --------------------------------------------------------------------------------
>
> Key: JBWS-1939
> URL: http://jira.jboss.com/jira/browse/JBWS-1939
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-jaxws
> Affects Versions: jbossws-2.0.0
> Environment: SunOS serrano 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-60
> Reporter: Suresh Srinivas
> Fix For: jbossws-2.0.3
>
>
> Setup info 1:
> The setup has in deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml the following lines commented:
> <property name="webServiceHost">${jboss.bind.address}</property>
> <property name="webServicePort">8080</property>
> This should result in the protocol, port and the host being picked up from requesters URL.
> Setup info 2:
> I have JBoss server setup behind apache server. Apache web server forwards request to the JBoss Server using mod_jk. The host ip for the apache server is 38.187.114.136. The host ip for the JBoss server is 38.187.114.238. The JBoss web services are bound to port 8180.
> Observer behavior:
> When I access the WSDL using http:/38.187.114.136/application/SessionService?wsdl the WSDL I received has the following information:
> <definitions name="InitMethod" targetNamespace="http://com.foo.service/callcontrol">
> <types>
> <xsd:schema>
> <xsd:import namespace="http://com.foo.service/callcontrol/types" schemaLocation="http://38.187.114.136/service/SessionService?wsdl&resource=Session.xsd"/>
> </xsd:schema>
> .....
> .....
> .....
> <port binding="ns2:SessionServiceBinding" name="SessionServicePort">
> <soap:address location="http://38.187.114.136:8180/service/SessionService"/>
> </port>
> </service>
> </definitions>
> Problem description:
> - schemaLocation is right. It is using requesters protocol, port and host "http://38.187.114.136/service/SessionService?wsdl&resource=Session.xsd"
> - soap:address location does not match schemaLocation. It does not use the port corresponding to the request and instead provides port where the service is running - "http://38.187.114.136:8180/service/SessionService"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list