Re: problem using local transport

2008-01-22 Thread Willem Jiang

Hi,

Did you do any setting up the transportIds for the local transport  in 
CXF bus?
You need to override the CXF bus default loading transport factory to 
local transport.


Here are an example of setting the bus with code in the jaxws front end 
test module[1],

and a spring configuration file [2] for the local transport factory.

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml

Willem.

Mayank Thakore wrote:

Hi,
I am trying to use local transport. Like this:

String url = local://HelloService;
Endpoint.publish(url, new HelloServiceImpl());

This client code I found at bottom of user guide's local transport page:
ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
cf.setAddress(url);
cf.setServiceClass(HelloService.class);
HelloService h = (HelloService) cf.create();
System.out.println(h.inverse(false));

HelloService is defined as below:
@WebService
public interface HelloService {
public boolean inverse(
boolean value);

}

I have placed the client code immediately below the publish code. But I get
an exception:



Exception in thread main org.apache.cxf.binding.soap.SoapFault: null while
invoking public boolean
com.huawei.imap.nbiframework.testutil.webservice.HelloServiceImpl.inverse(bo
olean) with params [null].
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessa
ge(Soap11FaultInInterceptor.java:70)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessa
ge(Soap11FaultInInterceptor.java:35)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:207)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(Abs
tractFaultChainInitiatorObserver.java:90)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
(ReadHeadersInterceptor.java:179)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
(ReadHeadersInterceptor.java:56)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
at
org.apache.cxf.transport.local.LocalDestination$SynchronousConduit$1.run(Loc
alDestination.java:88)
at java.lang.Thread.run(Unknown Source)



Regards
Mayank



 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!




  




problem using local transport

2008-01-21 Thread Mayank Thakore
Hi,
I am trying to use local transport. Like this:

String url = local://HelloService;
Endpoint.publish(url, new HelloServiceImpl());

This client code I found at bottom of user guide's local transport page:
ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
cf.setAddress(url);
cf.setServiceClass(HelloService.class);
HelloService h = (HelloService) cf.create();
System.out.println(h.inverse(false));

HelloService is defined as below:
@WebService
public interface HelloService {
public boolean inverse(
boolean value);

}

I have placed the client code immediately below the publish code. But I get
an exception:



Exception in thread main org.apache.cxf.binding.soap.SoapFault: null while
invoking public boolean
com.huawei.imap.nbiframework.testutil.webservice.HelloServiceImpl.inverse(bo
olean) with params [null].
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessa
ge(Soap11FaultInInterceptor.java:70)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessa
ge(Soap11FaultInInterceptor.java:35)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:207)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(Abs
tractFaultChainInitiatorObserver.java:90)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
(ReadHeadersInterceptor.java:179)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
(ReadHeadersInterceptor.java:56)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
at
org.apache.cxf.transport.local.LocalDestination$SynchronousConduit$1.run(Loc
alDestination.java:88)
at java.lang.Thread.run(Unknown Source)



Regards
Mayank



 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!