JBoss Community

Re: Generated double-slash in webservice URL

created by Anatoliy Kulikov in JBoss Web Services - View the full discussion

Thank you

 

here is more info

 

 

 

 

Java code:

package org.anatoliy;

 

importjavax.jws.WebService;

importjavax.jws.soap.SOAPBinding;

 

@WebService

@SOAPBinding(style = SOAPBinding.Style.RPC)

public class MyEchoClass {

     

      public StringechoOne(String input)

      {

            return "returns:" + input ;

      }

}

 

mapping in web.xml

<servlet>

<servlet-name>TestEcho</servlet-name>

<servlet-class>org.anatoliy.MyEchoClass</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>TestEcho</servlet-name>

<url-pattern>/testEcho</url-pattern>

</servlet-mapping>

 

Jboss-web.xml

<?xml version="1.0"encoding="UTF-8"?>

<!DOCTYPE jboss-webPUBLIC "-//JBoss//DTDWeb Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">

 

<jboss-web>

     

      <class-loading/>

      <security-domain>java:/jaas/iseek</security-domain>

      <context-root>uit</context-root>

      <virtual-host>iseek.org</virtual-host>

      <use-session-cookies>true</use-session-cookies>

      <replication-config/>

</jboss-web>

jbossws/services will show:

Endpoint Name jboss.ws:context=uit,endpoint=TestEchoEndpoint Address http://localhost:8080/uit/testEcho

 

By changing context-root in  jboss-web.xml from uit to “/”

<?xml version="1.0"encoding="UTF-8"?>

<!DOCTYPE jboss-webPUBLIC "-//JBoss//DTDWeb Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">

 

<jboss-web>

     

      <class-loading/>

      <security-domain>java:/jaas/iseek</security-domain>

      <context-root>/</context-root>

      <virtual-host>iseek.org</virtual-host>

      <use-session-cookies>true</use-session-cookies>

      <replication-config/>

</jboss-web>

I will have a endpoint address with a double slash

Endpoint Name jboss.ws:context=,endpoint=TestEcho EndpointAddress http://localhost:8080//testEcho

 

Both configurations is working.

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community