Thanks for your help !
I tried this
service = (BenchPortType) new
XFireProxyFactory().create(serviceModel, "http://localhost:" + port +
"/BenchPortType?wsdl");
instead of
service = (BenchPortType) new
XFireProxyFactory().create(serviceModel, "http://localhost:" + port +
"/BenchOperations?wsdl");
but I have this exception :
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not
invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: There
must be a method name element.
org.codehaus.xfire.fault.XFireFault: There must be a method name element.
at
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:31)
at
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:382)
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy10.time(Unknown Source)
at com.thalesgroup.bench.client.Client.startClient(Client.java:43)
at com.thalesgroup.bench.client.Client.<init>(Client.java:26)
at com.thalesgroup.bench.client.Client.main(Client.java:19)
An other question about this line in the client :
TimeResponse timeResponse = service.time(timeRequest, new Header(), new
Holder<Header>());
I don't know what are the second and the third parameter in time method !!!!!!
This method was generated from a WSDL but with jax-ws the method was
time(TimeRequest timeRequest)
And when I use this
service = (BenchPortType) new
XFireProxyFactory().create(serviceModel, "http://localhost:" + port +
"/BenchOperations?wsdl");
I have the exception on this line...
----- Message d'origine ----
De : Tomek Sztelak <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Mercredi, 14 Mars 2007, 9h43mn 24s
Objet : Re: [xfire-user] Server returned error code = 404 for URI :
http://localhost:7777/BenchOperations?wsdl
try
http://localhost:"; + port + "/BenchPortType?wsdl")
On 3/14/07, a a <[EMAIL PROTECTED]> wrote:
> Hi, I would like to do an example with a client and a server but I have this
> exception...
>
> I can access to my wsdl from firefox
>
> I don't understand my error
>
> ------------------------------------------------------------
> Server.java
>
> // Create an XFire Service
> ObjectServiceFactory serviceFactory = new ObjectServiceFactory();
> // Service service = serviceFactory.create(BenchPortType.class,
> qname, url, null);
> Service service = serviceFactory.create(BenchPortType.class);
> service.setInvoker(new BeanInvoker(new BenchInterfaceImpl()));
>
> // Register the service in the ServiceRegistry
> XFire xfire = XFireFactory.newInstance().getXFire();
> xfire.getServiceRegistry().register(service);
>
> // Start the HTTP server
> XFireHttpServer server = new XFireHttpServer();
> server.setPort(7777);
> server.start();
>
>
> ------------------------------------------------------------
>
> Client.java
>
> Service serviceModel = new
> ObjectServiceFactory().create(BenchPortType.class);
>
> BenchPortType service = null;
> try {
> service = (BenchPortType) new
> XFireProxyFactory().create(serviceModel, "http://localhost:"; + port +
> "/BenchOperations?wsdl");
> } catch (MalformedURLException e) {
> e.printStackTrace();
> }
>
> TimeRequest timeRequest = new TimeRequest();
> timeRequest.setSleepDuration(sleep);
>
> TimeResponse timeResponse = service.time(timeRequest, new Header(),
> new Holder<Header>());
> ------------------------------------------------------------
>
> and I have this exception
>
> 14 mars 2007 09:24:35 org.codehaus.xfire.transport.http.HttpChannel
> sendViaClient
> GRAVE: Server returned error code = 404 for URI :
> http://localhost:7777/BenchOperations?wsdl. Check server logs for details
> Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could
> not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
> Server returned error code = 404 for URI :
> http://localhost:7777/BenchOperations?wsdl. Check server logs for details
> org.codehaus.xfire.fault.XFireFault: Server returned error code = 404 for URI
> : http://localhost:7777/BenchOperations?wsdl. Check server logs for details
> at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
> at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
> at org.codehaus.xfire.client.Client.invoke(Client.java:335)
> at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
> at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
> at $Proxy10.time(Unknown Source)
> at com.thalesgroup.bench.client.Client.startClient(Client.java:43)
> at com.thalesgroup.bench.client.Client.<init>(Client.java:26)
> at com.thalesgroup.bench.client.Client.main(Client.java:19)
> Caused by: org.codehaus.xfire.XFireRuntimeException: Server returned error
> code = 404 for URI : http://localhost:7777/BenchOperations?wsdl. Check server
> logs for details
> at
> org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:130)
> at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
> at
> org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
> at
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
> at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
> ... 7 more
>
> ------------------------------------------------------------
>
> Thanks a lot for your help
>
> Obé
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
> Profitez des connaissances, des opinions et des expériences des internautes
> sur Yahoo! Questions/Réponses
> http://fr.answers.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur
Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email