Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B5BA5D94E for ; Wed, 29 May 2013 16:32:33 +0000 (UTC) Received: (qmail 73640 invoked by uid 500); 29 May 2013 16:32:33 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 73184 invoked by uid 500); 29 May 2013 16:32:25 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 69485 invoked by uid 99); 29 May 2013 16:32:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 16:32:20 +0000 Date: Wed, 29 May 2013 16:32:20 +0000 (UTC) From: "Emmanuel FOUCHE (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CXF-5047) Wrong soap:address generated in WSDL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Emmanuel FOUCHE created CXF-5047: ------------------------------------ Summary: Wrong soap:address generated in WSDL Key: CXF-5047 URL: https://issues.apache.org/jira/browse/CXF-5047 Project: CXF Issue Type: Bug Components: JAX-WS Runtime Affects Versions: 2.7.0 Environment: WinXPsp3; Java-1.6.0_35; Tomcat-7.0.33 Reporter: Emmanuel FOUCHE I am currently tweaking the DoubleItService tutorial described by Glen Mazza on his Weblog http://www.jroller.com/gmazza/entry/web_service_tutorial. I created test clients using generated classes using wsdl2java. Everything works as intented. Now I would like to expose the same service at two location. Intended use is to filter access by requiring authentication at container level on some url-pattern like /underquota/doubleit, while /services/doubleit default remains accessible. In WSDL, I added a second element {code:xml} {code} In cxf-servlet.xml, I declared 2 endpoints {code:xml} {code} The wsdl2java-generated classe DoubleItService now has 2 methods to retrieve each portType {code:java} @WebEndpoint(name = "DoubleItPort") public DoubleItPortType getDoubleItPort() { return super.getPort(DoubleItPort, DoubleItPortType.class); } @WebEndpoint(name = "DoubleItPortUnderquota") public DoubleItPortType getDoubleItPortUnderquota() { return super.getPort(DoubleItPortUnderquota, DoubleItPortType.class); } {code} I also have to implementors, attached to the corresponding portName. Below is the one attached to the portName I added to the WSDL. {code:java} @WebService(targetNamespace = "http://www.example.org/contract/DoubleIt", // portName = "DoubleItPortUnderquota", // serviceName = "DoubleItService", // endpointInterface = "org.example.contract.doubleit.DoubleItPortType") @Features(features = "org.apache.cxf.feature.LoggingFeature") public class DoubleItUnderQuotaPortTypeImpl implements DoubleItPortType { ... {code} When deploying the WAR under Tomcat, the call to http://localhost:8080/myapp/services/ display the 2 deployed services with correct URL. ||PortType||Operation||Detail|| |DoubleItPortType|DoubleIt|Endpoint address: http://localhost:8080/fr.efe4it.sample.webmodule.doubleitwsunderquota/underquota/doubleit WSDL : {http://www.example.org/contract/DoubleIt}DoubleItService Target namespace: http://www.example.org/contract/DoubleIt| |DoubleItPortType|DoubleIt|Endpoint address: http://localhost:8080/fr.efe4it.sample.webmodule.doubleitwsunderquota/services/doubleit WSDL : {http://www.example.org/contract/DoubleIt}DoubleItService Target namespace: http://www.example.org/contract/DoubleIt| Using SoapUI, I can succesfully run test queries against the 2 services. However, when I request the WSDL in the browser, only one publishedEndpointUrl corresponds to what I setup in cxf-servlet.xml. {code:xml title=published WSDL} {code} A the SOAP address, here /underquota/doubleit, retrieved from published WSDL is the URL used by my java test code to invoke service operations, I get the following error. {code:java} Caused by: javax.xml.ws.soap.SOAPFaultException: URI is not absolute at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156) at $Proxy27.doubleIt(Unknown Source) {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira