Daniel,

I created a stand test program (no servlet) and verified that the service
is using the Factory invoker.

        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setBus(BusFactory.getDefaultBus());
        factory.setServiceName(new QName("http://mediStor.org/x-rays";,
                "xRayStorage"));
        factory.setEndpointName(new QName("http://mediStor.org/x-rays";,
                "XRaySOAPPort"));
        factory.setServiceClass(FirstService.class);
        factory.setAddress("http://localhost:8080/xray";);
        factory.setWsdlLocation("test.wsdl");
        Server srv = factory.create();
        Invoker invoker = srv.getEndpoint().getService().getInvoker();
        System.out.println(invoker.getClass().getName());

Output of program:
Starting Server
Jan 10, 2012 7:58:12 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://mediStor.org/x-rays}xRayStorage from WSDL:
test.wsdl
Jan 10, 2012 7:58:13 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8080/xray
2012-01-10 07:58:13.638:INFO:oejs.Server:jetty-7.5.3.v20111011
2012-01-10 07:58:13.753:INFO:oejs.AbstractConnector:Started
SelectChannelConnector@localhost:8080 STARTING
2012-01-10 07:58:13.809:INFO:oejsh.ContextHandler:started
o.e.j.s.h.ContextHandler{,null}
org.apache.cxf.service.invoker.FactoryInvoker
Server ready...

On Mon, Jan 9, 2012 at 3:10 PM, cbwhitebu [via CXF] <
[email protected]> wrote:

> Daniel,
>
> This is with version 2.5.0.
>
> Here is the code I am using to create the service just in case the way I
> am creating the service is causing the the code to use the wrong invoker:
>
> public class FirstCxfServlet extends CXFNonSpringServlet {
>
>     @Override
>     protected void loadBus(ServletConfig sc) {
>         super.loadBus(sc);
>
>         Bus bus = this.getBus();
>         BusFactory.setDefaultBus(bus);
>         JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
>         factory.setBus(bus);
>         factory.setServiceName(new QName("http://mediStor.org/x-rays";,
> "xRayStorage"));
>         factory.setEndpointName(new QName("http://mediStor.org/x-rays";,
> "XRaySOAPPort"));
>         factory.setServiceClass(FirstService.class);
>         factory.setAddress("/webservices2");
>         factory.setWsdlLocation("test.wsdl");
>         Server srv = factory.create();
>     }
>
>
> wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="XrayStorage"
>     targetNamespace="http://mediStor.org/x-rays";
>     xmlns="http://schemas.xmlsoap.org/wsdl/";
>     xmlns:tns="http://mediStor.org/x-rays";
>     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
>     xmlns:xsd1="http://mediStor.org/types/";
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>
>     <types>
>         <schema targetNamespace="http://mediStor.org/types/";
>             xmlns="http://www.w3.org/2001/XMLSchema";>
>             <complexType name="xRayType">
>                 <sequence>
>                     <element name="patientName" type="xsd:string" />
>                     <element name="patientNumber" type="xsd:int" />
>                     <element name="imageData" type="xsd:base64Binary" />
>                 </sequence>
>             </complexType>
>             <element name="xRay" type="xsd1:xRayType" />
>         </schema>
>     </types>
>
>     <message name="storRequest">
>         <part name="record" element="xsd1:xRay"/>
>     </message>
>     <message name="storResponse">
>         <part name="success" type="xsd:boolean"/>
>     </message>
>
>     <portType name="xRayStorage">
>         <operation name="store">
>             <input message="tns:storRequest" name="storRequest"/>
>             <output message="tns:storResponse" name="storResponse"/>
>         </operation>
>     </portType>
>
>     <binding name="xRayStorageSOAPBinding" type="tns:xRayStorage">
>         <soap12:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>         <operation name="store">
>             <soap12:operation soapAction="" style="document"/>
>             <input name="storRequest">
>                 <soap12:body use="literal"/>
>             </input>
>             <output name="storResponse">
>                 <soap12:body use="literal"/>
>             </output>
>         </operation>
>     </binding>
>
>     <service name="xRayStorage">
>         <documentation>blah, blah, blah</documentation>
>         <port name="XRaySOAPPort" binding="tns:xRayStorageSOAPBinding">
>             <soap12:address location="http://localhost:8080/x-rays"/>
>         </port>
>
>     </service>
> </definitions>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/WebServiceContext-with-WebServiceProvider-tp5127015p5132840.html
>  To unsubscribe from WebServiceContext with WebServiceProvider, click 
> here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5127015&code=Y2J3aGl0ZWJ1QGdtYWlsLmNvbXw1MTI3MDE1fC0xNDEzNTk2MDgy>
> .
> NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://cxf.547215.n5.nabble.com/WebServiceContext-with-WebServiceProvider-tp5127015p5134443.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to