axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayan Dhillon" <Narayan.Dhil...@vocalink.com>
Subject RE: Does AXIS2 support document-literal-unwrapped webservice?
Date Thu, 31 Jul 2008 12:41:49 GMT
Thanks for you response Paul. It was very helpful.

I think the way to indicate doc-lit-unwrapped in WSDL, is to have
multiple parts under <message>, which I originally had in my WSDL. But
when I ran wsdl2java, it didn't like it. So I started playing with WSDL,
and thought, -uw option might be the trick.

Anyway, we now know the issue and possible solutions, thanks for you
help.

Regards, Narayan

-----Original Message-----
From: Paul Fremantle [mailto:pzfreo@gmail.com] 
Sent: 31 July 2008 13:03
To: axis-dev@ws.apache.org
Subject: Re: Does AXIS2 support document-literal-unwrapped webservice?

Narayan

Although the core messaging framework in Axis2 might support more than
one body element, none of the code generation or POJO capabilities
does. You are strongly recommended not to do this. The reason it is
called document/literal is that you are meant to have a single
document as the body's child. Even the SOAP spec talks about the
body's child element (not elements).

To answer your other question -uw only affects the stub not the
on-the-wire. After all, to affect the on-the-wire you would need to
change the WSDL and WSDL2Java is trying to create Java that uses a
*given* WSDL.

However, I don't really understand, as your WSDL doesn't correspond to
your SOAP. The WSDL defines a single message element child of the body
element and this is correct. The correct SOAP for that WSDL is pasted
below (as generated by SOAPUI). So in effect you are not having
multiple children of the SOAP Body.

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sch="http://tempuri.org/wsATD/schemas">
   <soapenv:Header/>
   <soapenv:Body>
      <sch:OPN50>
         <sch:ERR_STATUS>
            <!--Optional:-->
            <sch:ERR_CDE>?</sch:ERR_CDE>
            <!--Optional:-->
            <sch:ERR_SUB_CDE>?</sch:ERR_SUB_CDE>
         </sch:ERR_STATUS>
         <sch:USER_DATA>
            <!--Optional:-->
            <sch:LN>?</sch:LN>
            <!--Optional:-->
            <sch:FIID>?</sch:FIID>
            <!--Optional:-->
            <sch:REGN>?</sch:REGN>
            <!--Optional:-->
            <sch:BRCH>?</sch:BRCH>
            <!--Optional:-->
            <sch:USER_GRP>?</sch:USER_GRP>
            <!--Optional:-->
            <sch:USER_NUM>?</sch:USER_NUM>
         </sch:USER_DATA>
      </sch:OPN50>
   </soapenv:Body>
</soapenv:Envelope>

Paul

