Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 71256 invoked from network); 8 Jul 2008 19:03:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2008 19:03:59 -0000 Received: (qmail 82195 invoked by uid 500); 8 Jul 2008 19:03:59 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 82180 invoked by uid 500); 8 Jul 2008 19:03:59 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 82163 invoked by uid 99); 8 Jul 2008 19:03:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 12:03:59 -0700 X-ASF-Spam-Status: No, hits=4.2 required=10.0 tests=FRT_LEVITRA,HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of akarseras@gmail.com designates 74.125.44.154 as permitted sender) Received: from [74.125.44.154] (HELO yx-out-1718.google.com) (74.125.44.154) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 19:03:08 +0000 Received: by yx-out-1718.google.com with SMTP id 3so588079yxi.88 for ; Tue, 08 Jul 2008 12:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=4qbqBB6QMWXV+vqL5/2Ef3Mo9Nf/eH8fR0j9RKl4MiI=; b=npzxH4Wo+HLpNs8Gn44KH0ZulUFmMDID848yiFCMuAdFltCMDc4GZiNa4gtNnWh868 Kp2YhMlQ2L8Kn5Xm+bblfeWz31ydxB/0J36JzJYQ3joyndSpKigpPMRwDyD+mML/z48Z Ku0GLy802ZLoAHcNEY0PYxT8Nj7EVqQhfcr/Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=UAaN1jmVo4gmyC3eY5HH0BZBEB1v0Zbnnc6xFX4T8fd39TWoWDNJuZFcBEfoq2mZ7U te4xnyquy3Js1kvMY1gRduxiOIFst8EQVNtFOTXEOERO3Hnso/HONYQIUMlQuPcJJay1 M8cN1sQ/PNfyD0GFmV90INy/mmoUJ9g209GKQ= Received: by 10.115.47.1 with SMTP id z1mr8297824waj.129.1215543807618; Tue, 08 Jul 2008 12:03:27 -0700 (PDT) Received: by 10.114.146.15 with HTTP; Tue, 8 Jul 2008 12:03:27 -0700 (PDT) Message-ID: <508748c80807081203t728cf448nc611e065e539d7be@mail.gmail.com> Date: Tue, 8 Jul 2008 15:03:27 -0400 From: "Andy Karseras" To: "Apache AXIS C User List" Subject: Re: Service Client sending message multiple times to server In-Reply-To: <4872C5AD.80909@wso2.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9234_15658404.1215543807603" References: <508748c80807071355t2c4f38eft79dafd58f3f44456@mail.gmail.com> <4872C5AD.80909@wso2.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9234_15658404.1215543807603 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Client code attached below - many thanks. Have highlighted the call to send/receive in red...it is only called once. I have included a TCP header dump (below the code) - notice the two blocks of messages repeated within millisecs. The lengths have been highlighted in colour and the repetition can be seen. If there is anything I can set to show whether duplicate messages are being sent, please let me know. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const axis2_char_t *CACHED_HTTP_CLIENT = "CACHED_HTTP_CLIENT"; const axis2_char_t *REUSE_HTTP_CLIENT = "REUSE_HTTP_CLIENT"; const axis2_char_t *CWMP_NAMESPACE_PREFIX = "cwmp"; const axis2_char_t *CWMP_NAMESPACE_URI = "urn:dslforum-org:cwmp-1-0"; const axis2_char_t *SOAP_NAMESPACE_URI = " http://schemas.xmlsoap.org/soap/"; const axis2_char_t *SOAP_NAMESPACE_PREFIX = "soap"; const axis2_char_t *XSI_NAMESPACE_PREFIX = "xsi"; const axis2_char_t *XSI_NAMESPACE_URI = " http://www.w3.org/2001/XMLSchema-instance"; const axutil_env_t *env = NULL; const axis2_char_t *address = " https://localhost:7547/services/ConfigurationServer"; axiom_element_t *transactionIdHeader = NULL; axutil_qname_t *transactionIDQname = NULL; axis2_svc_client_t *serviceClient = NULL; axiom_namespace_t* CWMP_NAMESPACE; axiom_namespace_t* CWMP_EMPTY_PREFIX_NAMESPACE; axiom_namespace_t* SOAP_NAMESPACE; axis2_options_t *communicationOptions; char userGroupBuffer[100]; char remoteHostname[] = "undefined"; char remoteURIBuffer[100]; char *remoteURI = remoteURIBuffer; char clientHostname[128]; char *userGroup = userGroupBuffer; char *returnText; int informRetryCount = 0; int remotePort = -1; int envelopeCount; class PortTest { public: PortTest() { const axis2_char_t *client_home = NULL; const axis2_char_t *localname = "mustUnderstand"; const axis2_char_t *value = "1"; const axis2_char_t *uri = "http://schemas.xmlsoap.org/soap/";; const axis2_char_t *prefix = "soap"; const axis2_char_t *localpart = "ID"; axis2_endpoint_ref_t* endpoint_ref = NULL; axis2_http_client_t *httpClient = NULL; axutil_url_t *url = NULL; axiom_attribute_t *omAttribute = NULL; axiom_namespace_t *nameSpace = NULL; axiom_namespace_t *SOAP_ENCODING_NAMESPACE = NULL; remoteURI = stpcpy (remoteURI, "/"); env = axutil_env_create_all("port.log", AXIS2_LOG_LEVEL_TRACE); SOAP_ENCODING_NAMESPACE = axiom_namespace_create(env, " http://schemas.xmlsoap.org/soap/envelope/", "soap-enc"); CWMP_NAMESPACE = axiom_namespace_create(env, CWMP_NAMESPACE_URI, CWMP_NAMESPACE_PREFIX); CWMP_EMPTY_PREFIX_NAMESPACE = axiom_namespace_create(env, CWMP_NAMESPACE_URI, ""); SOAP_NAMESPACE = axiom_namespace_create(env, SOAP_NAMESPACE_URI, SOAP_NAMESPACE_PREFIX); nameSpace = axiom_namespace_create(env, uri, prefix); // Create end-point endpoint_ref = axis2_endpoint_ref_create(env, address); // Create options communicationOptions = axis2_options_create(env); axis2_options_set_to(communicationOptions, env, endpoint_ref); // Set envelope axis2_options_set_soap_version(communicationOptions, env, AXIOM_SOAP11); client_home = AXIS2_GETENV("AXIS2C_HOME"); // Create Service Client serviceClient = axis2_svc_client_create(env, client_home); // Add options axis2_svc_client_set_options(serviceClient, env, communicationOptions); // Create HTTP client httpClient = axis2_http_client_create(env, url); // Get context and add properties axis2_svc_ctx_t *serviceContext = axis2_svc_client_get_svc_ctx( serviceClient, env); axis2_conf_ctx_t *configurationContext = axis2_svc_ctx_get_conf_ctx(serviceContext,env); axis2_ctx_t *context = axis2_conf_ctx_get_base(configurationContext, env); axutil_property_t *propertyCached = axutil_property_create (env); axutil_property_set_value(propertyCached, env, httpClient); axis2_ctx_set_property(context, env, CACHED_HTTP_CLIENT, propertyCached); axutil_property_t *propertyReused = axutil_property_create (env); axutil_property_set_value(propertyReused, env, false); axis2_ctx_set_property(context, env, REUSE_HTTP_CLIENT, propertyReused); transactionIDQname = axutil_qname_create(env, localpart, CWMP_NAMESPACE_URI, CWMP_NAMESPACE_PREFIX); omAttribute = AXIS2_EXTERN axiom_attribute_create(env, localname, value, nameSpace); } /** * Add a transactionIdHeader to the outgoing message */ void addTransactionIdHeader() { cout << "In addTransactionIdHeader()" << endl; time_t rawtime; struct tm * timeinfo; char buffer [200]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (buffer,200,"%d%m%H%M%S",timeinfo); strncat (buffer, clientHostname, 128); axiom_node_t *node = axiom_node_create(env); transactionIdHeader = axiom_element_create_with_qname(env, NULL, transactionIDQname, &node); axiom_element_set_text(transactionIdHeader, env, buffer, node); axiom_element_add_attribute( transactionIdHeader, env, axiom_attribute_create (env, "mustUnderstand", "1", SOAP_NAMESPACE), node); transactionIdHeader = axiom_element_create_with_qname(env, NULL, transactionIDQname, &node); axiom_element_set_text(transactionIdHeader, env, buffer, node); axis2_svc_client_add_header(serviceClient, env, node) ; } /** * Do the work to establish the parameters of communication with the server * * @return */ void informServer() { cout << "In informServer()" << endl; axiom_node_t *methodNode = axiom_node_create(env); axutil_string_t* informString = axutil_string_create (env,"inform"); // Created with 2nd parameter as NULL as it has no parent axiom_element_create_str(env, NULL, informString, CWMP_NAMESPACE, &methodNode); axiom_node_t *deviceIdNode = axiom_node_create(env); axutil_string_t* deviceIdString = axutil_string_create (env,"DeviceId"); // Created element with methodNode as parent axiom_element_create_str(env, methodNode, deviceIdString, CWMP_NAMESPACE, &deviceIdNode); // Add text to node axiom_node_t *tempNode = axiom_node_create(env); axiom_text_create(env, deviceIdNode, "TBD", &tempNode); axiom_node_t *eventNode = axiom_node_create(env); axutil_string_t* eventString = axutil_string_create (env,"Event"); axiom_element_create_str(env, methodNode, eventString, CWMP_NAMESPACE, &eventNode); axiom_text_create(env, eventNode, "TBD", &tempNode); axiom_node_t *maxEnvelopesNode = axiom_node_create(env); axutil_string_t* maxEnvelopesString = axutil_string_create (env,"MaxEnvelopes"); axiom_element_create_str(env, methodNode, maxEnvelopesString, CWMP_NAMESPACE, &maxEnvelopesNode); axiom_text_create(env, maxEnvelopesNode, "1", &tempNode); axiom_node_t *currentTimeNode = axiom_node_create(env); axutil_string_t* currentTimeString = axutil_string_create (env,"CurrentTime"); axiom_element_create_str(env, methodNode, currentTimeString, CWMP_NAMESPACE, ¤tTimeNode); axiom_text_create(env, currentTimeNode, "2008-07-07 15:58:06", &tempNode); // Convert int to string std::ostringstream sout; sout << informRetryCount; std::string tempString(sout.str()); // Convert string to char char * retryCount; retryCount = new char[tempString.length() + 1]; strcpy(retryCount, tempString.c_str()); axiom_node_t *retryCountNode = axiom_node_create(env); axutil_string_t* retryCountString = axutil_string_create (env,"RetryCount"); axiom_element_create_str(env, methodNode, retryCountString, CWMP_NAMESPACE, &retryCountNode); axiom_text_create(env, retryCountNode, retryCount, &tempNode); delete[] retryCount; axiom_node_t *parameterListNode = axiom_node_create(env); axutil_string_t* parameterListString = axutil_string_create (env,"ParameterList"); axiom_element_create_str(env, methodNode, parameterListString, CWMP_NAMESPACE, ¶meterListNode); axis2_svc_client_remove_all_headers(serviceClient, env); addTransactionIdHeader(); axis2_char_t* requestString = axiom_node_to_string(methodNode,env); cout << requestString << "\n" << endl; axiom_node_t *response = axis2_svc_client_send_receive(serviceClient, env, methodNode); if (response == NULL) { cout << "informServer() received null response..." << endl; return; } axis2_char_t* responseString = axiom_node_to_string(response,env); cout << "\n" << responseString << "\n" << endl; return; } void establishConnection(int retryInterval) { const axis2_char_t *userID = "application"; const axis2_char_t *password = "wlyVdZZ05D8"; axis2_options_set_http_auth_info( communicationOptions, env, userID, password, AXIS2_HTTP_AUTH_TYPE_BASIC); informServer(); } }; int main( int argc, const char* argv[] ) { cout << "In Port main()" << endl; PortTest *aPort = new PortTest(); aPort->establishConnection(180); cout << "Leaving Port main()\n"; return 0; } As an FYI, the server port is 7547 tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes 13:25:53.083479 IPv4, length 74: IP (tos 0x0, ttl 64, id 31248, offset 0, flags [DF], proto 6, length: 60) localhost.40684 > localhost.7547: S [tcp sum ok] 1289853052:1289853052(0) win 32767 13:25:53.083506 IPv4, length 74: IP (tos 0x0, ttl 64, id 0, offset 0, f lags [DF], proto 6, length: 60) localhost.7547 > localhost.40684: S [tcp sum ok] 1282480388:1282480388(0) ack 1289853053 win 32767 13:25:53.083520 IPv4, length 66: IP (tos 0x0, ttl 64, id 31250, offset 0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 1:1(0) ack 1 win 8192 13:25:53.086189 IPv4, length 208: IP (tos 0x0, ttl 64, id 31252, offset 0, flags [DF], proto 6, length: 194) localhost.40684 > localhost.7547: P 1:143(142) ack 1 win 8192 13:25:53.086201 IPv4, length 66: IP (tos 0x0, ttl 64, id 64361, offset 0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40684: . [tcp sum ok] 1:1(0) ack 143 win 8192 13:25:53.094438 IPv4, length 1300: IP (tos 0x0, ttl 64, id 64363, offse t 0, flags [DF], proto 6, length: 1286) localhost.7547 > localhost.40684: P 1:1235(1234) ack 143 win 8192 13:25:53.094551 IPv4, length 66: IP (tos 0x0, ttl 64, id 31254, offset 0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 143:143(0) ack 1235 win 8192 13:25:53.107114 IPv4, length 224: IP (tos 0x0, ttl 64, id 31256, offset 0, flags [DF], proto 6, length: 210) localhost.40684 > localhost.7547: P 143:301(158) ack 1235 win 8192 13:25:53.112815 IPv4, length 72: IP (tos 0x0, ttl 64, id 64365, offset 0, flags [DF], proto 6, length: 58) localhost.7547 > localhost.40684: P [bad tcp cksum fe2e (->e8c6)!] 1235:1241(6) ack 301 win 81 92 13:25:53.113101 IPv4, length 111: IP (tos 0x0, ttl 64, id 64367, offset 0, flags [DF], proto 6, length: 97) localhost.7547 > localhost.40684: P 1241:1286(45) ack 301 win 8192 13:25:53.113169 IPv4, length 66: IP (tos 0x0, ttl 64, id 31258, offset 0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 301:301(0) ack 1286 win 8192 13:25:53.113392 IPv4, length 348: IP (tos 0x0, ttl 64, id 31260, offset 0, flags [DF], proto 6, length: 334) localhost.40684 > localhost.7547: P 301:583(282) ack 1286 win 8192 13:25:53.113503 IPv4, length 124: IP (tos 0x0, ttl 64, id 31262, offset 0, flags [DF], proto 6, length: 110) localhost.40684 > localhost.7547: P 583:641(58) ack 1286 win 8192 13:25:53.114383 IPv4, length 66: IP (tos 0x0, ttl 64, id 64369, offset 0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40684: . [tcp sum ok] 1286:1286(0) ack 641 win 8192 13:25:53.114469 IPv4, length 652: IP (tos 0x0, ttl 64, id 31264, offset 0, flags [DF], proto 6, length: 638) localhost.40684 > localhost.7547: P 641:1227(586) ack 1286 win 8192 13:25:53.116686 IPv4, length 183: IP (tos 0x0, ttl 64, id 64371, offset 0, flags [DF], proto 6, length: 169) localhost.7547 > localhost.40684: P 1286:1403(117) ack 1227 win 8192 13:25:53.116872 IPv4, length 471: IP (tos 0x0, ttl 64, id 64373, offset 0, flags [DF], proto 6, length: 457) localhost.7547 > localhost.40684: P 1403:1808(405) ack 1227 win 8192 13:25:53.117045 IPv4, length 103: IP (tos 0x0, ttl 64, id 64375, offset 0, flags [DF], proto 6, length: 89) localhost.7547 > localhost.40684: P 1808:1845(37) ack 1227 win 8192 And then repeated... 13:25:53.117152 IPv4, length 74: IP (tos 0x0, ttl 64, id 26110, offset 0, flags [DF], proto 6, length: 60) localhost.40685 > localhost.7547: S [tcp sum ok] 1274709872:1274709872(0) win 32767 13:25:53.117170 IPv4, length 74: IP (tos 0x0, ttl 64, id 0, offset 0, f lags [DF], proto 6, length: 60) localhost.7547 > localhost.40685: S [tcp sum ok] 1289922851:1289922851(0) ack 1274709873 win 32767 13:25:53.117181 IPv4, length 66: IP (tos 0x0, ttl 64, id 26112, offset 0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 1:1(0) ack 1 win 8192 13:25:53.117571 IPv4, length 208: IP (tos 0x0, ttl 64, id 26114, offset 0, flags [DF], proto 6, length: 194) localhost.40685 > localhost.7547: P 1:143(142) ack 1 win 8192 13:25:53.117582 IPv4, length 66: IP (tos 0x0, ttl 64, id 19370, offset 0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40685: . [tcp sum ok] 1:1(0) ack 143 win 8192 13:25:53.125762 IPv4, length 1299: IP (tos 0x0, ttl 64, id 19372, offse t 0, flags [DF], proto 6, length: 1285) localhost.7547 > localhost.40685: P 1:1234(1233) ack 143 win 8192 13:25:53.128393 IPv4, length 66: IP (tos 0x0, ttl 64, id 26116, offset 0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 143:143(0) ack 1234 win 8192 13:25:53.140802 IPv4, length 224: IP (tos 0x0, ttl 64, id 26118, offset 0, flags [DF], proto 6, length: 210) localhost.40685 > localhost.7547: P 143:301(158) ack 1234 win 8192 13:25:53.146774 IPv4, length 72: IP (tos 0x0, ttl 64, id 19374, offset 0, flags [DF], proto 6, length: 58) localhost.7547 > localhost.40685: P [bad tcp cksum fe2e (->69e6)!] 1234:1240(6) ack 301 win 81 92 13:25:53.147062 IPv4, length 111: IP (tos 0x0, ttl 64, id 19376, offset 0, flags [DF], proto 6, length: 97) localhost.7547 > localhost.40685: P 1240:1285(45) ack 301 win 8192 13:25:53.147486 IPv4, length 66: IP (tos 0x0, ttl 64, id 26120, offset 0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 301:301(0) ack 1285 win 8192 13:25:53.147753 IPv4, length 348: IP (tos 0x0, ttl 64, id 26122, offset 0, flags [DF], proto 6, length: 334) localhost.40685 > localhost.7547: P 301:583(282) ack 1285 win 8192 13:25:53.147899 IPv4, length 124: IP (tos 0x0, ttl 64, id 26124, offset 0, flags [DF], proto 6, length: 110) localhost.40685 > localhost.7547: P 583:641(58) ack 1285 win 8192 13:25:53.149278 IPv4, length 66: IP (tos 0x0, ttl 64, id 19378, offset 0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40685: . [tcp sum ok] 1285:1285(0) ack 641 win 8192 13:25:53.149490 IPv4, length 652: IP (tos 0x0, ttl 64, id 26126, offset 0, flags [DF], proto 6, length: 638) localhost.40685 > localhost.7547: P 641:1227(586) ack 1285 win 8192 13:25:53.151996 IPv4, length 183: IP (tos 0x0, ttl 64, id 19380, offset 0, flags [DF], proto 6, length: 169) localhost.7547 > localhost.40685: P 1285:1402(117) ack 1227 win 8192 At this point, the server is responding with a failure message due to the duplicated incoming message. 13:25:53.152692 IPv4, length 711: IP (tos 0x0, ttl 64, id 19382, offset 0, flags [DF], proto 6, length: 697) localhost.7547 > localhost.40685: P 1402:2047(645) ack 1227 win 8192 13:25:53.152828 IPv4, length 66: IP (tos 0x0, ttl 64, id 26128, offset 0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 1227:1227(0) ack 2047 win 8192 13:25:53.153126 IPv4, length 103: IP (tos 0x0, ttl 64, id 19384, offset 0, flags [DF], proto 6, length: 89) localhost.7547 > localhost.40685: P 2047:2084(37) ack 1227 win 8192 13:25:53.154589 IPv4, length 66: IP (tos 0x0, ttl 64, id 31266, offset 0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: R [tcp sum ok] 1227:1227(0) ack 1845 win 8192 13:25:53.155405 IPv4, length 66: IP (tos 0x0, ttl 64, id 26130, offset 0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: F [tcp sum ok] 1227:1227(0) ack 2084 win 8192 13:25:53.156180 IPv4, length 95: IP (tos 0x0, ttl 64, id 19386, offset 0, flags [DF], proto 6, length: 81) localhost.7547 > localhost.40685: P [bad tcp cksum fe45 (->7f91)!] 2084:2113(29) ack 1228 win 8192 13:25:53.156197 IPv4, length 54: IP (tos 0x0, ttl 64, id 0, offset 0, f lags [DF], proto 6, length: 40) localhost.40685 > localhost.7547: R [tcp sum ok] 1274711100:1274711100(0) win 0 On Mon, Jul 7, 2008 at 9:41 PM, Samisa Abeysinghe wrote: > Andy Karseras wrote: > >> Hi, >> >> It appears that for some reason, the ServiceClient is sending the message >> twice to the server in a very short time interval (less than 20 milli-secs). >> > > It sends it twice only if you send it twice. Can you send the client code > you are using? > Note that, if you are using echo client sample, it does send two requests > to the server. > > Samisa... > > >> The payload remains the same and it is a a re-send rather than a call >> being made twice. >> >> It may be helpful to note that I am using an AXIS2 Java Server with a >> AXIS2C client - interaction between the exisiting Java client and Java >> server are normal and functioning as expected. Therefore, I do not (at this >> stage) suspect the server. >> >> The server is exoected to be slow for the first request so control of the >> timeout was my initial point of investigation. >> >> I have tried setting the axis2_http_client_set_timeout >> >> but to no avail. >> >> Would the setting of a socket timeout be necessary and if so, how would >> this be done ? >> >> Any suggestions on why this may be occuring ? >> >> For completeness, I have attached my logs (in hope that there is something >> obvious that I am doing wrong). >> >> >> Andy >> >> >> >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *request_uri_based_dispatcher added to the index 0 of the phase Transport >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *addressing_based_dispatcher added to the index 1 of the phase Transport >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *rest_dispatcher added to the index 0 of the phase Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *soap_message_body_based_dispatcher added to the index 1 of the phase >> Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *soap_action_based_dispatcher added to the index 2 of the phase Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *dispatch_post_conditions_evaluator added to the index 0 of the phase >> PostDispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t >> *context_handler added to the index 1 of the phase PostDispatch >> [Mon Jul 7 15:26:18 2008] [debug] conf_builder.c(233) No custom >> dispatching order found. Continue with the default dispatching order >> [Mon Jul 7 15:26:18 2008] [debug] conf_builder.c(378) Module addressing >> found in axis2.xml >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [error] dir_handler.c(219) No files in the path >> /home/karseras/axis2c/deploy/services. >> [Mon Jul 7 15:26:18 2008] [debug] dep_engine.c(1306) >> axis2_dep_engine_load_module_dll: DLL path is : >> /home/karseras/axis2c/deploy/modules/addressing/libaxis2_mod_addr.so >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [debug] dep_engine.c(1306) >> axis2_dep_engine_load_module_dll: DLL path is : >> /home/karseras/axis2c/deploy/modules/logging/libaxis2_mod_log.so >> [Mon Jul 7 15:26:18 2008] [debug] class_loader.c(141) Object loaded >> successfully >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingInHandler to phase Transport >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(123) Service name is : >> __ANONYMOUS_SERVICE__ >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add >> this handler AddressingInHandler to system pre defined phases , but those >> handlers are already added to global chain which run irrespective of the >> service >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add >> this handler AddressingInHandler to system pre defined phases , but those >> handlers are already added to global chain which run irrespective of the >> service >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add >> this handler AddressingInHandler to system pre defined phases , but those >> handlers are already added to global chain which run irrespective of the >> service >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_resolver.c(259) Module name >> is:addressing >> [Mon Jul 7 15:26:18 2008] [debug] phase_holder.c(139) Add handler >> AddressingOutHandler to phase MessageOut >> [Mon Jul 7 15:26:18 2008] [debug] op_client.c(869) >> Start:axis2_op_client_infer_transport >> [Mon Jul 7 15:26:18 2008] [debug] op_client.c(924) >> End:axis2_op_client_infer_transport >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> AddressingOutHandler within the phase MessageOut >> [Mon Jul 7 15:26:18 2008] [info] Starting addressing out handler >> [Mon Jul 7 15:26:18 2008] [debug] addr_out_handler.c(133) No action >> present. Stop processing addressing >> [Mon Jul 7 15:26:18 2008] [debug] http_transport_sender.c(246) ctx_epr: >> https://localhost:7547/services/SampleApplication >> [Mon Jul 7 15:26:18 2008] [debug] http_transport_sender.c(768) using >> axis2 native http sender. >> [Mon Jul 7 15:26:18 2008] [debug] http_sender.c(415) >> msg_ctx_id:92b440de-4c5a-1dd1-3efa-00145eecc23a >> [Mon Jul 7 15:26:18 2008] [info] [ssl client] Client certificate chain >> filenot specified >> [Mon Jul 7 15:26:18 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL >> certificate verified against peer >> [Mon Jul 7 15:26:18 2008] [info] [ssl client] Client certificate chain >> filenot specified >> [Mon Jul 7 15:26:18 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL >> certificate verified against peer >> [Mon Jul 7 15:26:18 2008] [debug] http_transport_sender.c(785) OP name >> axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in >> [Mon Jul 7 15:26:18 2008] [debug] soap_builder.c(895) Identified soap >> version is soap11 >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> request_uri_based_dispatcher within the phase Transport >> [Mon Jul 7 15:26:18 2008] [debug] req_uri_disp.c(100) Checking for >> service using target endpoint address : >> https://localhost:7547/services/SampleApplication >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> AddressingInHandler within the phase Transport >> [Mon Jul 7 15:26:18 2008] [info] Starting addressing in handler >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> addressing_based_dispatcher within the phase Transport >> [Mon Jul 7 15:26:18 2008] [debug] addr_disp.c(107) Checking for service >> using WSA enpoint address : >> https://localhost:7547/services/SampleApplication >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> rest_dispatcher within the phase Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> soap_message_body_based_dispatcher within the phase Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] soap_body_disp.c(127) Checking for >> service using SOAP message body's first child's namespace URI : >> http://schemas.xmlsoap.org/soap/ >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> soap_action_based_dispatcher within the phase Dispatch >> [Mon Jul 7 15:26:18 2008] [debug] soap_action_disp.c(89) Checking for >> service using SOAPAction is not implemented >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> dispatch_post_conditions_evaluator within the phase PostDispatch >> [Mon Jul 7 15:26:18 2008] [debug] phase.c(210) Invoke the handler >> context_handler within the phase PostDispatch >> >> >> No virus found in this incoming message. >> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: >> 270.4.6/1538 - Release Date: 7/7/2008 7:40 AM >> >> > > > -- > Samisa Abeysinghe Director, Engineering; WSO2 Inc. > > http://www.wso2.com/ - "The Open Source SOA Company" > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > ------=_Part_9234_15658404.1215543807603 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Client code attached below - many thanks.
Have highlighted the call to send/receive in red...it is only called once.

