-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roy, Lahiru,
Here's where i have gotten so far...I got a jaxws service (Calculator) and a jaxws provider (StringProvider) working under the PojoDeployer. Here are the steps: 1. Run "mvn -Dtest=false clean -Dtarget install" 2. Unzip the axis2-SNAPSHOT-war.zip in modules\distribution\target to tomcat\webapps\axis2 3. Copy jaxws-api.jar jaxws-rt.jar jaxws-tools.jar (Latest RI) into axis2\WEB-INF\lib 4. Edit axis2.xml's PojoDeployer ~ <deployer extension=".jar" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/> 5. Drop the xsd and wsdl's into axis2\WEB-INF\wsdl 6. compile the 2 java files and jar it up and place it under axis2\WEB-INF\pojo\myPojo.jar Please try it out and let me know if you see issues. They should serve up the correct wsdl (picked up from the WEB-INF\wsdl directory) and they should handle requests properly. Oh! for now, copy the myPojo.jar into WEB-INF/lib as well as otherwise the wsgen wont' find it (am working on it!) thanks, dims Roy Wood wrote: | Hi Lahiru, | | Yes, we are considering doing this as well. The POJODeployer is a simple | somewhat "clean" way of deploying simple web services as .classes or .jars. | Trying to add functionality for deploying .wars (or expanded .wars) would | convolute its initial intent. So, our first thoughts are to build a new | deployer (JAXWSDeployer or WebAppDeployer) that deploys .wars (or possible | expanded .wars). It would be similar to POJODeployer but would also address | the following problems: | | - Ability to process @WebServiceProvider annotations | | - Utilize the new 'wsgen' capabilities that Dims just added | | - Ability to possibly handle a custom deployment descriptor..still | under discussion as this may | not be necessary | | - Other problems with annotation processing/validation that we haven't | discovered yet | | | | Lahiru Sandakith Gallege wrote: |> Hi Dims, |> I am thinking of not extending the pojo deployer on this regard. Since the |> forward set of deployable service artifact of the sun TCK are in the form |> of |> war files and seems we are not allowed it to change them as we want. We |> have |> to get our deployment mechanism to get them sorted out. How about using |> our |> axis2 webapp and then have an extension to the deployment from plugable |> component as TCK suit and made the sun specific wars deployable and we can |> have the services up on Axis2. Actually we can make this deployment |> extension as JAXWS Deployer in JAXWS module. This was my idea rather than |> going for the POJO Deployer on this. Thoughts ? |> |> Thanks |> Lahiru Sandakith |> |> On Feb 5, 2008 4:16 AM, Davanum Srinivas <[EMAIL PROTECTED]> wrote: |> | Deepal, Sandakith, | | Right now we pick up just a few of the annotations from a java class. | Namely the ones in | org.apache.axis2.description.java2wsdlAnnotationConstants. I believe we | need to take into account *all* possible | annotations in the spec to pass the TCK. | | ~ String WEB_SERVICE = "javax.jws.WebService"; | ~ String WEB_METHOD = "javax.jws.WebMethod"; | ~ String WEB_PARAM = "javax.jws.WebParam"; | ~ String WEB_RESULT = "javax.jws.WebResult"; | ~ String TARGETNAMESPACE = "targetNamespace"; | ~ String NAME = "name"; | ~ String SERVICE_NAME = "serviceName"; | ~ String EXCLUDE = "exclude"; | ~ String ACTION = "action"; | ~ String WSDL_LOCATION = "wsdlLocation"; | ~ String OPERATION_NAME ="operationName"; | | One option that was taken by the Geronimo team was to use the JAXWS RI's | wsgen tool programatically. We should probably | start looking at the same as well. | | We need to figure out how to support user specified WSDL's as well in the | PojoDeployer..Thoughts? | | thanks, | dims |>> - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] |>> |>> |> |> -- |> Thanks |> Lahiru Sandakith |> |> http://sandakith.wordpress.com/ |> GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F |> |> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) iD8DBQFHq1VEgNg6eWEDv1kRAl9eAJ93fzKYhNLNwsAp3c8kHsyfl/N2UQCgygNn KtWs1YuqFa84blNPXG/ia2Q= =/YsK -----END PGP SIGNATURE-----
CalculatorService.wsdl
Description: XML document
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" targetNamespace="http://techtip.com/jaxws/sample" xmlns:tns="http://techtip.com/jaxws/sample" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="addx" type="tns:addx"/> <xs:element name="addxResponse" type="tns:addxResponse"/> <xs:complexType name="addx"> <xs:sequence> <xs:element name="arg0" type="xs:int"/> <xs:element name="arg1" type="xs:int"/> </xs:sequence> </xs:complexType> <xs:complexType name="addxResponse"> <xs:sequence> <xs:element name="return" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:schema>
echostring.wsdl
Description: XML document
package endpoint;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService(
name="Calculator",
serviceName="CalculatorService",
targetNamespace="http://techtip.com/jaxws/sample",
wsdlLocation="WEB-INF/wsdl/CalculatorService.wsdl"
)
public class Calculator {
public Calculator() {}
@WebMethod(operationName="addx", action="urn:Add")
public int add(int i, int j) {
int k = i +j ;
System.out.println(i + "+" + j +" = " + k);
return k;
}
}package endpoint; import javax.xml.ws.Provider; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceProvider; @WebServiceProvider(targetNamespace="http://stringprovider.sample.test.org", wsdlLocation="WEB-INF/wsdl/echoString.wsdl") public class StringProvider implements Provider<String> { public String invoke(String text) { return text; } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