On Thu, Jul 31, 2008 at 12:23 PM, Narayan Dhillon
<Narayan.Dhillon@vocalink.com> wrote:
> Hi Devs,
>
>
>
> I am trying to use Axis2 1.3 to call a WS which is
> document-literal-unwrapped, i.e. SOAP message BODY should contain
multiple
> children elements as shown below -
>
>
>
> <?xml version='1.0' encoding='UTF-8'?>
>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>
>       <soapenv:Body>
>
>             <ns1:ERR_STATUS
xmlns:ns1="http://tempuri.org/wsATD/schemas">
>
>                <ns1:ERR_CDE>1</ns1:ERR_CDE>
>
>                <ns1:ERR_SUB_CDE>2</ns1:ERR_SUB_CDE>
>
>             </ns1:ERR_STATUS>
>
>             <ns1:USER_DATA>
>
>                <ns1:LN>ln</ns1:LN>
>
>                <ns1:FIID>fiid</ns1:FIID>
>
>                <ns1:REGN>regn</ns1:REGN>
>
>                <ns1:BRCH>brch</ns1:BRCH>
>
>                <ns1:USER_GRP>1</ns1:USER_GRP>
>
>                <ns1:USER_NUM>3</ns1:USER_NUM>
>
>             </ns1:USER_DATA>
>
>       </soapenv:Body>
>
>    </soapenv:Envelope>
>
>
>
> I have scanned through the Axis2 source code and looked at various
receivers
> including org.apache.axis2.receivers.RawXMLINOutMessageReceiver.java
but all
> of them seem to be dealing with first child element of the body
element.
> More org.apache.axis2.client.ServiceClient only seems to support
doc-literal
> wrapped style.
>
>
>
> So my question is -
>
> 1.       Does axis2 support this type of soap messaging (As shown in
example
> above)? I understand WS-I
>
1.1(http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDLMS
GS)
> seems to allow only one Message part but it doesn't clarify about the
format
> of the message on the wire. So it is nice to know what support we have
for
> that in Axis2.
>
> 2.       I tried using wsdl2java for ADB with -uw option, but that
seems to
> only change the stub interface, but actual message on wire still looks
> wrapped. So is -uw option, just to alter stub interface & doesn't have
any
> impact on soap message generated.
>
>
>
>
>
> Regards, Narayan
>
>
>
> Inline Attachments:
>
> WSDL
>
> <definitions name="wsATD"
> targetNamespace="http://tempuri.org/wsATD/definitions"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
>
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>     xmlns:typens="http://tempuri.org/wsATD/schemas"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlns="http://tempuri.org/wsATD/definitions"
>
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>     <types>
>
>         <xsd:schema elementFormDefault="qualified"
> targetNamespace="http://tempuri.org/wsATD/schemas">
>
>
>
>             <xsd:complexType name="ERR_STATUSType">
>
>                 <xsd:sequence>
>
>                     <xsd:element minOccurs="0" name="ERR_CDE"
> type="xsd:short" />
>
>                     <xsd:element minOccurs="0" name="ERR_SUB_CDE"
> type="xsd:short" />
>
>                 </xsd:sequence>
>
>             </xsd:complexType>
>
>             <xsd:complexType name="USER_DATAType">
>
>                 <xsd:sequence>
>
>                     <xsd:element minOccurs="0" name="LN"
type="xsd:string"
> />
>
>                     <xsd:element minOccurs="0" name="FIID"
type="xsd:string"
> />
>
>                     <xsd:element minOccurs="0" name="REGN"
type="xsd:string"
> />
>
>                     <xsd:element minOccurs="0" name="BRCH"
type="xsd:string"
> />
>
>                     <xsd:element minOccurs="0" name="USER_GRP"
> type="xsd:short" />
>
>                     <xsd:element minOccurs="0" name="USER_NUM"
> type="xsd:long" />
>
>                 </xsd:sequence>
>
>             </xsd:complexType>
>
>             <xsd:element name="OPN50">
>
>                 <xsd:complexType>
>
>                     <xsd:sequence>
>
>                         <xsd:element name="ERR_STATUS"
> type="typens:ERR_STATUSType" />
>
>                         <xsd:element name="USER_DATA"
> type="typens:USER_DATAType" />
>
>                     </xsd:sequence>
>
>                 </xsd:complexType>
>
>             </xsd:element>
>
>         </xsd:schema>
>
>     </types>
>
>     <message name="opN50.ReplyMsg">
>
>         <part element="typens:OPN50" name="parameters" />
>
>     </message>
>
>     <message name="opN50.RequestMsg">
>
>         <part element="typens:OPN50" name="parameters" />
>
>     </message>
>
>     <portType name="wsATDPortType">
>
>         <operation name="opN50">
>
>             <input message="wsdlns:opN50.RequestMsg" />
>
>             <output message="wsdlns:opN50.ReplyMsg" />
>
>         </operation>
>
>     </portType>
>
>     <binding name="wsATDBinding" type="wsdlns:wsATDPortType">
>
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>
>         <operation name="opN50">
>
>             <documentation></documentation>
>
>             <soap:operation soapAction="wsATD#opN50" />
>
>             <input>
>
>                 <soap:body use="literal" />
>
>             </input>
>
>             <output>
>
>                 <soap:body use="literal" />
>
>             </output>
>
>         </operation>
>
>     </binding>
>
>     <service name="wsATD">
>
>         <documentation></documentation>
>
>         <port binding="wsdlns:wsATDBinding" name="wsATDPort">
>
>             <soap:address location="http://localhost:8080/soap" />
>
>         </port>
>
>     </service>
>
> </definitions>
>
>
>
> Actual message generated using ADB binding, generated using wsdl2java
with
> -uw option -
>
> <?xml version='1.0' encoding='UTF-8'?>
>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>
>       <soapenv:Body>
>
>          <ns1:OPN50 xmlns:ns1="http://tempuri.org/wsATD/schemas">
>
>             <ns1:ERR_STATUS>
>
>                <ns1:ERR_CDE>1</ns1:ERR_CDE>
>
>                <ns1:ERR_SUB_CDE>2</ns1:ERR_SUB_CDE>
>
>             </ns1:ERR_STATUS>
>
>             <ns1:USER_DATA>
>
>                <ns1:LN>ln</ns1:LN>
>
>                <ns1:FIID>fiid</ns1:FIID>
>
>                <ns1:REGN>regn</ns1:REGN>
>
>                <ns1:BRCH>brch</ns1:BRCH>
>
>                <ns1:USER_GRP>1</ns1:USER_GRP>
>
>                <ns1:USER_NUM>3</ns1:USER_NUM>
>
>             </ns1:USER_DATA>
>
>          </ns1:OPN50>
>
>       </soapenv:Body>
>
>    </soapenv:Envelope>0
>
> *****************************************************
> This email is issued by a VocaLink group company. It is confidential
and
> intended for the exclusive use of the addressee only. You should not
> disclose its contents to any other person. If you are not the
addressee (or
> responsible for delivery of the message to the addressee), please
notify the
> originator immediately by return message and destroy the original
message.
> The contents of this email will have no contractual effect unless it
is
> otherwise agreed between a specific VocaLink group company and the
> recipient.
>
> The VocaLink group companies include, among others: VocaLink Limited
> (Company No 06119048, VAT No. 907 9619 87) which is registered in
England
> and Wales at registered office Drake House, Homestead Road,
Rickmansworth,
> WD3 1FX. United Kingdom, Voca Limited (Company no 1023742, VAT No. 907
9619
> 87) which is registered in England and Wales at registered office
Drake
> House, Three Rivers Court, Homestead Road, Rickmansworth,
Hertfordshire. WD3
> 1FX. United Kingdom, LINK Interchange Network Limited (Company No
3565766,
> VAT No. 907 9619 87) which is registered in England and Wales at
registered
> office Arundel House, 1 Liverpool Gardens, Worthing, West Sussex, BN11
1SL
> and VocaLink Holdings Limited (Company No 06119036, VAT No. 907 9619
87)
> which is registered in England and Wales at registered office Drake
House,
> Homestead Road, Rickmansworth, WD3 1FX. United Kingdom.
>
> The views and opinions expressed in this email may not reflect those
of any
> member of the VocaLink group. This message and any attachments have
been
> scanned for viruses prior to leaving the VocaLink group network;
however,
> VocaLink does not guarantee the security of this message and will not
be
> responsible for any damages arising as a result of any virus being
passed on
> or arising from any alteration of this message by a third party. The
> VocaLink group may monitor emails sent to and from the VocaLink group
> network.
>
> This message has been checked for all email viruses by MessageLabs.
> *************************************************************
>



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


