Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 74583 invoked from network); 11 Sep 2008 10:23:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 10:23:59 -0000 Received: (qmail 53551 invoked by uid 500); 11 Sep 2008 10:23:55 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 52995 invoked by uid 500); 11 Sep 2008 10:23:54 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 52983 invoked by uid 99); 11 Sep 2008 10:23:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 03:23:54 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 10:22:53 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KdjKe-0002xl-1j for users@cxf.apache.org; Thu, 11 Sep 2008 03:23:24 -0700 Message-ID: <19431785.post@talk.nabble.com> Date: Thu, 11 Sep 2008 03:23:24 -0700 (PDT) From: ripcord To: users@cxf.apache.org Subject: Invalid SOAP action when using java ws WebService MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: robbie.kennedy@yahoo.ie X-Virus-Checked: Checked by ClamAV on apache.org Hi all, this is a slightly more detailed error for a problem i posted recently. I am connecting to a web service that was generated from WSDL. It has two methods "HelloWorld" and "HelloSayFirstName". As defined in the WSDL, the methods use the SOAP action document style. I want to add a cookie to the http header, so after the port is created, I use the following to add the header to the requestContext: BindingProvider bindingProvider = (BindingProvider) servicePort; Map requestContext = bindingProvider.getRequestContext(); List cookies = new ArrayList(); cookies.add("mycookie=mytoken"); HashMap> httpHeaders = new HashMap>(); httpHeaders.put(HTTPConstants.HEADER_COOKIE, cookies); requestContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders); This works when I call the first method (HelloWorld) - the first activity message sent to the server contains the following: POST no-cache keep-alive no-cache chunked text/xml; charset=UTF-8 * mycookie=mytoken exampleHost Java/1.5.0_14 "http://tempuri.org/IMyService/HelloWorld" http://exampleHost/WebServices/WCFService/Service.svc http://tempuri.org/IMyService/HelloWorld world However, after this method, the httpHeaders in the requestContext object have been updated to include the "Accept" header and the "SOAPAction" header - which is the incorrect action! Now, when I call the method "HelloSayFirstName" I get the following: POST no-cache keep-alive no-cache chunked text/xml; charset=UTF-8 * mycookie=mytoken exampleHost Java/1.5.0_14 "http://tempuri.org/IMyService/HelloWorld" http://exampleHost/WebServices/WCFService/Service.svc http://tempuri.org/IMyService/HelloWorld It seems that the SOAPAction in the http header and the soap header is incorrect. Is there any reason why the requestContext would keep hold of the action that was previously called, and not use the new action? I'm stumped here - any help would be greatly appreciated. Cheers. -- View this message in context: http://www.nabble.com/Invalid-SOAP-action-when-using-java-ws-WebService-tp19431785p19431785.html Sent from the cxf-user mailing list archive at Nabble.com.