Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A60ED144 for ; Thu, 18 Oct 2012 17:40:33 +0000 (UTC) Received: (qmail 89552 invoked by uid 500); 18 Oct 2012 17:40:32 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89265 invoked by uid 500); 18 Oct 2012 17:40:30 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 89231 invoked by uid 99); 18 Oct 2012 17:40:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2012 17:40:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.r.carr@gmail.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-ob0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2012 17:40:22 +0000 Received: by mail-ob0-f173.google.com with SMTP id wc18so11350208obb.32 for ; Thu, 18 Oct 2012 10:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ueaacRb7KlVAbs0GBXUo6tlObq5hJpobFEQn/quxSTU=; b=qUApdIQQrv0BmwrC1j7DsDdbpfEyDfMJWpAM1eQU3c0wPhqkAH2GDXSMKk+Kdnqd1F qMz/onSamJDDlDwQZFpyNpjOuvTw/tdEBeEuncM9st6+y+En36vz5QBKsKCd64mtpVdP jaF3jmSqf1KE6X3QYBEIS1TnRdNERvsqBAN1eRLlg2QpwGEbtkGa99XHV4JM++q8SXWr qtTAJlF6gzW9tWeW1tl+TYB4xlDw0Wuo1slHQDc3/XH3aehl3KPW8uBfSNIjkpgN07yH YGs+LjnDhkPMu71AJRAZgEzu+y0/HY2LeRyGHVla13p/lyUnvkcEZiiTu/0c3VWtG75Q q7Fg== MIME-Version: 1.0 Received: by 10.182.69.73 with SMTP id c9mr17607541obu.33.1350582002121; Thu, 18 Oct 2012 10:40:02 -0700 (PDT) Received: by 10.60.84.228 with HTTP; Thu, 18 Oct 2012 10:40:02 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Oct 2012 12:40:02 -0500 Message-ID: Subject: Re: Error When Communicating with 3rd Party SOAP Service From: James Carr To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I'm actually using JDK7 but I got it working. I needed to set the bindingId to SOAP 1.2 in the JaxWsProxyFactoryBean. factory.setBindingId("http://schemas.xmlsoap.org/wsdl/soap12/"); That made it work. Thanks, James On Thu, Oct 18, 2012 at 11:23 AM, David Karlsen wr= ote: > Are you on an old sun jdk? They have that problem. Upgrade to the latest > version. > Den 18. okt. 2012 17:38 skrev "James Carr" > f=F8lgende: >> >> Hey All, >> >> I've used CXF for quite sometime and this week I was putting together >> a client for a 3rd party service and get the following error when >> trying to call the service: >> >> HTTP response '415: Cannot process the message because the content >> type 'text/xml; charset=3DUTF-8' was not the expected type >> 'application/soap+xml; charset=3Dutf-8'.' when communicating with >> http//service.example.com/foo/bar >> >> Any ideas? Here is a simple snippet of the service call: >> >> JaxWsProxyFactoryBean factory =3D new > JaxWsProxyFactoryBean(); >> factory.getInInterceptors().add(new > LoggingInInterceptor()); >> factory.getOutInterceptors().add(new > LoggingOutInterceptor()); >> factory.setServiceClass(ILoginService.class); >> >> factory.setAddress(" > https://service4.example.com/services/LoginService"); >> >> ILoginService service =3D (ILoginService) factory.create= (); >> service.authenticate(new TokenRequest()); >> >> Thanks, >> James