[jboss-user] [JBoss Web Services] - Re: Generated double-slash in webservice URL

Anatoliy Kulikov do-not-reply at jboss.com
Tue May 3 16:32:32 EDT 2011


Anatoliy Kulikov [http://community.jboss.org/people/akulikov] created the discussion

"Re: Generated double-slash in webservice URL"

To view the discussion, visit: http://community.jboss.org/message/603297#603297

--------------------------------------------------------------
Thank you

here is more info




Java code:
*package* org.anatoliy;

*import*javax.jws.WebService;
*import*javax.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?wsdl 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?wsdl http://localhost:8080//testEcho

Both configurations is working.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/603297#603297]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110503/acd80fab/attachment-0001.html 


More information about the jboss-user mailing list