Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 30235 invoked from network); 19 Jan 2011 14:31:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2011 14:31:19 -0000 Received: (qmail 91200 invoked by uid 500); 19 Jan 2011 14:31:19 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 91085 invoked by uid 500); 19 Jan 2011 14:31:16 -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 91077 invoked by uid 99); 19 Jan 2011 14:31:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 14:31:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of freeman.fang@gmail.com designates 209.85.216.41 as permitted sender) Received: from [209.85.216.41] (HELO mail-qw0-f41.google.com) (209.85.216.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 14:31:08 +0000 Received: by qwa26 with SMTP id 26so888607qwa.0 for ; Wed, 19 Jan 2011 06:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:in-reply-to:content-type :mime-version:subject:date:references:x-mailer; bh=6PXRrcpFNxZ3AmlI6+wSjQM0VKRldKPnciUVKxyOVZM=; b=ZOnWyMIsU/464HIi4ZY8dNe4DX/VyFVAz91gqDSRbOAq59Op+b3n3Q6euGu2s2rnX5 6j+bgQ2Z2a1n0Q3Z36exWc66K5h4kutTeE34Iul/fUHICuGM6muEpUhMq3XTMR5K3CWc 2WPOkZUCR0rfDRCPt8jQmwOIdJYwu9NY2jbe0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=KIJhDX+oMrajenvgk7WLr3sS+6LzYE79+wwASxQeBTWWdRVCOfCIwhWegWiVHNULy5 YeVJyyu8QTgTOpTgV8nTvIQdCZifQfzJWf8Ht74QLqEX/eNrcI90ZqY+qOai2jvLYldP V/INOFO51DFLF3nF5B44l6yNxXeCOldZylzJo= Received: by 10.229.241.13 with SMTP id lc13mr692398qcb.190.1295447446843; Wed, 19 Jan 2011 06:30:46 -0800 (PST) Received: from [192.168.1.100] ([123.119.238.220]) by mx.google.com with ESMTPS id y17sm4751655qci.33.2011.01.19.06.30.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Jan 2011 06:30:46 -0800 (PST) Message-Id: From: Freeman Fang To: users@cxf.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-12--687340034 Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Unable to set Soap Version to 1.2 Date: Wed, 19 Jan 2011 22:30:39 +0800 References: <5ECDD263-BD07-47A2-A0C0-F9EA76C62F05@gmail.com> <2B2FB99F-39D4-426C-A1C3-DC55AD63A1C5@gmail.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-12--687340034 Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hi, About the code part, I just want to see how you get portType, so that =20= I can know if you pass in wsdlLocation About the log part, I want to see how the servicemodel is build, so =20 that I can see if it pick up the wsdl, it should be at very beginning =20= when you start client. Unfortunately, your post miss both what I want to check. :-) Freeman On 2011-1-19, at =E4=B8=8B=E5=8D=8810:15, MARTELLI Julien wrote: > This is how I configure the client: > > > // Below portType is a concrete implementation of =20 > DocumentRepositoryPortType generated interface > > // Setting the service URL > BindingProvider provider =3D (BindingProvider) portType; > provider=20 > .getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, =20= > wsUrl); > // MTOM > SOAPBinding soapBinding =3D (SOAPBinding) provider.getBinding(); > soapBinding.setMTOMEnabled(true); > // Adding a specific handler > List handlerChain =3D binding.getHandlerChain(); > handlerChain.add(new JetonAuthentificationHandler()); > soapBinding.setHandlerChain(handlerChain); > // Getting the client > Client client =3D ClientProxy.getClient(portType); > // WS-Adressing > EndpointImpl endpoint =3D (EndpointImpl) client.getEndpoint(); > Bus bus =3D endpoint.getBus(); > new WSAddressingFeature().initialize(client, bus); > // Setting endpointInfo URL > ConduitSelector conduitSelector =3D client.getConduitSelector(); > conduitSelector=20 > .getEndpoint().getEndpointInfo().setAddress(super.wsUrl); > // Then we add SSL / TLS configuration =3D> not showed here > > > > Then we call the service: > > // With request as content > portType.documentRepositoryProvideAndRegisterDocumentSetB(request); > > > On the logs here is what we have (extract of the SOAP Envelope =20 > beginning only): > > INFO: Outbound Message > --------------------------- > ID: 1 > Address: https://172.30.13.61:9043/xds/cxf/DocumentRepository_Service > Encoding: UTF-8 > Content-Type: multipart/related; type=3D"application/xop+xml"; =20 > boundary=3D"uuid:0e72f86e-32e7-4259-a577-45c4482f461a"; = start=3D" >"; start-info=3D"text/xml" > Headers: = {SOAPAction=3D["urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b=20 > "], Accept=3D[*/*]} > Payload: > --uuid:0e72f86e-32e7-4259-a577-45c4482f461a > Content-Type: application/xop+xml; charset=3DUTF-8; type=3D"text/xml"; > Content-Transfer-Encoding: binary > Content-ID: > > envelope/"> ">urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b Action>urn:uuid:c7a3eac7-054d-48a1= -a510-c43e6d3df180=20 > https://172.30.13.61:9043/x= ds/cxf/DocumentRepository_Service=20 >
http://www.w3.org/= 2005/08/addressing/anonymous=20 >
"> 2.0:assertion" ID=3D"be515324-bccf-4e2b-8667-231b6f46f4a6" =20 > IssueInstant=3D"2009-02-02T00:00:00.000Z" Version=3D"2.0"> Format=3D"urn:oasis:names:tc:SAML:1.1:nameid-=20 > format:X509SubjectName">CN=3Dclient, OU=3DWaid, O=3DWaid, L=3DAix, = ST=3DPACA, =20 > C=3DFR "> > ... > > > > -----Message d'origine----- > De : Freeman Fang [mailto:freeman.fang@gmail.com] > Envoy=C3=A9 : mercredi 19 janvier 2011 15:04 > =C3=80 : users@cxf.apache.org > Objet : Re: Unable to set Soap Version to 1.2 > > Hi, > > How you configure your client? What the client side looks like, ensure > you already specify wsdlLocation for client side. Seems the client > side didn't pick up the wsdl to build the service model. > Could you please paste the log when you run client? > > Freeman > On 2011-1-19, at =E4=B8=8B=E5=8D=889:38, MARTELLI Julien wrote: > >> Hi, >> >> Thanks for this quick answer. >> >> I impacted the momdifications you are talking about and there is no >> difference. The client still generates SOAP 1.1 messages.... >> >> >> -----Message d'origine----- >> De : Freeman Fang [mailto:freeman.fang@gmail.com] >> Envoy=C3=A9 : mercredi 19 janvier 2011 10:06 >> =C3=80 : users@cxf.apache.org >> Objet : Re: Unable to set Soap Version to 1.2 >> >> Hi, >> >> My comment inline >> On 2011-1-19, at =E4=B8=8B=E5=8D=884:54, MARTELLI Julien wrote: >> >>> Hi all, >>> >>> I am facing a problem with the SOAP message version. >>> I am really stuck with this problem so any help would be =20 >>> appreciated. >>> >>> OK so here is the context. >>> >>> I have a WSDL file from which I generate sources using the wsdl2java >>> CXF Maven plugin. >>> Here is an extract of my WSDL file : >>> >>> >> xmlns=3D"http://schemas.xmlsoap.org/wsdl/" = xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema >>> " >>> xmlns:ihe=3D"urn:ihe:iti:xds-b:2007" = xmlns:rs=3D"urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0 >>> " >>> targetNamespace=3D"urn:ihe:iti:xds-b:2007" = xmlns:soap12=3D"http://schemas.xmlsoap.org/wsdl/soap12/ >>> " >>> xmlns:wsaw=3D"http://www.w3.org/2006/05/addressing/wsdl" >>> name=3D"DocumentRepository"> >>> ... >>> >> type=3D"ihe:DocumentRepository_PortType"> >>> >> "/> >> I think transport here should be >> transport=3D"http://www.w3.org/2003/05/soap/bindings/HTTP/" >>> >> b"> >>> >> "/> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> 2007:RetrieveDocumentSet >>> "/> >>> >>> >>> >>> >>> >>> >>> >>> >>> ;;; >>> >>> >> binding=3D"ihe:DocumentRepository_Binding"> >>> >> "/> >>> >>> >>> >>> >>> On the generated interface there is no annotation concerning the >>> Binding : >>> >>> @WebService(targetNamespace =3D "urn:ihe:iti:xds-b:2007", name =3D >>> "DocumentRepository_PortType") >>> @XmlSeeAlso >>> ({oasis.names.tc.ebxml_regrep.xsd.query._3.ObjectFactory.class, >>> oasis.names.tc.ebxml_regrep.xsd.rs._3.ObjectFactory.class, >>> ObjectFactory.class, >>> oasis.names.tc.ebxml_regrep.xsd.lcm._3.ObjectFactory.class, >>> oasis.names.tc.ebxml_regrep.xsd.rim._3.ObjectFactory.class}) >>> public interface DocumentRepositoryPortType { >>> ... >>> >>> >>> Then I use the generated classes to contact the Web Service and my >>> client is not configured via Spring but build programmatically. >>> >>> The problem is that the generated SOAP message is a SOAP 1.1 >>> message... >>> I am not able to find a way to configure my client to use a SOAP 1.2 >>> binding, and I tried to add the annotation >>> @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING) >>> on the generated interface (as someone suggested to me on this >>> stackoverflow post : >> You should add annotation like >> @javax.xml.ws.BindingType(value =3D = "http://www.w3.org/2003/05/soap/bindings/HTTP/ >> ") >> >> You can get more details from the wsdl_first_soap12 example shipped >> with kit. >> >> Freeman >>> = http://stackoverflow.com/questions/4248098/cxf-how-to-set-soapversion-on-c= xf-port-without-spring) >>> but it didn't change anything... >>> Maybe it's because I configure my client without Spring and thus the >>> default Soap 1.1 version is used... >>> I really don't know... >>> >>> >>> Do you guys have an idea ? >>> >>> Thanks in advance ! >>> J. >> >> >> --=20 >> Freeman Fang >> >> ------------------------ >> >> FuseSource: http://fusesource.com >> blog: http://freemanfang.blogspot.com >> twitter: http://twitter.com/freemanfang >> Apache Servicemix:http://servicemix.apache.org >> Apache Cxf: http://cxf.apache.org >> Apache Karaf: http://karaf.apache.org >> Apache Felix: http://felix.apache.org >> > > > --=20 > Freeman Fang > > ------------------------ > > FuseSource: http://fusesource.com > blog: http://freemanfang.blogspot.com > twitter: http://twitter.com/freemanfang > Apache Servicemix:http://servicemix.apache.org > Apache Cxf: http://cxf.apache.org > Apache Karaf: http://karaf.apache.org > Apache Felix: http://felix.apache.org > --=20 Freeman Fang ------------------------ FuseSource: http://fusesource.com blog: http://freemanfang.blogspot.com twitter: http://twitter.com/freemanfang Apache Servicemix:http://servicemix.apache.org Apache Cxf: http://cxf.apache.org Apache Karaf: http://karaf.apache.org Apache Felix: http://felix.apache.org --Apple-Mail-12--687340034--