I have included a TCP header dump (below the code) - notice the two blocks of messages repeated within millisecs.
The lengths have been highlighted in colour and the repetition can be seen.

If there is anything I can set to show whether duplicate messages are being sent, please let me know.

#include <iostream>

#include <axiom.h>
#include <axis2_util.h>
#include <axiom_soap.h>
#include <axiom_soap_const.h>
#include <axis2_client.h>
#include <axis2_http_transport.h>
#include <axis2_http_client.h>
#include <axis2_conf_ctx.h>
#include <axis2_svc_client.h>
#include <axis2_endpoint_ref.h>
#include <axiom_namespace.h>

#include <map>
#include <netdb.h>
#include <stdbool.h>
#include <stdio.h>
#include <string>
#include <stdlib.h>
#include <unistd.h>
#include <vector>
#include <sstream>

    using namespace std;
   
    const axis2_char_t *CACHED_HTTP_CLIENT = "CACHED_HTTP_CLIENT";
    const axis2_char_t *REUSE_HTTP_CLIENT = "REUSE_HTTP_CLIENT";
    const axis2_char_t *CWMP_NAMESPACE_PREFIX = "cwmp";
    const axis2_char_t *CWMP_NAMESPACE_URI = "urn:dslforum-org:cwmp-1-0";
    const axis2_char_t *SOAP_NAMESPACE_URI = "http://schemas.xmlsoap.org/soap/";
    const axis2_char_t *SOAP_NAMESPACE_PREFIX = "soap";
    const axis2_char_t *XSI_NAMESPACE_PREFIX = "xsi";     
    const axis2_char_t *XSI_NAMESPACE_URI = "http://www.w3.org/2001/XMLSchema-instance";
    const axutil_env_t *env = NULL;
   
    const axis2_char_t *address = "https://localhost:7547/services/ConfigurationServer";
   
    axiom_element_t *transactionIdHeader = NULL;
    axutil_qname_t *transactionIDQname = NULL;
    axis2_svc_client_t *serviceClient = NULL;
    axiom_namespace_t* CWMP_NAMESPACE;   
    axiom_namespace_t* CWMP_EMPTY_PREFIX_NAMESPACE;
    axiom_namespace_t* SOAP_NAMESPACE;   
    axis2_options_t *communicationOptions;   
   
    char userGroupBuffer[100];
    char remoteHostname[] = "undefined";
    char remoteURIBuffer[100];
    char *remoteURI = remoteURIBuffer;
    char clientHostname[128];
    char *userGroup = userGroupBuffer;
    char *returnText;
   
    int informRetryCount = 0;
    int remotePort = -1;
    int envelopeCount;   
   
    class PortTest
    {
    public:   
        PortTest()
        {
            const axis2_char_t *client_home = NULL;
            const axis2_char_t *localname = "mustUnderstand";
            const axis2_char_t *value = "1";
            const axis2_char_t *uri = "http://schemas.xmlsoap.org/soap/";;
            const axis2_char_t *prefix = "soap";
            const axis2_char_t *localpart = "ID";
           
            axis2_endpoint_ref_t* endpoint_ref = NULL;       
            axis2_http_client_t *httpClient = NULL;
            axutil_url_t *url =  NULL;   
            axiom_attribute_t *omAttribute = NULL;   
            axiom_namespace_t *nameSpace = NULL;
            axiom_namespace_t *SOAP_ENCODING_NAMESPACE = NULL;
           
            remoteURI = stpcpy (remoteURI, "/");
           
            env = axutil_env_create_all("port.log", AXIS2_LOG_LEVEL_TRACE);
                   
            SOAP_ENCODING_NAMESPACE = axiom_namespace_create(env, "http://schemas.xmlsoap.org/soap/envelope/", "soap-enc");
            CWMP_NAMESPACE = axiom_namespace_create(env, CWMP_NAMESPACE_URI, CWMP_NAMESPACE_PREFIX);                       
            CWMP_EMPTY_PREFIX_NAMESPACE = axiom_namespace_create(env, CWMP_NAMESPACE_URI, "");
            SOAP_NAMESPACE = axiom_namespace_create(env, SOAP_NAMESPACE_URI, SOAP_NAMESPACE_PREFIX);           
            nameSpace = axiom_namespace_create(env, uri, prefix);           
           
            // Create end-point
            endpoint_ref = axis2_endpoint_ref_create(env, address);
           
            // Create options
            communicationOptions = axis2_options_create(env);
            axis2_options_set_to(communicationOptions, env, endpoint_ref);
           
            // Set envelope
            axis2_options_set_soap_version(communicationOptions, env, AXIOM_SOAP11);
                       
            client_home = AXIS2_GETENV("AXIS2C_HOME");
           
            // Create Service Client
            serviceClient = axis2_svc_client_create(env, client_home);           
           
            // Add options
            axis2_svc_client_set_options(serviceClient, env, communicationOptions);
                   
            // Create HTTP client
            httpClient = axis2_http_client_create(env, url);
           
            // Get context and add properties
            axis2_svc_ctx_t *serviceContext = axis2_svc_client_get_svc_ctx( serviceClient, env);           
            axis2_conf_ctx_t *configurationContext = axis2_svc_ctx_get_conf_ctx(serviceContext,env);                   
            axis2_ctx_t *context = axis2_conf_ctx_get_base(configurationContext, env);   

            axutil_property_t *propertyCached = axutil_property_create (env);
            axutil_property_set_value(propertyCached, env, httpClient);
            axis2_ctx_set_property(context, env, CACHED_HTTP_CLIENT, propertyCached);
                       
            axutil_property_t *propertyReused = axutil_property_create (env);
            axutil_property_set_value(propertyReused, env, false);
            axis2_ctx_set_property(context, env, REUSE_HTTP_CLIENT, propertyReused);
                   
             transactionIDQname = axutil_qname_create(env, localpart, CWMP_NAMESPACE_URI, CWMP_NAMESPACE_PREFIX);
            omAttribute = AXIS2_EXTERN axiom_attribute_create(env, localname, value, nameSpace);
         }
               
        /**
         * Add a transactionIdHeader to the outgoing message
         */
        void addTransactionIdHeader()
        {
            cout << "In addTransactionIdHeader()" << endl;
            time_t rawtime;
            struct tm * timeinfo;
            char buffer [200];
   
            time ( &rawtime );
            timeinfo = localtime ( &rawtime );
   
            strftime (buffer,200,"%d%m%H%M%S",timeinfo);           
            strncat (buffer, clientHostname, 128);       
   
            axiom_node_t *node = axiom_node_create(env);       
            transactionIdHeader = axiom_element_create_with_qname(env, NULL, transactionIDQname, &node);
            axiom_element_set_text(transactionIdHeader, env, buffer, node);
           
            axiom_element_add_attribute(
                transactionIdHeader,
                env,
                axiom_attribute_create (env, "mustUnderstand", "1", SOAP_NAMESPACE),
                node);                   
           
            transactionIdHeader = axiom_element_create_with_qname(env, NULL, transactionIDQname, &node);
            axiom_element_set_text(transactionIdHeader, env, buffer, node);
           
            axis2_svc_client_add_header(serviceClient, env, node) ;
        }
           
       
        /**
         * Do the work to establish the parameters of communication with the server
         *
         * @return
         */
        void informServer()
        {           
            cout << "In informServer()" << endl;
           
            axiom_node_t *methodNode = axiom_node_create(env);
            axutil_string_t* informString = axutil_string_create (env,"inform");               
            // Created with 2nd parameter as NULL as it has no parent
            axiom_element_create_str(env, NULL, informString, CWMP_NAMESPACE, &methodNode);
                                   
            axiom_node_t *deviceIdNode = axiom_node_create(env);   
            axutil_string_t* deviceIdString = axutil_string_create (env,"DeviceId");               
            // Created element with methodNode as parent
            axiom_element_create_str(env, methodNode, deviceIdString, CWMP_NAMESPACE, &deviceIdNode);                   
           
            // Add text to node
            axiom_node_t *tempNode = axiom_node_create(env);
            axiom_text_create(env, deviceIdNode, "TBD", &tempNode);
                       
            axiom_node_t *eventNode = axiom_node_create(env);       
            axutil_string_t* eventString = axutil_string_create (env,"Event");               
            axiom_element_create_str(env, methodNode, eventString, CWMP_NAMESPACE, &eventNode);                   
            axiom_text_create(env, eventNode, "TBD", &tempNode);
                           
            axiom_node_t *maxEnvelopesNode = axiom_node_create(env);   
            axutil_string_t* maxEnvelopesString = axutil_string_create (env,"MaxEnvelopes");   
            axiom_element_create_str(env, methodNode, maxEnvelopesString, CWMP_NAMESPACE, &maxEnvelopesNode);
            axiom_text_create(env, maxEnvelopesNode, "1", &tempNode);       
           
            axiom_node_t *currentTimeNode = axiom_node_create(env);       
            axutil_string_t* currentTimeString = axutil_string_create (env,"CurrentTime");   
            axiom_element_create_str(env, methodNode, currentTimeString, CWMP_NAMESPACE, &currentTimeNode);   
            axiom_text_create(env, currentTimeNode, "2008-07-07 15:58:06", &tempNode);
               
            // Convert int to string
            std::ostringstream sout;
            sout << informRetryCount;
            std::string tempString(sout.str());
           
            // Convert string to char
            char * retryCount;
            retryCount = new char[tempString.length() + 1];
            strcpy(retryCount, tempString.c_str());
           
            axiom_node_t *retryCountNode = axiom_node_create(env);   
            axutil_string_t* retryCountString = axutil_string_create (env,"RetryCount");       
            axiom_element_create_str(env, methodNode, retryCountString, CWMP_NAMESPACE, &retryCountNode);       
            axiom_text_create(env, retryCountNode, retryCount, &tempNode);
            delete[] retryCount;           
           
            axiom_node_t *parameterListNode = axiom_node_create(env);   
            axutil_string_t* parameterListString = axutil_string_create (env,"ParameterList");   
            axiom_element_create_str(env, methodNode, parameterListString, CWMP_NAMESPACE, &parameterListNode);
       
            axis2_svc_client_remove_all_headers(serviceClient, env);
           
            addTransactionIdHeader();
                               
            axis2_char_t* requestString = axiom_node_to_string(methodNode,env);            
           
            cout << requestString << "\n" << endl;

            axiom_node_t *response = axis2_svc_client_send_receive(serviceClient, env, methodNode);           
           
            if (response == NULL)
            {
                cout << "informServer() received null response..." << endl;
                return;
            }
                                           
            axis2_char_t* responseString = axiom_node_to_string(response,env);            
            cout << "\n" << responseString << "\n" << endl;
           
            return;
        }
       

        void establishConnection(int retryInterval)
        {
            const axis2_char_t *userID = "application";
            const axis2_char_t *password = "wlyVdZZ05D8";
           
            axis2_options_set_http_auth_info(
                communicationOptions,
                env,
                userID,
                password,
                AXIS2_HTTP_AUTH_TYPE_BASIC);   
                                               
            informServer();
        }

    };
   
   
    int main( int argc, const char* argv[] )
    {
        cout << "In Port main()" << endl;
               
        PortTest *aPort = new PortTest();
        aPort->establishConnection(180);
       
        cout << "Leaving Port main()\n";
       
        return 0;
    }
   
   

As an FYI, the server port is 7547

tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
13:25:53.083479 IPv4, length 74: IP (tos 0x0, ttl  64, id 31248, offset                     0, flags [DF], proto 6, length: 60) localhost.40684 > localhost.7547: S [tcp sum ok] 1289853052:1289853052(0) win 32767 <mss 16396                    ,sackOK,timestamp 1137500780 0,nop,wscale 2>
13:25:53.083506 IPv4, length 74: IP (tos 0x0, ttl  64, id 0, offset 0, f                    lags [DF], proto 6, length: 60) localhost.7547 > localhost.40684: S [tcp sum ok] 1282480388:1282480388(0) ack 1289853053 win 32767                     <mss 16396,sackOK,timestamp 1137500780 1137500780,nop,wscale 2>
13:25:53.083520 IPv4, length 66: IP (tos 0x0, ttl  64, id 31250, offset                     0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 1:1(0) ack 1 win 8192 <nop,nop,timestamp 1137                    500780 1137500780>
13:25:53.086189 IPv4, length 208: IP (tos 0x0, ttl  64, id 31252, offset                     0, flags [DF], proto 6, length: 194) localhost.40684 > localhost.7547: P 1:143(142) ack 1 win 8192 <nop,nop,timestamp 1137500783                     1137500780>
13:25:53.086201 IPv4, length 66: IP (tos 0x0, ttl  64, id 64361, offset                     0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40684: . [tcp sum ok] 1:1(0) ack 143 win 8192 <nop,nop,timestamp 11                    37500783 1137500783>
13:25:53.094438 IPv4, length 1300: IP (tos 0x0, ttl  64, id 64363, offse                    t 0, flags [DF], proto 6, length: 1286) localhost.7547 > localhost.40684: P 1:1235(1234) ack 143 win 8192 <nop,nop,timestamp 11375                    00791 1137500783>
13:25:53.094551 IPv4, length 66: IP (tos 0x0, ttl  64, id 31254, offset                     0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 143:143(0) ack 1235 win 8192 <nop,nop,timesta                    mp 1137500791 1137500791>
13:25:53.107114 IPv4, length 224: IP (tos 0x0, ttl  64, id 31256, offset                     0, flags [DF], proto 6, length: 210) localhost.40684 > localhost.7547: P 143:301(158) ack 1235 win 8192 <nop,nop,timestamp 113750                    0804 1137500791>
13:25:53.112815 IPv4, length 72: IP (tos 0x0, ttl  64, id 64365, offset                     0, flags [DF], proto 6, length: 58) localhost.7547 > localhost.40684: P [bad tcp cksum fe2e (->e8c6)!] 1235:1241(6) ack 301 win 81                    92 <nop,nop,timestamp 1137500809 1137500804>
13:25:53.113101 IPv4, length 111: IP (tos 0x0, ttl  64, id 64367, offset                     0, flags [DF], proto 6, length: 97) localhost.7547 > localhost.40684: P 1241:1286(45) ack 301 win 8192 <nop,nop,timestamp 1137500                    810 1137500804>
13:25:53.113169 IPv4, length 66: IP (tos 0x0, ttl  64, id 31258, offset                     0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: . [tcp sum ok] 301:301(0) ack 1286 win 8192 <nop,nop,timesta                    mp 1137500810 1137500809>
13:25:53.113392 IPv4, length 348: IP (tos 0x0, ttl  64, id 31260, offset                     0, flags [DF], proto 6, length: 334) localhost.40684 > localhost.7547: P 301:583(282) ack 1286 win 8192 <nop,nop,timestamp 113750                    0810 1137500809>
13:25:53.113503 IPv4, length 124: IP (tos 0x0, ttl  64, id 31262, offset                     0, flags [DF], proto 6, length: 110) localhost.40684 > localhost.7547: P 583:641(58) ack 1286 win 8192 <nop,nop,timestamp 1137500                    810 1137500809>
13:25:53.114383 IPv4, length 66: IP (tos 0x0, ttl  64, id 64369, offset                     0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40684: . [tcp sum ok] 1286:1286(0) ack 641 win 8192 <nop,nop,timest                    amp 1137500811 1137500810>
13:25:53.114469 IPv4, length 652: IP (tos 0x0, ttl  64, id 31264, offset                     0, flags [DF], proto 6, length: 638) localhost.40684 > localhost.7547: P 641:1227(586) ack 1286 win 8192 <nop,nop,timestamp 11375                    00811 1137500811>
13:25:53.116686 IPv4, length 183: IP (tos 0x0, ttl  64, id 64371, offset                     0, flags [DF], proto 6, length: 169) localhost.7547 > localhost.40684: P 1286:1403(117) ack 1227 win 8192 <nop,nop,timestamp 1137                    500813 1137500811>
13:25:53.116872 IPv4, length 471: IP (tos 0x0, ttl  64, id 64373, offset                     0, flags [DF], proto 6, length: 457) localhost.7547 > localhost.40684: P 1403:1808(405) ack 1227 win 8192 <nop,nop,timestamp 1137                    500813 1137500811>
13:25:53.117045 IPv4, length 103: IP (tos 0x0, ttl  64, id 64375, offset                     0, flags [DF], proto 6, length: 89) localhost.7547 > localhost.40684: P 1808:1845(37) ack 1227 win 8192 <nop,nop,timestamp 113750                    0814 1137500811>


And then repeated...


13:25:53.117152 IPv4, length 74: IP (tos 0x0, ttl  64, id 26110, offset                     0, flags [DF], proto 6, length: 60) localhost.40685 > localhost.7547: S [tcp sum ok] 1274709872:1274709872(0) win 32767 <mss 16396                    ,sackOK,timestamp 1137500814 0,nop,wscale 2>
13:25:53.117170 IPv4, length 74: IP (tos 0x0, ttl  64, id 0, offset 0, f                    lags [DF], proto 6, length: 60) localhost.7547 > localhost.40685: S [tcp sum ok] 1289922851:1289922851(0) ack 1274709873 win 32767                     <mss 16396,sackOK,timestamp 1137500814 1137500814,nop,wscale 2>
13:25:53.117181 IPv4, length 66: IP (tos 0x0, ttl  64, id 26112, offset                     0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 1:1(0) ack 1 win 8192 <nop,nop,timestamp 1137                    500814 1137500814>
13:25:53.117571 IPv4, length 208: IP (tos 0x0, ttl  64, id 26114, offset                     0, flags [DF], proto 6, length: 194) localhost.40685 > localhost.7547: P 1:143(142) ack 1 win 8192 <nop,nop,timestamp 1137500814                     1137500814>
13:25:53.117582 IPv4, length 66: IP (tos 0x0, ttl  64, id 19370, offset                     0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40685: . [tcp sum ok] 1:1(0) ack 143 win 8192 <nop,nop,timestamp 11                    37500814 1137500814>
13:25:53.125762 IPv4, length 1299: IP (tos 0x0, ttl  64, id 19372, offse                    t 0, flags [DF], proto 6, length: 1285) localhost.7547 > localhost.40685: P 1:1234(1233) ack 143 win 8192 <nop,nop,timestamp 11375                    00822 1137500814>
13:25:53.128393 IPv4, length 66: IP (tos 0x0, ttl  64, id 26116, offset                     0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 143:143(0) ack 1234 win 8192 <nop,nop,timesta                    mp 1137500825 1137500822>
13:25:53.140802 IPv4, length 224: IP (tos 0x0, ttl  64, id 26118, offset                     0, flags [DF], proto 6, length: 210) localhost.40685 > localhost.7547: P 143:301(158) ack 1234 win 8192 <nop,nop,timestamp 113750                    0837 1137500822>
13:25:53.146774 IPv4, length 72: IP (tos 0x0, ttl  64, id 19374, offset                     0, flags [DF], proto 6, length: 58) localhost.7547 > localhost.40685: P [bad tcp cksum fe2e (->69e6)!] 1234:1240(6) ack 301 win 81                    92 <nop,nop,timestamp 1137500843 1137500837>
13:25:53.147062 IPv4, length 111: IP (tos 0x0, ttl  64, id 19376, offset                     0, flags [DF], proto 6, length: 97) localhost.7547 > localhost.40685: P 1240:1285(45) ack 301 win 8192 <nop,nop,timestamp 1137500                    844 1137500837>
13:25:53.147486 IPv4, length 66: IP (tos 0x0, ttl  64, id 26120, offset                     0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 301:301(0) ack 1285 win 8192 <nop,nop,timesta                    mp 1137500844 1137500843>
13:25:53.147753 IPv4, length 348: IP (tos 0x0, ttl  64, id 26122, offset                     0, flags [DF], proto 6, length: 334) localhost.40685 > localhost.7547: P 301:583(282) ack 1285 win 8192 <nop,nop,timestamp 113750                    0844 1137500843>
13:25:53.147899 IPv4, length 124: IP (tos 0x0, ttl  64, id 26124, offset                     0, flags [DF], proto 6, length: 110) localhost.40685 > localhost.7547: P 583:641(58) ack 1285 win 8192 <nop,nop,timestamp 1137500                    844 1137500843>
13:25:53.149278 IPv4, length 66: IP (tos 0x0, ttl  64, id 19378, offset                     0, flags [DF], proto 6, length: 52) localhost.7547 > localhost.40685: . [tcp sum ok] 1285:1285(0) ack 641 win 8192 <nop,nop,timest                    amp 1137500846 1137500844>
13:25:53.149490 IPv4, length 652: IP (tos 0x0, ttl  64, id 26126, offset                     0, flags [DF], proto 6, length: 638) localhost.40685 > localhost.7547: P 641:1227(586) ack 1285 win 8192 <nop,nop,timestamp 11375                    00846 1137500846>
13:25:53.151996 IPv4, length 183: IP (tos 0x0, ttl  64, id 19380, offset                     0, flags [DF], proto 6, length: 169) localhost.7547 > localhost.40685: P 1285:1402(117) ack 1227 win 8192 <nop,nop,timestamp 1137                    500849 1137500846>

At this point, the server is responding with a failure message due to the duplicated incoming message.

13:25:53.152692 IPv4, length 711: IP (tos 0x0, ttl  64, id 19382, offset                     0, flags [DF], proto 6, length: 697) localhost.7547 > localhost.40685: P 1402:2047(645) ack 1227 win 8192 <nop,nop,timestamp 1137                    500849 1137500846>
13:25:53.152828 IPv4, length 66: IP (tos 0x0, ttl  64, id 26128, offset                     0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: . [tcp sum ok] 1227:1227(0) ack 2047 win 8192 <nop,nop,times                    tamp 1137500849 1137500849>
13:25:53.153126 IPv4, length 103: IP (tos 0x0, ttl  64, id 19384, offset                     0, flags [DF], proto 6, length: 89) localhost.7547 > localhost.40685: P 2047:2084(37) ack 1227 win 8192 <nop,nop,timestamp 113750                    0850 1137500849>
13:25:53.154589 IPv4, length 66: IP (tos 0x0, ttl  64, id 31266, offset                     0, flags [DF], proto 6, length: 52) localhost.40684 > localhost.7547: R [tcp sum ok] 1227:1227(0) ack 1845 win 8192 <nop,nop,times                    tamp 1137500851 1137500813>
13:25:53.155405 IPv4, length 66: IP (tos 0x0, ttl  64, id 26130, offset                     0, flags [DF], proto 6, length: 52) localhost.40685 > localhost.7547: F [tcp sum ok] 1227:1227(0) ack 2084 win 8192 <nop,nop,times                    tamp 1137500852 1137500850>
13:25:53.156180 IPv4, length 95: IP (tos 0x0, ttl  64, id 19386, offset                     0, flags [DF], proto 6, length: 81) localhost.7547 > localhost.40685: P [bad tcp cksum fe45 (->7f91)!] 2084:2113(29) ack 1228 win                     8192 <nop,nop,timestamp 1137500853 1137500852>
13:25:53.156197 IPv4, length 54: IP (tos 0x0, ttl  64, id 0, offset 0, f                    lags [DF], proto 6, length: 40) localhost.40685 > localhost.7547: R [tcp sum ok] 1274711100:1274711100(0) win 0








On Mon, Jul 7, 2008 at 9:41 PM, Samisa Abeysinghe <samisa@wso2.com> wrote:
Andy Karseras wrote:
Hi,

It appears that for some reason, the ServiceClient is sending the message twice to the server in a very short time interval (less than 20 milli-secs).

It sends it twice only if you send it twice. Can you send the client code you are using?
Note that, if you are using echo client sample, it does send two requests to the server.

Samisa...


The payload remains the same and it is a a re-send rather than a call being made twice.

It may be helpful to note that I am using an AXIS2 Java Server with a AXIS2C client - interaction between the exisiting Java client and Java server are normal and functioning as expected.  Therefore, I do not (at this stage) suspect the server.

The server is exoected to be slow for the first request so control of the timeout was my initial point of investigation.

I have tried setting the axis2_http_client_set_timeout <file:///D:/axis2c/docs/api/html/group__axis2__http__client.html#g32bb50461fab10fa658ac0d1c659e7da> but to no avail.

Would the setting of a socket timeout be necessary and if so, how would this be done ?

Any suggestions on why this may be occuring ?

For completeness, I have attached my logs (in hope that there is something obvious that I am doing wrong).


Andy



[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *request_uri_based_dispatcher added to the index 0 of the phase Transport
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *addressing_based_dispatcher added to the index 1 of the phase Transport
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *rest_dispatcher added to the index 0 of the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *soap_message_body_based_dispatcher added to the index 1 of the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *soap_action_based_dispatcher added to the index 2 of the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *dispatch_post_conditions_evaluator added to the index 0 of the phase PostDispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(121) axis2_handler_t *context_handler added to the index 1 of the phase PostDispatch
[Mon Jul  7 15:26:18 2008] [debug] conf_builder.c(233) No custom dispatching order found. Continue with the default dispatching order
[Mon Jul  7 15:26:18 2008] [debug] conf_builder.c(378) Module addressing found in axis2.xml
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [error] dir_handler.c(219) No files in the path /home/karseras/axis2c/deploy/services.
[Mon Jul  7 15:26:18 2008] [debug] dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : /home/karseras/axis2c/deploy/modules/addressing/libaxis2_mod_addr.so
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [debug] dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : /home/karseras/axis2c/deploy/modules/logging/libaxis2_mod_log.so
[Mon Jul  7 15:26:18 2008] [debug] class_loader.c(141) Object loaded successfully
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingInHandler to phase Transport
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(123) Service name is : __ANONYMOUS_SERVICE__
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(375) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Jul  7 15:26:18 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Jul  7 15:26:18 2008] [debug] op_client.c(869) Start:axis2_op_client_infer_transport
[Mon Jul  7 15:26:18 2008] [debug] op_client.c(924) End:axis2_op_client_infer_transport
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler AddressingOutHandler within the phase MessageOut
[Mon Jul  7 15:26:18 2008] [info]  Starting addressing out handler
[Mon Jul  7 15:26:18 2008] [debug] addr_out_handler.c(133) No action present. Stop processing addressing
[Mon Jul  7 15:26:18 2008] [debug] http_transport_sender.c(246) ctx_epr:https://localhost:7547/services/SampleApplication
[Mon Jul  7 15:26:18 2008] [debug] http_transport_sender.c(768) using axis2 native http sender.
[Mon Jul  7 15:26:18 2008] [debug] http_sender.c(415) msg_ctx_id:92b440de-4c5a-1dd1-3efa-00145eecc23a
[Mon Jul  7 15:26:18 2008] [info]  [ssl client] Client certificate chain filenot specified
[Mon Jul  7 15:26:18 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer
[Mon Jul  7 15:26:18 2008] [info]  [ssl client] Client certificate chain filenot specified
[Mon Jul  7 15:26:18 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer
[Mon Jul  7 15:26:18 2008] [debug] http_transport_sender.c(785) OP name axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in
[Mon Jul  7 15:26:18 2008] [debug] soap_builder.c(895) Identified soap version is soap11
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler request_uri_based_dispatcher within the phase Transport
[Mon Jul  7 15:26:18 2008] [debug] req_uri_disp.c(100) Checking for service using target endpoint address : https://localhost:7547/services/SampleApplication
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler AddressingInHandler within the phase Transport
[Mon Jul  7 15:26:18 2008] [info]  Starting addressing in handler
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler addressing_based_dispatcher within the phase Transport
[Mon Jul  7 15:26:18 2008] [debug] addr_disp.c(107) Checking for service using WSA enpoint address : https://localhost:7547/services/SampleApplication
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler rest_dispatcher within the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler soap_message_body_based_dispatcher within the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] soap_body_disp.c(127) Checking for service using SOAP message body's first child's namespace URI : http://schemas.xmlsoap.org/soap/
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler soap_action_based_dispatcher within the phase Dispatch
[Mon Jul  7 15:26:18 2008] [debug] soap_action_disp.c(89) Checking for service using SOAPAction is not implemented
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler dispatch_post_conditions_evaluator within the phase PostDispatch
[Mon Jul  7 15:26:18 2008] [debug] phase.c(210) Invoke the handler context_handler within the phase PostDispatch


No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.4.6/1538 - Release Date: 7/7/2008 7:40 AM
 


--
Samisa Abeysinghe Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


------=_Part_9234_15658404.1215543807603--