users@jax-rpc.java.net

Re: Document-Literal Service

From: Arun Gupta <arun.gupta_at_sun.com>
Date: Thu, 07 Aug 2003 23:50:31 -0700

Here are the steps you can follow ...

1). Code your Java service endpoint interface and implementation
2). Give the command to generate your model file ...

wscompile -define -f:documentliteral -model model.gz CONFIG_FILE.xml

This will generate the document/literal WSDL for your preview. If you
want your WSDL to look different, then you may decide to choose a
different set of options or modify your service endpoint interface and
implementation.
3). Generate a raw war file (as in the case of starting from a WSDL)
consisting of service endpoint interface, implementation, deployment
descriptor (jaxrpc-ri.xml) and model file
4). Make sure add the model attribute to the endpoint in the
jaxrpc-ri.xml in the war file. In your case it may look like ...

<endpoint
         name="Hello"
         displayName="Hello Service"
         description="A simple web service"
         interface="YOUR_SERVICE_ENDPOINT_INTERFACE"
         implementation="YOUR_SERVICE_ENDPOINT_IMPLEMENTATION"
         model="/WEB-INF/model.gz"/>


assuming that you store the model.gz in WEB-INF directory the raw war file.
5). Feed this raw war file to wsdeploy as
wsdeploy .sh -o COOKED_WAR_FILE.war RAW_WAR_FILE.war

This COOKED_WAR_FILE.war is deployable in Tomcat container bundled with
JWSDP. Your WSDL (as generated for preview earlier) will be available to
you by appending ?WSDL to your endpoint address.

Hope that helps clarify the confusion.

Regards,
-Arun


Sam D wrote:

>This is all so confusing.
>
>What I want to do is this.
>Start with Java code and deploy a document/literal service.
>
>Can someone please outline the steps and ant tasks I need ?
>
>Thanks
>=sam
>
>
>
>Doug Kohlert wrote:
>
>
>
>>Sam,
>>First use wscompile with the -f:documentliteral option together
>>with the -model option to create a model file. You then can
>>add the model to your war file that you pass to wsdeploy and
>>all should work. Make sure to add the model attribute to the
>>endpoint in the jaxrpc-ri.xml in the war file. Here is a
>>sample endpoint.
>>
>> <endpoint
>> name="Hello"
>> displayName="Hello Service"
>> description="A simple web service"
>> interface="stub_tie_generator_test.Hello"
>> implementation="stub_tie_generator_test.HelloImpl"
>> model="/WEB-INF/model.gz"/>
>>
>>Sam D wrote:
>>
>>
>>>Hi.
>>>
>>>How do I do this in JWSDP 1.2 ? There seems to be no option in wsdeploy to
>>>
>>>tell it how to do it.
>>>
>>>( I start with Java code, deploy service and generate WSDL)
>>>
>>>Thanks
>>>
>>>
>>>
>>>
>>>Doug Kohlert wrote:
>>>
>>>
>>>
>>>
>>>>Samuel,
>>>>The JWSDP 1.1 does not generate document-literal or rpc-literal WSDLS.
>>>>However, JWSDP 1.2 generates both.
>>>>
>>>>Samuel D Jackson wrote:
>>>>
>>>>
>>>>
>>>>>Does the JWSDP 1.1 generate WSDL files that are document-literal ?
>>>>>Does the JWSDP 1.2 do that ?
>>>>>
>>>>>Thanks
>>>>>=samuel
>>>>>
>>>>>
>>>>--
>>>>Doug Kohlert
>>>>Java Software Division
>>>>Sun Microsystems, Inc.
>>>>phone: 503 345-9806
>>>>
>>>>
>>--
>>Doug Kohlert
>>Java Software Division
>>Sun Microsystems, Inc.
>>phone: 503 345-9806
>>
>>