Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 76807 invoked from network); 9 Oct 2008 09:55:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2008 09:55:29 -0000 Received: (qmail 51199 invoked by uid 500); 9 Oct 2008 09:55:28 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 51179 invoked by uid 500); 9 Oct 2008 09:55:27 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 51168 invoked by uid 99); 9 Oct 2008 09:55:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 02:55:27 -0700 X-ASF-Spam-Status: No, hits=1.6 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.142.185 as permitted sender) Received: from [209.85.142.185] (HELO ti-out-0910.google.com) (209.85.142.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 09:54:20 +0000 Received: by ti-out-0910.google.com with SMTP id a20so5076448tia.0 for ; Thu, 09 Oct 2008 02:54:38 -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 :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ZwffRcvvLpjULFtY5nRVJac/SZAXfzyDUGIwRZ4vduI=; b=SPUkd+nm22v1QLPj2KvD6Q6+CvfYoFihfJmp0QmmUmaxBbA/xyESLvYpfx3DKYkHBV alEzDm5cjKi0lEvAWTdCuMJ/3re1UH18y+djytyRiLAZC72JUm8SUkPAOMCpQ5Zsn4Uy KbdsmsUckOVG1Uq3DrIbD4lxgCDaKGX6pId8c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=aCrCUUpeHIpmxshfUn8X8Q3uInxWbaQespLhjEYpJwXnvoWRKpdDZkPbI59yyyZgPk hxvlUbrlIyRHqxAcEG3sWqQi+ESzoyRmeiX2SB+XRsQ4hnndMHbGGmDEPyxAMjOQIhje LTeCHc4OmOZu2zx81iLyF9tU0s0iIUNrbpgcw= Received: by 10.110.37.3 with SMTP id k3mr10604321tik.13.1223546078770; Thu, 09 Oct 2008 02:54:38 -0700 (PDT) Received: from ?192.168.0.118? ([221.223.252.103]) by mx.google.com with ESMTPS id y5sm3434488tia.15.2008.10.09.02.54.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Oct 2008 02:54:36 -0700 (PDT) Message-ID: <48EDD4D1.1010903@gmail.com> Date: Thu, 09 Oct 2008 17:54:25 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: camel-user@activemq.apache.org Subject: Re: Camel CXF component does not understand the SOAP message containing a tag for the wsdl:operation !!! References: <19881309.post@talk.nabble.com> <48ECD644.5080102@gmail.com> <19881834.post@talk.nabble.com> <48EDC87E.30801@gmail.com> <19895201.post@talk.nabble.com> In-Reply-To: <19895201.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi I don't know if this is a bug of CXF , don't do much investigation here. But you can set the wrap style by setting a JaxWsServiceFactoryBean to the ClientProxyFactoryBean like this ClientProxyFactoryBean factory = new JaxWsProxyFactoryBean(); JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean(); sf.setWrapped(false); factory.setServiceFactory(sf); ...... BTW The sf 's wrappedStyle default value is True. You can find a document which talks about Wrapped vs. Unwrapped Mode here[1] [1] http://cwiki.apache.org/CXF20DOC/http-binding.html Willem cmoulliard wrote: > Willem, > > Here is the CXF code that I use : > > package com.xpectis.service.tracker; > > import java.util.GregorianCalendar; > > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > import org.apache.cxf.frontend.ClientProxyFactoryBean; > import org.apache.cxf.interceptor.LoggingInInterceptor; > import org.apache.cxf.interceptor.LoggingOutInterceptor; > import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; > import org.junit.Test; > > import javax.xml.datatype.DatatypeFactory; > import javax.xml.datatype.XMLGregorianCalendar; > > import junit.framework.Assert; > > public class TrackerServiceTest { > > private static String ADDRESS = "http://localhost:9000/tracker"; > > //TrackerService trackerService; > > /** The Constant LOG. */ > private static final Log LOG = > LogFactory.getLog(TrackerServiceTest.class); > > /** > * Test call PostParcel Web Service. > * > * @throws Exception the exception > */ > @Test > public void testPostParcel() throws Exception > { > > // Create Client Proxy > ClientProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(TrackParcelEndpoint.class); > factory.setAddress(ADDRESS); > factory.getInInterceptors().add(new LoggingInInterceptor()); > factory.getOutInterceptors().add(new LoggingOutInterceptor()); > > TrackParcelEndpoint client = (TrackParcelEndpoint) factory.create(); > > // Create InputTrackParcel client > InputTrackParcel parcel = new InputTrackParcel(); > parcel.setName("chm"); > parcel.setDestination("Brussels"); > parcel.setOrigin("Florennes"); > //parcel.setDeliveryDate(calendar); > > // Call web service > OutputTrackParcel result = client.PostParcel(parcel); > LOG.info("Result : " + result.getReference()); > Assert.assertNotNull(result); > > > } > > } > > > Kind regards, > > Charles > > > willem.jiang wrote: > >> Hi, >> >> The server side behavior is right (WSDL, SEI) , it can't receive the >> wrapped message. >> Can you show me the client side code which call for the service ? >> I don't know why your client send a wrapped soap message, maybe you use >> a wrong front end. >> >> Willem >> >> cmoulliard wrote: >> >>> Here is the route configuration in camel : >>> >>> >>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xmlns:context="http://www.springframework.org/schema/context" >>> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint" >>> >>> xsi:schemaLocation=" >>> http://www.springframework.org/schema/beans >>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd >>> http://activemq.apache.org/camel/schema/cxfEndpoint >>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd >>> http://activemq.apache.org/camel/schema/spring >>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> >>> >>> >>> >> /> >>> >> resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" /> >>> >>> >>> >> address="http://localhost:9000/tracker" >>> serviceClass="com.xpectis.service.tracker.impl.TrackerServiceImpl" >>> /> >>> >>> >> xmlns="http://activemq.apache.org/camel/schema/spring"> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> The WSDL file : >>> >>> >>> >> targetNamespace="http://tracker.service.xpectis.com" >>> xmlns="http://schemas.xmlsoap.org/wsdl/" >>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >>> xmlns:tns="http://tracker.service.xpectis.com" >>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >>> >>> >>> >>> >>> >>> >>> >>> >> minOccurs="1"/> >>> >> maxOccurs="1" >>> minOccurs="1"> >>> >>> >> minOccurs="0"> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> transport="http://schemas.xmlsoap.org/soap/http"/> >>> >>> >> soapAction="http://tracker.service.xpectis.com/PostParcel"/> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> The interface : >>> >>> package com.xpectis.service.tracker; >>> >>> import javax.jws.WebMethod; >>> import javax.jws.WebParam; >>> import javax.jws.WebResult; >>> import javax.jws.WebService; >>> import javax.jws.soap.SOAPBinding; >>> import javax.xml.bind.annotation.XmlSeeAlso; >>> import com.xpectis.service.tracker.InputTrackParcel; >>> import com.xpectis.service.tracker.OutputTrackParcel; >>> import com.xpectis.service.tracker.ObjectFactory; >>> >>> /** >>> * This class was generated by Apache CXF 2.1.2 >>> * Wed Oct 08 11:05:48 CEST 2008 >>> * Generated source version: 2.1.2 >>> * >>> */ >>> >>> @WebService(targetNamespace = "http://tracker.service.xpectis.com", name >>> = >>> "TrackParcelEndpoint") >>> @XmlSeeAlso({ObjectFactory.class}) >>> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) >>> public interface TrackParcelEndpoint { >>> >>> @WebResult(name = "outputTrackParcel", targetNamespace = >>> "http://tracker.service.xpectis.com", partName = "parameters") >>> @WebMethod(operationName = "PostParcel", action = >>> "http://tracker.service.xpectis.com/PostParcel") >>> public OutputTrackParcel PostParcel(@WebParam(partName = >>> "parameters", >>> name = "inputTrackParcel", targetNamespace = >>> "http://tracker.service.xpectis.com") InputTrackParcel parameters >>> ); >>> } >>> >>> And implementation >>> >>> package com.xpectis.service.tracker.impl; >>> >>> import org.apache.commons.logging.Log; >>> import org.apache.commons.logging.LogFactory; >>> >>> import com.xpectis.service.tracker.InputTrackParcel; >>> import com.xpectis.service.tracker.OutputTrackParcel; >>> import com.xpectis.service.tracker.TrackParcelEndpoint; >>> >>> import org.apache.cxf.interceptor.*; >>> >>> >>> /** >>> * The webservice we have implemented. >>> */ >>> @InInterceptors(interceptors = >>> "org.apache.cxf.interceptor.LoggingInInterceptor") >>> @OutInterceptors(interceptors = >>> "org.apache.cxf.interceptor.LoggingOutInterceptor") >>> public class TrackerServiceImpl implements TrackParcelEndpoint { >>> >>> private static final Log LOG = >>> LogFactory.getLog(TrackerServiceImpl.class); >>> private static int result = 0; >>> >>> public OutputTrackParcel PostParcel(InputTrackParcel parameters) { >>> >>> OutputTrackParcel response = new OutputTrackParcel(); >>> response.setReference(result++); >>> LOG.info("Result : " + result); >>> return response; >>> >>> } >>> } >>> >>> >>> >>> >>> >>> >>> >>> willem.jiang wrote: >>> >>> >>>> Can you show me the SEI file and route configuration ? >>>> It looks like a wrapped and unwrapped issue. >>>> >>>> Willem >>>> cmoulliard wrote: >>>> >>>> >>>>> Hi, >>>>> >>>>> I have discovered a small problem between a client created using the >>>>> Client >>>>> ProxyFactoryBean and my webservice running with Apache Camel - CXF >>>>> component. >>>>> >>>>> When the client calls the web service, the ClientProxyFactoryBean class >>>>> of >>>>> CXF generates the following SOAP message : >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> chm >>>>> Brussels >>>>> Florennes >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Unfortunately, the tag is not supported by the web >>>>> service >>>>> called in camel. If I remove it and send the message using SOAPUI >>>>> client, >>>>> everything works fine. >>>>> >>>>> How can I solve this problem in Camel CXF component ? >>>>> >>>>> Charles Moulliard >>>>> >>>>> ----- >>>>> Enterprise Architect >>>>> >>>>> Xpectis >>>>> 12, route d'Esch >>>>> L-1470 Luxembourg >>>>> >>>>> Phone +352 25 10 70 470 >>>>> Mobile +352 621 45 36 22 >>>>> >>>>> e-mail : cmoulliard@xpectis.com >>>>> web site : www.xpectis.com www.xpectis.com >>>>> My Blog : http://cmoulliard.blogspot.com/ >>>>> http://cmoulliard.blogspot.com/ >>>>> >>>>> >>>>> >>>> >>>> >>> ----- >>> Enterprise Architect >>> >>> Xpectis >>> 12, route d'Esch >>> L-1470 Luxembourg >>> >>> Phone +352 25 10 70 470 >>> Mobile +352 621 45 36 22 >>> >>> e-mail : cmoulliard@xpectis.com >>> web site : www.xpectis.com www.xpectis.com >>> My Blog : http://cmoulliard.blogspot.com/ >>> http://cmoulliard.blogspot.com/ >>> >>> >> >> > > > ----- > Enterprise Architect > > Xpectis > 12, route d'Esch > L-1470 Luxembourg > > Phone +352 25 10 70 470 > Mobile +352 621 45 36 22 > > e-mail : cmoulliard@xpectis.com > web site : www.xpectis.com www.xpectis.com > My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ >