It seems Axis2/C picks port from the endpoint url and create the header in axis2_http_sender_send as following

sprintf(header, "%s:%d", axutil_url_get_host(url, env), axutil_url_get_port(url, env)); axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_HOST, header);

Obviously you don't have control to change this form api level or as a parameter.

Damitha
On 02/09/2012 02:41 AM, manoj dhyani wrote:
found the issue

problem is happening because of the way axis2c is sending the HOST parameter in the HTTP Header, it's suffixing the port if its default port, this will be the only webservice for which my client application built using Axis2c is failing I don't see this issue with other webservices listening on default port, is there any way this can be controlled ? I don't see any parameters around the code where this is set

is this a bug in Axis2c or server side has issue

following is the HTTP Header sent by Axis2c, the webservice call fails
POST http://nestlepreview.i-nexus.com:443/nestlepreview/webservices/v1/ HTTP/1.1
User-Agent: Axis2C/1.6.0
SOAPAction: ""
Content-Length: 924
Content-Type: text/xml;charset=UTF-8
Host: nestlepreview.i-nexus.com:443

following is the HTTP Header that SoapUI sends
POST /nestlepreview/webservices/v1/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: nestlepreview.i-nexus.com
Content-Length: 1052

------------------------------------------------------------------------
From: mdhy...@hotmail.com
To: c-user@axis.apache.org; c-...@axis.apache.org
Subject: RE: Axis 1.5 error http client , response timed out even though the timeout is set to a larger value
Date: Sat, 21 Jan 2012 19:07:23 +0000

anyone ?? this is affecting my project release


I am trying to use operations from following WSDL using C++ client application on windows 32-bit using Axis2c 1.5 (build with openSSL 0.9.8f)
and using rampartc module for ws-security

https://nestlepreview.i-nexus.com/nestlepreview/webservices/v1/nexus.wsdl

the call always fail with the following error, I don't think it's a timeout setting issue the call fails immediately

[Fri Jan 13 22:40:52 2012] [debug] ..\..\src\util\rampart_encryption.c(800) [rampart][rampart_encryption] No parts specified or specified parts can't be found for encryprion. [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Security for Signature [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node UsernameToken for Signature [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Username for Signature [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Password for Signature [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Security for EncryptedKey [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node UsernameToken for EncryptedKey [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Username for EncryptedKey [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\omxmlsec\axiom.c(129) [rampart]Checking node Password for EncryptedKey [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\core\transport\http\sender\http_transport_sender.c(246) ctx_epr:https://nestlepreview.i-nexus.com:443/nestlepreview/webservices/v1/ [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\core\transport\http\sender\http_transport_sender.c(805) using axis2 native http sender. [Fri Jan 13 22:40:52 2012] [debug] ..\..\src\core\transport\http\sender\http_sender.c(416) msg_ctx_id:urn:uuid:0a655e13-e386-4d27-975b-49d0b1c8c060 [Fri Jan 13 22:40:53 2012] [info] [ssl client] Client certificate chain filenot specified [Fri Jan 13 22:40:54 2012] [debug] ..\..\src\core\transport\http\sender\ssl\ssl_utils.c(190) [ssl client] SSL certificate verified against peer [Fri Jan 13 22:40:54 2012] [debug] ..\..\src\core\transport\http\sender\http_client.c(571) http client , response timed out [Fri Jan 13 22:40:54 2012] [error] ..\..\src\core\transport\http\sender\http_client.c(574) Response timed out [Fri Jan 13 22:40:54 2012] [error] ..\..\src\core\transport\http\sender\http_sender.c(1381) status_code < 0 [Fri Jan 13 22:40:54 2012] [error] ..\..\src\core\engine\engine.c(179) Transport sender invoke failed [Fri Jan 13 22:40:55 2012] [info] [rampart][rampart_mod] rampart_mod shutdown

following is sample input for ListRef operation that works from SoapUI

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:v1="http://i-nexus.com/schema/v1";>
<soapenv:Header/>
<soapenv:Body>
<v1:ListRefRequest>
<v1:Type>BusinessUnit</v1:Type>
</v1:ListRefRequest>
</soapenv:Body>
</soapenv:Envelope>

I can't post the ws-security credentials, but if these are not secified I would expect an error about missing username, but in this case I always get the above error

the same WSDL and operation works fine and give missing ws-security username if not provided
in SopaUI ( this uses HTTPCommonsClient)
in Aixs2 Java 1.3
with axis 1.4 (if HTTPCommonsClient is used) fails if HTTPClient is used

any ideas, what might be going wrong, like something missing on client settings or server side issue


--
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
email:dami...@wso2.com; phone:+94 332262389; cell:+94 719169327
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

Reply via email to