It works fine, thank you. But I guess the documentation is wrong.
J-F -----Message d'origine----- De : Jeff.Yu [mailto:[EMAIL PROTECTED] Envoyé : vendredi 21 septembre 2007 11:46 À : [email protected] Objet : Re: Address to put in JaxWsProxyFactoryBean Hi, It is the endpoint url, not the base address. For your case, it is "http://localhost:8080/erh-backoffice/services/backoffice" HTH... Jeff Jean-François Daune wrote: > Hi, > > I try to create a client using JaxWsProxyFactoryBean, but I don't know what > 'address' property refers to. > > Must it point to a WSDL URL? > > The CXF doc > (http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html) is > suprising. > > It points to the 'base address' of the web service. For instance, > http://myserver/myapp. > > But how does it know where service is deployed > (http://myserver/myapp/services/myservice is CXF convention, isn't it?) and > WSDL accessible? > > If I use the base address, I end up with this exception when I invoke a > service: > > Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog > at [row,col {unknown-source}]: [1,0] > at > com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661) > at > com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134) > at > com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040) > at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) > at > com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095) > at > org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87) > ... 30 more > > If I use a more intuitive (well, IMHO) Spring configuration such as: > > <bean id="backOfficeWebServiceFactory" > class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> > <property name="serviceClass" > value="be.ciger.erh.backoffice.ws.BackOfficePortType"/> > < property name="wsdlLocation" > value="http://localhost:8080/erh-backoffice/services/backoffice?wsdl"/> > <property name="serviceName"> > <bean class="javax.xml.namespace.QName"> > <constructor-arg index="0" > value="http://www.ciger.be/erh/backoffice"/> > <constructor-arg index="1" value="BackOfficeService"/> > </bean> > </property> > </bean> > > Then, it works fine. > > Could some shed some light on this? > > Regards, > > J-F > >