*****************************************************
This email is issued by a VocaLink group company. It is confidential and intended for the
exclusive use of the addressee only. You should not disclose its contents to any other person.
If you are not the addressee (or responsible for delivery of the message to the addressee),
please notify the originator immediately by return message and destroy the original message.
The contents of this email will have no contractual effect unless it is otherwise agreed between
a specific VocaLink group company and the recipient.
 
The VocaLink group companies include, among others: VocaLink Limited (Company No 06119048,
VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House,
Homestead Road, Rickmansworth, WD3 1FX. United Kingdom, Voca Limited (Company no 1023742,
VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House,
Three Rivers Court, Homestead Road, Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom,
LINK Interchange Network Limited (Company No 3565766, VAT No. 907 9619 87) which is registered
in England and Wales at registered office Arundel House, 1 Liverpool Gardens, Worthing, West
Sussex, BN11 1SL and VocaLink Holdings Limited (Company No 06119036, VAT No. 907 9619 87)
which is registered in England and Wales at registered office Drake House, Homestead Road,
Rickmansworth, WD3 1FX. United Kingdom.
 
The views and opinions expressed in this email may not reflect those of any member of the
VocaLink group. This message and any attachments have been scanned for viruses prior to leaving
the VocaLink group network; however, VocaLink does not guarantee the security of this message
and will not be responsible for any damages arising as a result of any virus being passed
on or arising from any alteration of this message by a third party. The VocaLink group may
monitor emails sent to and from the VocaLink group network.
 
This message has been checked for all email viruses by MessageLabs.
*************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message