You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Dimuthu Leelarathne <mu...@opensource.lk> on 2003/11/17 11:22:00 UTC

Returning results from a doc\literal service

hi all,

I have a document literal question. This is about returning results from a
document literal service.

Case 1 :: Imagine we have a doc\lit service that returns a complex type.
For example

  public Order getItemCount(Invoice inv){ }

Shold the response SOAP body look like below.

<soapenv:Body>
<ResultGetItemCount>
<order ........>
............
..............
</order>
</ResultGetItemCount>
</soapenv:Body>

What should be the root element ???? Is it correct to get the
<ResultGetItemCount> as the root element ????


Case 2 :: If doc\lit service returns a simple type what should be the root
element ???

public int getItemCount(Invoice inv){ }

Shold the response SOAP body look like below.

<soapenv:Body>
<ResultGetItemCount>
 <itemCount>23</itemCount>
</ResultGetItemCount>
</soapenv:Body>

What should be the root element of this type ???

I am really thankful for any comments/ or pointers to a document that I
can find answers.

Thank you,
Dimuthu.

-- 
Lanka Software Foundation - Proud to be a part of it.
http://www.opensource.lk





RE: Returning results from a doc\literal service

Posted by Ias <ia...@apache-korea.org>.
> hi all,
> 
> I have a document literal question. This is about returning 
> results from a document literal service.

First of all, a response message is totally up to its WSDL definition. You
can't judge whether a response SOAP message is correct or not with only a
method signature regarding doc/literal style. (rpc/literal may allow that
though.)

> 
> Case 1 :: Imagine we have a doc\lit service that returns a 
> complex type.
> For example
> 
>   public Order getItemCount(Invoice inv){ }
> 
> Shold the response SOAP body look like below.
> 
> <soapenv:Body>
> <ResultGetItemCount>
> <order ........>
> ............
> ..............
> </order>
> </ResultGetItemCount>
> </soapenv:Body>
> 
> What should be the root element ???? Is it correct to get the 
> <ResultGetItemCount> as the root element ????
> 
> 
> Case 2 :: If doc\lit service returns a simple type what 
> should be the root element ???
> 
> public int getItemCount(Invoice inv){ }
> 
> Shold the response SOAP body look like below.
> 
> <soapenv:Body>
> <ResultGetItemCount>
>  <itemCount>23</itemCount>
> </ResultGetItemCount>
> </soapenv:Body>
> 
> What should be the root element of this type ???
> 
> I am really thankful for any comments/ or pointers to a 
> document that I can find answers.
> 

You may be confused with rpc/literal and doc/literal, and even wrapper style
in JAX-RPC. I think WS-I Basic Profile can show you more clarity on those
concepts and usages. See
http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.htm , in
particular, rpc/literal's wrapper elment and differences between rpc and
doc. 

Best wishes,

Ias


> Thank you,
> Dimuthu.
> 
> --
> Lanka Software Foundation - Proud to be a part of it.
> http://www.opensource.lk
> 
> 
>