Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 49781 invoked from network); 26 Feb 2009 10:25:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2009 10:25:15 -0000 Received: (qmail 80129 invoked by uid 500); 26 Feb 2009 10:25:07 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 80090 invoked by uid 500); 26 Feb 2009 10:25:07 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 80081 invoked by uid 99); 26 Feb 2009 10:25:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 02:25:07 -0800 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=SPF_PASS,URIBL_JP_SURBL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.200.115] (HELO web30502.mail.mud.yahoo.com) (68.142.200.115) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 26 Feb 2009 10:24:58 +0000 Received: (qmail 23071 invoked by uid 60001); 26 Feb 2009 10:24:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=hv7jJFVkCM5DtcDrw1vxu3upmnpgbC+H4zlqlDXW6fy3Jexknhx7I99o34tRMBsRxr446fy6x1RcUy/gn9BdWk3KjeDAy9gqDdTj14Ll3wcFjS0WQdNPY1F9nR6uM0RYPN7qdhwVPehpQlB3rMB/gVDawpzYtXCZ5NK1XokRa3M=; X-YMail-OSG: 8zXc.V8VM1kwywCjYCUBeB0_pFmcpM63FcVPU7hOY8dQ.RNkYIiUR1Ut.13lvxNBOhB2hdbvkFWhoeYCaWQmNrEbOkvLf.pbrZP8JH3rqpnGube48UTvcRf7l3NJE.231XSeSMVVe1uBmk6JR0axdxfxx8je0zcdkULDN1J.mdL2tqr9k4kGYeu95t0IyVmhamIt_rR7kM48.VO11JLFZ9MjghykFPmZcl6ltoY- Received: from [59.93.70.158] by web30502.mail.mud.yahoo.com via HTTP; Thu, 26 Feb 2009 02:24:37 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Thu, 26 Feb 2009 02:24:37 -0800 (PST) From: sharath reddy Reply-To: sharathreddy@yahoo.com Subject: Issue with Provider-based Jax-ws service and Wsdl To: axis-user@ws.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <538526.21689.qm@web30502.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm having trouble trying to deploy a Provider-based web service: @WebServiceProvider( portName="SamplePort", serviceName="SampleProvider", targetNamespace="http://sample.org", wsdlLocation="META-INF/provider.wsdl" ) @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @ServiceMode(value=javax.xml.ws.Service.Mode.PAYLOAD) public class SampleProvider implements Provider{ ... I have provided a WSDL file at the location indicated above (WsdlLocation). When I query the service with the '?wsdl' parameter, I want to see the WSDL above, and NOT generate the WSDL from the annotated class. In any case, we can't generate a WSDL from a Provider class since the class does not contain port type and operation information. In order to do so, I had to make the following 2 changes: 1. In order to display the user-provided WSLD, I had to hack this method in AxisService to always return TRUE, since I am not using services.xml file, need to come up with a way to handle this for JAX-WS services. /** * User can set a parameter in services.xml saying he want to show the * original wsdl that he put into META-INF once someone ask for ?wsdl so if * you want to use your own wsdl then add following parameter into * services.xml true */ public boolean isUseUserWSDL() { System.out.println("isUseUserWSDL: returning true"); return true; /*Parameter parameter = getParameter("useOriginalwsdl"); if (parameter != null) { String value = (String) parameter.getValue(); if ("true".equals(value)) { return true; } } return false;*/ } 2. If accessing user-defined WSDL, the run-time tries to retrieve the WSDL from an Axis parameter called WSDLConstants.WSDL_4_J_DEFINITION. Since this parameter is not being populated for JAx-WS services, I had to modify the code to stuff it in there. Currently, its a bit of a hack: In DescriptionFactory.createAxisService() : ServiceDescriptionImpl serviceDescriptionImpl = (ServiceDescriptionImpl) serviceDescription; Definition definition = serviceDescriptionImpl.getWSDLDefinition(); if (definition != null) axisService.addParameter(WSDLConstants.WSDL_4_J_DEFINITION, definition); Is there anything I am doing wrong? Are there any working examples of using Provider-type web services in Axis2? Regards, Sharath