Search code examples
javaweb-servicestomcatwsdljax-ws

How do I publish my own typed WSDL?


I'm building a web service and deploying it on Tomcat. I already have a wsdl for it, which I'd like to publish, and I've tried specifying with the wsdlLocation attribute of the WebServiceProvider annotation, but Tomcat(?) just generates its own. EDIT: No, It just throws exceptions, it was generating its own WSDL because I hadn't restarted Tomcat yet.

Things you should know-

  1. The WSDL in itself is valid(format wise), I managed to create client stubs from it.
  2. I'm using the JAX-WS Provider interface,which has only the one method -invoke.
  3. However I wouldn't like the CLIENT to see this method, instead let it see,say another method say GetFirstName which takes a sting rather than a SOAPMessage.Later maybe I'd like to add two or three more methods, but on the server side deal with it at the XML level.

The Provider class-

package impl;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.ServiceMode;
import javax.xml.ws.WebServiceProvider;
import javax.xml.ws.BindingType;
import javax.xml.ws.Provider;
import javax.xml.ws.Service;

@WebServiceProvider(portName="ClassRegisterBoyPort",wsdlLocation="/home/aneeshb/serverandclients/providerdeploy/ClassRegister/WebContent/WEB-INF/wsdl/stock.wsdl")
@ServiceMode(value=Service.Mode.MESSAGE)
@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
public class ClassRegisterBoyPort implements Provider<SOAPMessage>{

    @Override
    public SOAPMessage invoke(SOAPMessage msg) {

        try {
            OutputStream os = new FileOutputStream("testingboy.xml");
            msg.writeTo(os);
        } catch (SOAPException | IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


        return null;
    }

}

The WSDL I'm trying to use-

<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://impl/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
    name="ClassRegisterService" targetNamespace="http://impl/">
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tns="http://impl/" attributeFormDefault="unqualified"
            elementFormDefault="qualified" targetNamespace="http://impl/">
            <xsd:element name="GetFirstNameInput" nillable="true" />
            <xsd:complexType name="input">
                <xsd:all>
                    <xsd:element name="firstName" type="xsd:string" />
                    <xsd:element name="lastName" type="xsd:string" />
                </xsd:all>
            </xsd:complexType>
            <xsd:element name="GetFirstNameOutput" type="xsd:anyType" />
            <xsd:complexType  name="output">
                <xsd:all>
                    <xsd:element name="firstName" type="xsd:string" />
                    <xsd:element name="lastName" type="xsd:string" />
                </xsd:all>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="GetFirstNameInput">
        <wsdl:part element="tns:GetFirstNameInput" name="GetFirstNameInput">
        </wsdl:part>
    </wsdl:message>
    <wsdl:message name="GetFirstNameOutput">
        <wsdl:part element="tns:GetFirstNameOutput" name="GetFirstNameOutput">
        </wsdl:part>
    </wsdl:message>

    <wsdl:portType name="ClassRegisterBoyPortType">
        <wsdl:operation name="GetFirstName">
            <wsdl:input message="tns:GetFirstNameInput" name="GetFirstNameInput">
            </wsdl:input>
            <wsdl:output message="tns:GetFirstNameOutput" name="GetFirstNameOutput">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ClassRegisterBoyBinding" type="tns:ClassRegisterBoyPortType">
        <soap12:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="GetFirstName">
            <soap12:operation soapAction="" style="document" />
            <wsdl:input name="GetFirstNameInput">
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output name="GetFirstNameOutput">
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="ClassRegisterService">
        <wsdl:port binding="tns:ClassRegisterBoyBinding" name="ClassRegisterBoyPort">
            <soap12:address
                location="http://localhost:8180/ClassRegister/services/ClassRegister/boys" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

The WSDL it generates -

<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://impl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="ClassRegisterBoyPortService" targetNamespace="http://impl/">
  <wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://impl/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://impl/">
  <xsd:element name="invoke" nillable="true" type="xsd:anyType"/>
  <xsd:element name="invokeResponse" nillable="true" type="xsd:anyType"/>
</xsd:schema>
  </wsdl:types>
  <wsdl:message name="invoke">
    <wsdl:part element="tns:invoke" name="invoke">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="invokeResponse">
    <wsdl:part element="tns:invokeResponse" name="invokeResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ClassRegisterBoyPort">
    <wsdl:operation name="invoke">
      <wsdl:input message="tns:invoke" name="invoke">
    </wsdl:input>
      <wsdl:output message="tns:invokeResponse" name="invokeResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ClassRegisterBoyPortServiceSoapBinding" type="tns:ClassRegisterBoyPort">
    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="invoke">
      <soap12:operation soapAction="" style="document"/>
      <wsdl:input name="invoke">
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="invokeResponse">
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ClassRegisterBoyPortService">
    <wsdl:port binding="tns:ClassRegisterBoyPortServiceSoapBinding" name="ClassRegisterBoyPort">
      <soap12:address location="http://localhost:8180/ClassRegister/services/ClassRegister/boys"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

EDIT:

The Error-

WARNING: Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxwsService': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://impl/}ClassRegisterBoyPortService.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:151)
    at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:76)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://impl/}ClassRegisterBoyPortService.
    at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:158)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:405)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.spring.NamespaceHandler$SpringServerFactoryBean.create(NamespaceHandler.java:60)
    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:606)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1696)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1635)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
    ... 24 more

May 27, 2015 4:41:42 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxwsService': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://impl/}ClassRegisterBoyPortService.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:151)
    at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:76)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://impl/}ClassRegisterBoyPortService.
    at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:158)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:405)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.spring.NamespaceHandler$SpringServerFactoryBean.create(NamespaceHandler.java:60)
    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:606)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1696)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1635)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
    ... 24 more

May 27, 2015 4:41:42 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /ClassRegister threw load() exception
org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://impl/}ClassRegisterBoyPortService.
    at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:158)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:405)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525)
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.spring.NamespaceHandler$SpringServerFactoryBean.create(NamespaceHandler.java:60)
    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:606)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1696)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1635)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    at org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:151)
    at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:76)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Thanks in advance :P.


Solution

  • Well, looking at the error messages I figured the problem was with the cxf-servlet.xml file. Initially it was -

    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:soap="http://cxf.apache.org/bindings/soap" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
        <jaxws:server id="jaxwsService" serviceClass="impl.ClassRegisterBoyPort" address="/ClassRegister/boys">
            <jaxws:serviceBean>
                <bean class="impl.ClassRegisterBoyPort"/>
            </jaxws:serviceBean>
        </jaxws:server>
    </beans>
    

    Since the error indicates it was looking for "ClassRegisterBoyPortService" which I hadn't mentioned anywhere, I figured the CXFServlet was configured to look in the specified wsdl for the service specified in its config file- and since I hadn't specified that it was just appending "Service" to the implementor and looking for it. So I specified the wsdlLocation in the config file, then the serviceName, and then when it couldn't find the port - the portName. Voila! it worked.

    The resulting cxf-servlet.xml is-

    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:soap="http://cxf.apache.org/bindings/soap" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd" xmlns:tns="http://impl/">
        <jaxws:server id="jaxwsService" serviceClass="impl.ClassRegisterBoyPort" address="/ClassRegister/boys" wsdlLocation="serverandclients/providerdeploy/ClassRegister/WebContent/WEB-INF/wsdl/stock.wsdl" serviceName="tns:ClassRegisterService" endpointName="tns:ClassRegisterBoyPort">
            <jaxws:serviceBean>
                <bean class="impl.ClassRegisterBoyPort"/>
            </jaxws:serviceBean>
        </jaxws:server>
    </beans>