On 2011-4-29, at 下午12:28, vidMacquarie wrote:

Hi ,

I am new to CXF community and just learnt about your product from the Camel
commuinty. I am quiet impressed with how easy it is to implement Web
services with Camel-CXF. So kudos to CXF and Camel contributors. I spent some time trying to get Camel-CXF component running in my sample application to invoke Bclear api (Soap over HTTP) as JAX-WS client. In doing so, I have
come across "connection time out" issue which is stemming from the CXF
component. So, I thought I should post the message here and see if I could
get some help with it.

Here's the cxf config in the Spring xml file.

...
<jaxws:client address="https://156.48.255.126/axis/services/BclearApi14 "
                                
wsdlLocation="classpath:META-INF/wsdl/bclear/bclearapi-1.6.wsdl"
                                
serviceClass="com.cinnober.trademanager.bclearapi_1_6.BclearApi16"
                                serviceName="BclearApi16"
                                id="bclearClient"
                                createdFromAPI="true"
                                >
</jaxws:client>
                                

<http:conduit
name="{http://trademanager.cinnober.com/ bclearapi-1.6}BclearApi16PortType.http-conduit"
id="macProxy">
Hi,

Your http:conduit name isn't correct here,
it should be "{WSDL Namespace}portName.http-conduit"
The portName can be found in wsdl service part per your wsdl
    <wsdl:service name="BclearApi16">

<wsdl:port name="BclearApi16" binding="bclear:BclearApi16Binding">
<soap:address location="http://localhost:8081/axis/services/ BclearApi16"/>
</wsdl:port>
</wsdl:service>
the portName should be BclearApi16 but not BclearApi16PortType.

Freeman


                                                   <http:tlsClientParameters 
secureSocketProtocol="SSL" >
                                                        <sec:keyManagers 
keyPassword="pass3hb">
                                                                <sec:keyStore 
type="PKCS12" password="3hbpass"
                                                                                        
file="C:\vid\wsdl\bclear\certs\3HB.p12"/>
                                                        </sec:keyManagers>
                                                        
</http:tlsClientParameters>
                                                        
<http:proxyAuthorization>
                                                                
<sec:UserName>user</sec:UserName>
                                                                
<sec:Password>user2</sec:Password>
                                                        
</http:proxyAuthorization>
                                                <http:client AutoRedirect="true"
                                                                        
Connection="Keep-Alive"
                                                                        
ProxyServer="dev2"
                                                                        
ProxyServerPort="8080"
                                                                        
ConnectionTimeout="0"
                                                                        
ReceiveTimeout="0"
                                                                        
ProxyServerType="HTTP"
                                                                        />
                                                                        
                                                                        
</http:conduit>


<bean id="clientBclear" class="BClearClient" />
<bean id ="bclearService" class =
"com.cinnober.trademanager.bclearapi_1_6.BclearApi16"/>

.......


When running my sample program in a test class, bclearClient( BclearApi16 class was generated from wsdl2java) object successfully created by Spring.
Then in clientBclear class,  I have invoked logon operation
bclearClient.getBclearApi16().logon. In doing so i have received "connection timeout" error. I have specified the ConnectionTimeout="0" thinking that it should indefinitely try to connect to the host. I have also tried with large numbers 700000 to keep the timeout long and still have no luck with it. Is
there something wrong with my config? Have i missed anything?


Error
http://cxf.547215.n5.nabble.com/file/n4357863/error.txt error.txt

WSDL file
http://cxf.547215.n5.nabble.com/file/n4357863/bclearapi-1.6.wsdl
bclearapi-1.6.wsdl

Java file
http://cxf.547215.n5.nabble.com/file/n4357863/BClearClient.java
BClearClient.java


Kind regards,
-Vid-
--
View this message in context: 
http://cxf.547215.n5.nabble.com/JAX-WS-client-connection-time-out-tp4357863p4357863.html
Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference








Reply via email to