title: Generating WebService client from wsdl with slashes
body: <p>My toolset consists of Eclipse, CXF 2.5.1 and OpenJDK 6.</p>
  
  <p>While generating a webclient from a wsdl I get errors referring to its name which contains a slash: <code>'soap/SomeService' is not a valid value for 'QName' / 'NCName'</code>.</p>
  
  <p>Replacing that slash with a dot I can generate the client but (after reverting that) I get an exception while invoking the service.</p>
  
  <p>I tried to replace the slash with %2F but that didn't work either.</p>
  
  <p>The source wsdl:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;wsdl:service name="soap/SomeService"&gt;
      &lt;wsdl:port binding="impl:soap/SomeServiceSoapBinding" name="soap/SomeService"&gt;
          &lt;wsdlsoap:address location="http://domain/axis/services/soap/SomeService"/&gt;
      &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  </code></pre>
  
  <p>The generated soap service file:</p>
  
  <pre class="lang-java prettyprint-override"><code>@WebServiceClient(name = "soap/SomeService", 
                    wsdlLocation = "http://domain/axis/services/soap/SomeService?wsdl",
                    targetNamespace = "http://soap.some.service.net") 
  public class SoapSomeService extends javax.xml.ws.Service {
  
      public final static URL WSDL_LOCATION;
  
      public final static QName SERVICE = new QName("http://soap.some.service.net", "soap/SomeService");
      public final static QName SoapSomeService = new QName("http://soap.some.service.net", "soap/SomeService");
      static {
          URL url = null;
          try {
              url = new URL("http://domain/axis/services/soap/SomeService?wsdl");
          } catch (MalformedURLException e) {
              java.util.logging.Logger.getLogger(SoapSomeService.class.getName())
                  .log(java.util.logging.Level.INFO, 
                       "Can not initialize the default wsdl from {0}", "http://domain/axis/services/soap/SomeService?wsdl");
          }
          WSDL_LOCATION = url;
      }
      ...
  </code></pre>
  
  <p>The stack trace:</p>
  
  <pre class="lang-java prettyprint-override"><code>Caused by: javax.xml.ws.WebServiceException: Illegal endpoint address: ${endpoint.servicemanager}
      at com.sun.xml.internal.ws.api.EndpointAddress.create(EndpointAddress.java:133)
      at com.sun.xml.internal.ws.client.RequestContext.setEndPointAddressString(RequestContext.java:143)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.sun.xml.internal.ws.api.PropertySet$MethodAccessor.set(PropertySet.java:285)
      at com.sun.xml.internal.ws.api.PropertySet.put(PropertySet.java:345)
      at com.sun.xml.internal.ws.client.RequestContext.put(RequestContext.java:254)
      at com.sun.xml.internal.ws.client.RequestContext$MapView.put(RequestContext.java:352)
      at com.sun.xml.internal.ws.client.RequestContext$MapView.put(RequestContext.java:311)
      at ecard.gina.soap.SoapServiceManager.init(SoapServiceManager.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
      ... 30 more
  Caused by: java.net.URISyntaxException: Illegal character in path at index 1: ${endpoint.servicemanager}
      at java.net.URI$Parser.fail(URI.java:2825)
      at java.net.URI$Parser.checkChars(URI.java:2998)
      at java.net.URI$Parser.parseHierarchical(URI.java:3082)
      at java.net.URI$Parser.parse(URI.java:3040)
      at java.net.URI.&lt;init&gt;(URI.java:595)
      at com.sun.xml.internal.ws.api.EndpointAddress.&lt;init&gt;(EndpointAddress.java:115)
      at com.sun.xml.internal.ws.api.EndpointAddress.create(EndpointAddress.java:131)
      ... 48 more
  </code></pre>