You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Philipp Leitner <ph...@gmx.at> on 2007/04/22 20:51:09 UTC

Axis2 doc/wrapped service with many params

Hi all,

I just did a few experiements with an Axis2 service that I deployed. I 
am using the doc/wrapped style, and have an operation that looks 
something like this (in Java notation):

<snip>

public String concatSomeStuff(String param1, String param2, String 
param3, int param4);

</snip>

The operation will just concatenate the parameters and return them as 
String.

Now I discovered that a SOAP request like this

<concatSomeStuff>
<param3>14</param3>
<param2>Sperrgasse </param2>
<param0>Philipp Leitner </param0>
<param1>111</param1>
</concatSomeStuff>

bears a different result then a request like

<concatSomeStuff>
<param2>Sperrgasse </param2>
<param3>14</param3>
<param1>111</param1>
<param0>Philipp Leitner </param0>
</concatSomeStuff>

(note the different order of the parameters).

Meanwhile, the actual /name/ of the parameters does not seem to matter. 
A request like

<concatSomeStuff>
<a>Sperrgasse </a>
<b>14</b>
<c>111</c>
<d>Philipp Leitner </d>
</concatSomeStuff>

still works.

Is this really how Axis2 (or doc-style SOAP in general) is supposed to 
work? The order of the parameters is important, while the name is not 
important? For some reason I always figured it should be the other way 
'round.

Can somebody shed some light on this issue?

/philipp

-- 
Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
0225511
Vienna University of Technology

"They say a barking grad never writes."

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


Re: Re: Confused...

Posted by Davanum Srinivas <da...@gmail.com>.
did you try the "-g" option in WSDL2Java?

On 5/30/07, dkraus@microstrategy.com <dk...@microstrategy.com> wrote:
> I have recently used Axis2 1.2 wsdl2java to process some Dotnet specific WSDL to produce the necessary service classes to demonstrate polymorphism.
>
> For example, in that WSDL, there is a base class (BaseRetObject), and a sub class (SubRetObject) which extends BaseRetObject.
>
> <s:complexType name="BaseRetObject">
>   <s:sequence>
>     <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" type="s:string" />
>     <s:element minOccurs="1" maxOccurs="1" name="baseRetInt" type="s:int" />
>   </s:sequence>
> </s:complexType>
> <s:complexType name="SubRetObject">
>   <s:complexContent mixed="false">
>     <s:extension base="tns:BaseRetObject">
>       <s:sequence>
>         <s:element minOccurs="0" maxOccurs="1" name="subRetStr" type="s:string" />
>       </s:sequence>
>     </s:extension>
>   </s:complexContent>
> </s:complexType>
>
> There is a webmethod which simply returns the BaseRetObject. The (Java) service code creates a SubRetObject and returns it as a BaseRetObject. The (DotNet) client receives the BaseRetObject, checks to see its type (using C# "is" operator) and successfully casts it. TcpTrace shows that the return object is serialized as a SubRetObject so that all data is included.
>
> The real problem that I am running into is that wsdl2java will not produce the necessary objects for SubRetObject unless it is used in a webmethod interface. Simply adding the SubRetObject definition to the WSDL does not influence wsdl2java to produce the associated classes. I had to add a webmethod stub that contained references to the subclass (SubRetObject) before wsdl2java was able to produce the correct service objects. Is there someway to generate objects for classes not included in a webmethod interface? I ran into the same problem in DotNet.
>
>  thanks, Dave
>
> --
> This message was sent on behalf of dkraus@microstrategy.com at openSubscriber.com
> http://www.opensubscriber.com/message/axis-user@ws.apache.org/6553779.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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


RE: Re: Confused...

Posted by "Kraus, David" <dk...@MicroStrategy.com>.
Martin,

I am not exactly sure what you are asking, and whether this is a general
WSDL question, or a question pertaining to the implementation of
polymorphism.

You use the term "entity". Are you talking about attributes of the
element WSDL tag? We typically see the attributes minoccurs and
maxoccurs also included in the element tag.

I have included the WSDL to my test service which I have used to
demonstrate polymorphism. The service has one webmethod:

BaseRetObject MorphThis(BaseParmObject inPoly);

I have conducted experiments which have a client create a SubParmObject
(extends BaseParmObject) and pass it in to the MorphThis method. The
service takes the data and stuffs it in a SubRetObject (extends
BaseRetObject) before returning it to the client.

Thanks, Dave

=====wsdl below========

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://tempuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
      <s:element name="MorphThis">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="inPoly"
type="tns:BaseParmObject" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="BaseParmObject">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="baseParmStr"
type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="baseParmInt"
type="s:int" />
        </s:sequence>
      </s:complexType>
      <s:element name="MorphThisResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1"
name="MorphThisResult" type="tns:BaseRetObject" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="BaseRetObject">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="baseRetStr"
type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="baseRetInt"
type="s:int" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="SubParmObject">
        <s:complexContent mixed="false">
          <s:extension base="tns:BaseParmObject">
            <s:sequence>
              <s:element minOccurs="0" maxOccurs="1" name="subParmStr"
type="s:string" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name="SubRetObject">
        <s:complexContent mixed="false">
          <s:extension base="tns:BaseRetObject">
            <s:sequence>
              <s:element minOccurs="0" maxOccurs="1" name="subRetStr"
type="s:string" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name="SubParm2Object">
        <s:complexContent mixed="false">
          <s:extension base="tns:BaseParmObject">
            <s:sequence>
              <s:element minOccurs="1" maxOccurs="1" name="subParmInt"
type="s:int" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name="SubRet2Object">
        <s:complexContent mixed="false">
          <s:extension base="tns:BaseRetObject">
            <s:sequence>
              <s:element minOccurs="1" maxOccurs="1" name="subRetInt"
type="s:int" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="MorphThisSoapIn">
    <wsdl:part name="parameters" element="tns:MorphThis" />
  </wsdl:message>
  <wsdl:message name="MorphThisSoapOut">
    <wsdl:part name="parameters" element="tns:MorphThisResponse" />
  </wsdl:message>
  <wsdl:portType name="PolyServiceSoap">
    <wsdl:operation name="MorphThis">
      <wsdl:input message="tns:MorphThisSoapIn" />
      <wsdl:output message="tns:MorphThisSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="PolyServiceSoap" type="tns:PolyServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="MorphThis">
      <soap:operation soapAction="http://tempuri.org/MorphThis"
style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="PolyService">
    <wsdl:port name="PolyServiceSoap" binding="tns:PolyServiceSoap">
      <soap:address
location="http://localhost:8080/PolyTest/services/PolyService" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
======end wsdl=========

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Wednesday, May 30, 2007 7:09 PM
To: Kraus, David
Cc: axis-user@ws.apache.org
Subject: Re: Re: Confused...

Good Evening Dave

looking quickly at the WSDL A defined service has 1+ Binding/Port 
combination for each location
e.g.
<wsdl:service name="StockQuoteService">
<wsdl:port name="StockQuoteServiceSOAP11port" 
binding="axis2:StockQuoteServiceSOAP11Binding">
<soap:address 
location="http://localhost:8080/axis2/services/StockQuoteService" />
</wsdl:port>

so looking at the example of binding of StockService which has 
binding="axis2:StockQuoteServiceSOAP11Binding"
(as we have been shown binding StockQuoteServiceSOAP11Binding has 1
PortType 
called 'StockQuoteServiceSOAP11port')

PortType has input and output messages
<wsdl:portType name="StockQuoteServicePortType">
<wsdl:operation name="getPrice">

<wsdl:input message="axis2:getPriceMessage" />
<wsdl:output message="axis2:getPriceResponseMessage" />

</wsdl:operation>

The inputMessage getPriceMessage has a definition which contains one or
more 
part names
<wsdl:message name="getPriceMessage">
<wsdl:part name="part1" element="ns:getPrice" />
</wsdl:message>

the localpart element getPrice has the message getPrice which is a 
complexType defined of even more elements
<xs:element name="getPrice">
<xs:complexType>
<xs:sequence>
<xs:element name="symbol" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>

Any other entities which getPrice does not need (other than symbol) is 
extraneous to the run characteristics of the operation and are not 
identified or carried by the message
Are you envisioning a need to carry any other entity?..if so how should
the 
message identify these characteristics ?

Thanks,
Martin--
This email message and any files transmitted with it contain
confidential
information intended only for the person(s) to whom this email message
is
addressed.  If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: <dk...@microstrategy.com>
To: <ax...@ws.apache.org>
Sent: Wednesday, May 30, 2007 2:02 PM
Subject: Re: Re: Confused...


>I have recently used Axis2 1.2 wsdl2java to process some Dotnet
specific 
>WSDL to produce the necessary service classes to demonstrate
polymorphism.
>
> For example, in that WSDL, there is a base class (BaseRetObject), and
a 
> sub class (SubRetObject) which extends BaseRetObject.
>
> <s:complexType name="BaseRetObject">
>  <s:sequence>
>    <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" 
> type="s:string" />
>    <s:element minOccurs="1" maxOccurs="1" name="baseRetInt"
type="s:int" 
> />
>  </s:sequence>
> </s:complexType>
> <s:complexType name="SubRetObject">
>  <s:complexContent mixed="false">
>    <s:extension base="tns:BaseRetObject">
>      <s:sequence>
>        <s:element minOccurs="0" maxOccurs="1" name="subRetStr" 
> type="s:string" />
>      </s:sequence>
>    </s:extension>
>  </s:complexContent>
> </s:complexType>
>
> There is a webmethod which simply returns the BaseRetObject. The
(Java) 
> service code creates a SubRetObject and returns it as a BaseRetObject.
The 
> (DotNet) client receives the BaseRetObject, checks to see its type
(using 
> C# "is" operator) and successfully casts it. TcpTrace shows that the 
> return object is serialized as a SubRetObject so that all data is 
> included.
>
> The real problem that I am running into is that wsdl2java will not
produce 
> the necessary objects for SubRetObject unless it is used in a
webmethod 
> interface. Simply adding the SubRetObject definition to the WSDL does
not 
> influence wsdl2java to produce the associated classes. I had to add a 
> webmethod stub that contained references to the subclass
(SubRetObject) 
> before wsdl2java was able to produce the correct service objects. Is
there 
> someway to generate objects for classes not included in a webmethod 
> interface? I ran into the same problem in DotNet.
>
> thanks, Dave
>
> --
> This message was sent on behalf of dkraus@microstrategy.com at 
> openSubscriber.com
>
http://www.opensubscriber.com/message/axis-user@ws.apache.org/6553779.ht
ml
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> 

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


Re: Re: Confused...

Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening Dave

looking quickly at the WSDL A defined service has 1+ Binding/Port 
combination for each location
e.g.
<wsdl:service name="StockQuoteService">
<wsdl:port name="StockQuoteServiceSOAP11port" 
binding="axis2:StockQuoteServiceSOAP11Binding">
<soap:address 
location="http://localhost:8080/axis2/services/StockQuoteService" />
</wsdl:port>

so looking at the example of binding of StockService which has 
binding="axis2:StockQuoteServiceSOAP11Binding"
(as we have been shown binding StockQuoteServiceSOAP11Binding has 1 PortType 
called 'StockQuoteServiceSOAP11port')

PortType has input and output messages
<wsdl:portType name="StockQuoteServicePortType">
<wsdl:operation name="getPrice">

<wsdl:input message="axis2:getPriceMessage" />
<wsdl:output message="axis2:getPriceResponseMessage" />

</wsdl:operation>

The inputMessage getPriceMessage has a definition which contains one or more 
part names
<wsdl:message name="getPriceMessage">
<wsdl:part name="part1" element="ns:getPrice" />
</wsdl:message>

the localpart element getPrice has the message getPrice which is a 
complexType defined of even more elements
<xs:element name="getPrice">
<xs:complexType>
<xs:sequence>
<xs:element name="symbol" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>

Any other entities which getPrice does not need (other than symbol) is 
extraneous to the run characteristics of the operation and are not 
identified or carried by the message
Are you envisioning a need to carry any other entity?..if so how should the 
message identify these characteristics ?

Thanks,
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: <dk...@microstrategy.com>
To: <ax...@ws.apache.org>
Sent: Wednesday, May 30, 2007 2:02 PM
Subject: Re: Re: Confused...


>I have recently used Axis2 1.2 wsdl2java to process some Dotnet specific 
>WSDL to produce the necessary service classes to demonstrate polymorphism.
>
> For example, in that WSDL, there is a base class (BaseRetObject), and a 
> sub class (SubRetObject) which extends BaseRetObject.
>
> <s:complexType name="BaseRetObject">
>  <s:sequence>
>    <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" 
> type="s:string" />
>    <s:element minOccurs="1" maxOccurs="1" name="baseRetInt" type="s:int" 
> />
>  </s:sequence>
> </s:complexType>
> <s:complexType name="SubRetObject">
>  <s:complexContent mixed="false">
>    <s:extension base="tns:BaseRetObject">
>      <s:sequence>
>        <s:element minOccurs="0" maxOccurs="1" name="subRetStr" 
> type="s:string" />
>      </s:sequence>
>    </s:extension>
>  </s:complexContent>
> </s:complexType>
>
> There is a webmethod which simply returns the BaseRetObject. The (Java) 
> service code creates a SubRetObject and returns it as a BaseRetObject. The 
> (DotNet) client receives the BaseRetObject, checks to see its type (using 
> C# "is" operator) and successfully casts it. TcpTrace shows that the 
> return object is serialized as a SubRetObject so that all data is 
> included.
>
> The real problem that I am running into is that wsdl2java will not produce 
> the necessary objects for SubRetObject unless it is used in a webmethod 
> interface. Simply adding the SubRetObject definition to the WSDL does not 
> influence wsdl2java to produce the associated classes. I had to add a 
> webmethod stub that contained references to the subclass (SubRetObject) 
> before wsdl2java was able to produce the correct service objects. Is there 
> someway to generate objects for classes not included in a webmethod 
> interface? I ran into the same problem in DotNet.
>
> thanks, Dave
>
> --
> This message was sent on behalf of dkraus@microstrategy.com at 
> openSubscriber.com
> http://www.opensubscriber.com/message/axis-user@ws.apache.org/6553779.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> 


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


Re: Re: Confused...

Posted by dk...@microstrategy.com.
I have recently used Axis2 1.2 wsdl2java to process some Dotnet specific WSDL to produce the necessary service classes to demonstrate polymorphism.

For example, in that WSDL, there is a base class (BaseRetObject), and a sub class (SubRetObject) which extends BaseRetObject.

<s:complexType name="BaseRetObject">
  <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" type="s:string" />
    <s:element minOccurs="1" maxOccurs="1" name="baseRetInt" type="s:int" />
  </s:sequence>
</s:complexType>
<s:complexType name="SubRetObject">
  <s:complexContent mixed="false">
    <s:extension base="tns:BaseRetObject">
      <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="subRetStr" type="s:string" />
      </s:sequence>
    </s:extension>
  </s:complexContent>
</s:complexType>

There is a webmethod which simply returns the BaseRetObject. The (Java) service code creates a SubRetObject and returns it as a BaseRetObject. The (DotNet) client receives the BaseRetObject, checks to see its type (using C# "is" operator) and successfully casts it. TcpTrace shows that the return object is serialized as a SubRetObject so that all data is included.

The real problem that I am running into is that wsdl2java will not produce the necessary objects for SubRetObject unless it is used in a webmethod interface. Simply adding the SubRetObject definition to the WSDL does not influence wsdl2java to produce the associated classes. I had to add a webmethod stub that contained references to the subclass (SubRetObject) before wsdl2java was able to produce the correct service objects. Is there someway to generate objects for classes not included in a webmethod interface? I ran into the same problem in DotNet.

 thanks, Dave

--
This message was sent on behalf of dkraus@microstrategy.com at openSubscriber.com
http://www.opensubscriber.com/message/axis-user@ws.apache.org/6553779.html

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


Re: Confused...

Posted by Davanum Srinivas <da...@gmail.com>.
Ajay,

Please use latest Axis2 1.2 Release Candidates / Nightly. 1.0 is very
old and definitely does not support polymorphism. If you run into
problems, please log a JIRA.

thanks,
dims

On 4/23/07, Ajay Kumar Gour <aj...@s7solutions.com> wrote:
> Hi Amila,
>
> Few days back, Sathija asked the question about polymorphism support in
> Axis2 for POJO. You guys have replied that POJO service does'nt support
> the polymorphism but ADB client does give full support to polymorphism,
> however, in this "http://ws.apache.org/axis2/1_0/adb/adb-howto.html#deep"
> document it is clearly mentioned that
>
> "ADB is meant to be a 'Simple' databinding framework and was not meant to
> compile all types of
> schemas. The following limitations are the most highlighted.
>
> 1. Complex Extensions and Restrictions, Simple Extensions and Restrictions
> are not supported.
> 2. xsi:type based deserialization is not supported. Hence extension based
> structures that use
> xsi:type attribute may fail."
>
> Iam was trying with some code also. But iam not successful yet.
>
> So, should i consider that ADB does'nt support polymorphism at all?
>
> I have communicated with Dennis on this issue and he suggested me to ask
> you. Awaiting for your response.
>
> Thanks,
> -Ajay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

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


Confused...

Posted by Ajay Kumar Gour <aj...@s7solutions.com>.
Hi Amila,

Few days back, Sathija asked the question about polymorphism support in  
Axis2 for POJO. You guys have replied that POJO service does'nt support  
the polymorphism but ADB client does give full support to polymorphism,  
however, in this "http://ws.apache.org/axis2/1_0/adb/adb-howto.html#deep"  
document it is clearly mentioned that

"ADB is meant to be a 'Simple' databinding framework and was not meant to  
compile all types of
schemas. The following limitations are the most highlighted.

1. Complex Extensions and Restrictions, Simple Extensions and Restrictions  
are not supported.
2. xsi:type based deserialization is not supported. Hence extension based  
structures that use
xsi:type attribute may fail."

Iam was trying with some code also. But iam not successful yet.

So, should i consider that ADB does'nt support polymorphism at all?

I have communicated with Dennis on this issue and he suggested me to ask  
you. Awaiting for your response.

Thanks,
-Ajay

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


Re: Axis2 doc/wrapped service with many params

Posted by Philipp Leitner <ph...@gmx.at>.
Yes, I used the POJO approach to create my test service. Anyway, the 
client that I am currently writing should be able to communicate with 
all kinds of doc/wrapped services (Axis as well as .NET, etc), so I 
should not rely on any specifics of the Axis2 message receiver anyway.

OK, so in the end I learned that the sequence of parameters matters 
(obviously, if I think about it), and that the parameter names /should/ 
also matter (even if this condition is not checked by all service 
providers).

Dennis, Amila, thanks a lot for your help!

/philipp

Amila Suriarachchi schrieb:
> Philip are you deploying a service using a POJO or creating a service 
> with a wsdl?
> I belive you use the former method. In this case you use the 
> RPCMessageReceiver and it does not care about the parameter names. 
> But if you use the wsdl first approach please log a jira with your wsdl.
> 
> On 4/23/07, *Dennis Sosnoski* <dms@sosnoski.com 
> <ma...@sosnoski.com>> wrote:
> 
>     Hi Philipp,
> 
>     Both the order and the names of the parameters are supposed to matter in
>     wrapped doc/lit, since this uses an <xs:sequence> to compose the
>     parameter elements. With JiBX data binding the names definitely matter,
>     as is also the case with XMLBeans; if ADB doesn't care about the names
>     this seems like a significant error in the ADB code.
> 
>       - Dennis
> 
>     Dennis M. Sosnoski
>     SOA and Web Services in Java
>     Training and Consulting
>     http://www.sosnoski.com - http://www.sosnoski.co.nz
>     Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> 
>     Philipp Leitner wrote:
>      > Hi all,
>      >
>      > I just did a few experiements with an Axis2 service that I
>     deployed. I
>      > am using the doc/wrapped style, and have an operation that looks
>      > something like this (in Java notation):
>      >
>      > <snip>
>      >
>      > public String concatSomeStuff(String param1, String param2, String
>      > param3, int param4);
>      >
>      > </snip>
>      >
>      > The operation will just concatenate the parameters and return
>     them as
>      > String.
>      >
>      > Now I discovered that a SOAP request like this
>      >
>      > <concatSomeStuff>
>      > <param3>14</param3>
>      > <param2>Sperrgasse </param2>
>      > <param0>Philipp Leitner </param0>
>      > <param1>111</param1>
>      > </concatSomeStuff>
>      >
>      > bears a different result then a request like
>      >
>      > <concatSomeStuff>
>      > <param2>Sperrgasse </param2>
>      > <param3>14</param3>
>      > <param1>111</param1>
>      > <param0>Philipp Leitner </param0>
>      > </concatSomeStuff>
>      >
>      > (note the different order of the parameters).
>      >
>      > Meanwhile, the actual /name/ of the parameters does not seem to
>      > matter. A request like
>      >
>      > <concatSomeStuff>
>      > <a>Sperrgasse </a>
>      > <b>14</b>
>      > <c>111</c>
>      > <d>Philipp Leitner </d>
>      > </concatSomeStuff>
>      >
>      > still works.
>      >
>      > Is this really how Axis2 (or doc-style SOAP in general) is
>     supposed to
>      > work? The order of the parameters is important, while the name is not
>      > important? For some reason I always figured it should be the
>     other way
>      > 'round.
>      >
>      > Can somebody shed some light on this issue?
>      >
>      > /philipp
>      >
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.

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


Re: Axis2 doc/wrapped service with many params

Posted by Amila Suriarachchi <am...@gmail.com>.
Philip are you deploying a service using a POJO or creating a service with a
wsdl?
I belive you use the former method. In this case you use the
RPCMessageReceiver and it does not care about the parameter names.
But if you use the wsdl first approach please log a jira with your wsdl.

On 4/23/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
>
> Hi Philipp,
>
> Both the order and the names of the parameters are supposed to matter in
> wrapped doc/lit, since this uses an <xs:sequence> to compose the
> parameter elements. With JiBX data binding the names definitely matter,
> as is also the case with XMLBeans; if ADB doesn't care about the names
> this seems like a significant error in the ADB code.
>
>   - Dennis
>
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
> Philipp Leitner wrote:
> > Hi all,
> >
> > I just did a few experiements with an Axis2 service that I deployed. I
> > am using the doc/wrapped style, and have an operation that looks
> > something like this (in Java notation):
> >
> > <snip>
> >
> > public String concatSomeStuff(String param1, String param2, String
> > param3, int param4);
> >
> > </snip>
> >
> > The operation will just concatenate the parameters and return them as
> > String.
> >
> > Now I discovered that a SOAP request like this
> >
> > <concatSomeStuff>
> > <param3>14</param3>
> > <param2>Sperrgasse </param2>
> > <param0>Philipp Leitner </param0>
> > <param1>111</param1>
> > </concatSomeStuff>
> >
> > bears a different result then a request like
> >
> > <concatSomeStuff>
> > <param2>Sperrgasse </param2>
> > <param3>14</param3>
> > <param1>111</param1>
> > <param0>Philipp Leitner </param0>
> > </concatSomeStuff>
> >
> > (note the different order of the parameters).
> >
> > Meanwhile, the actual /name/ of the parameters does not seem to
> > matter. A request like
> >
> > <concatSomeStuff>
> > <a>Sperrgasse </a>
> > <b>14</b>
> > <c>111</c>
> > <d>Philipp Leitner </d>
> > </concatSomeStuff>
> >
> > still works.
> >
> > Is this really how Axis2 (or doc-style SOAP in general) is supposed to
> > work? The order of the parameters is important, while the name is not
> > important? For some reason I always figured it should be the other way
> > 'round.
> >
> > Can somebody shed some light on this issue?
> >
> > /philipp
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Axis2 doc/wrapped service with many params

Posted by Philipp Leitner <ph...@gmx.at>.
This is not doc/wrapped anymore if I do it like this :-/ this is more 
like rpc/encoded .

/philipp

Martin Gainty schrieb:
> Good Evening Phillip-
> try this in your wsdl..
> 
> <message name="sampleMessage"
> <part name="first" type="xsd:string">
> <part name="second" type="xsd:string">
> <part name="third" type="xsd:string">
> </message>
> <portTyle name="SomePortName">
> <operation name="someMethod">
>  parameterOrder="first second third"
> ..
> </operation>
> </portType>
> 
> HTH
> Martin--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> ----- Original Message ----- From: "Dennis Sosnoski" <dm...@sosnoski.com>
> To: <ax...@ws.apache.org>
> Sent: Sunday, April 22, 2007 5:43 PM
> Subject: Re: Axis2 doc/wrapped service with many params
> 
> 
>> Hi Philipp,
>>
>> Both the order and the names of the parameters are supposed to matter 
>> in wrapped doc/lit, since this uses an <xs:sequence> to compose the 
>> parameter elements. With JiBX data binding the names definitely 
>> matter, as is also the case with XMLBeans; if ADB doesn't care about 
>> the names this seems like a significant error in the ADB code.
>>
>>  - Dennis
>>
>> Dennis M. Sosnoski
>> SOA and Web Services in Java
>> Training and Consulting
>> http://www.sosnoski.com - http://www.sosnoski.co.nz
>> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>>
>>
>>
>> Philipp Leitner wrote:
>>> Hi all,
>>>
>>> I just did a few experiements with an Axis2 service that I deployed. 
>>> I am using the doc/wrapped style, and have an operation that looks 
>>> something like this (in Java notation):
>>>
>>> <snip>
>>>
>>> public String concatSomeStuff(String param1, String param2, String 
>>> param3, int param4);
>>>
>>> </snip>
>>>
>>> The operation will just concatenate the parameters and return them as 
>>> String.
>>>
>>> Now I discovered that a SOAP request like this
>>>
>>> <concatSomeStuff>
>>> <param3>14</param3>
>>> <param2>Sperrgasse </param2>
>>> <param0>Philipp Leitner </param0>
>>> <param1>111</param1>
>>> </concatSomeStuff>
>>>
>>> bears a different result then a request like
>>>
>>> <concatSomeStuff>
>>> <param2>Sperrgasse </param2>
>>> <param3>14</param3>
>>> <param1>111</param1>
>>> <param0>Philipp Leitner </param0>
>>> </concatSomeStuff>
>>>
>>> (note the different order of the parameters).
>>>
>>> Meanwhile, the actual /name/ of the parameters does not seem to 
>>> matter. A request like
>>>
>>> <concatSomeStuff>
>>> <a>Sperrgasse </a>
>>> <b>14</b>
>>> <c>111</c>
>>> <d>Philipp Leitner </d>
>>> </concatSomeStuff>
>>>
>>> still works.
>>>
>>> Is this really how Axis2 (or doc-style SOAP in general) is supposed 
>>> to work? The order of the parameters is important, while the name is 
>>> not important? For some reason I always figured it should be the 
>>> other way 'round.
>>>
>>> Can somebody shed some light on this issue?
>>>
>>> /philipp
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

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


Re: Axis2 doc/wrapped service with many params

Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening Phillip-
try this in your wsdl..

<message name="sampleMessage"
 <part name="first" type="xsd:string">
 <part name="second" type="xsd:string">
 <part name="third" type="xsd:string">
</message>
<portTyle name="SomePortName">
 <operation name="someMethod">
  parameterOrder="first second third"
..
</operation>
</portType>

HTH
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Dennis Sosnoski" <dm...@sosnoski.com>
To: <ax...@ws.apache.org>
Sent: Sunday, April 22, 2007 5:43 PM
Subject: Re: Axis2 doc/wrapped service with many params


> Hi Philipp,
> 
> Both the order and the names of the parameters are supposed to matter in 
> wrapped doc/lit, since this uses an <xs:sequence> to compose the 
> parameter elements. With JiBX data binding the names definitely matter, 
> as is also the case with XMLBeans; if ADB doesn't care about the names 
> this seems like a significant error in the ADB code.
> 
>  - Dennis
> 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> 
> Philipp Leitner wrote:
>> Hi all,
>>
>> I just did a few experiements with an Axis2 service that I deployed. I 
>> am using the doc/wrapped style, and have an operation that looks 
>> something like this (in Java notation):
>>
>> <snip>
>>
>> public String concatSomeStuff(String param1, String param2, String 
>> param3, int param4);
>>
>> </snip>
>>
>> The operation will just concatenate the parameters and return them as 
>> String.
>>
>> Now I discovered that a SOAP request like this
>>
>> <concatSomeStuff>
>> <param3>14</param3>
>> <param2>Sperrgasse </param2>
>> <param0>Philipp Leitner </param0>
>> <param1>111</param1>
>> </concatSomeStuff>
>>
>> bears a different result then a request like
>>
>> <concatSomeStuff>
>> <param2>Sperrgasse </param2>
>> <param3>14</param3>
>> <param1>111</param1>
>> <param0>Philipp Leitner </param0>
>> </concatSomeStuff>
>>
>> (note the different order of the parameters).
>>
>> Meanwhile, the actual /name/ of the parameters does not seem to 
>> matter. A request like
>>
>> <concatSomeStuff>
>> <a>Sperrgasse </a>
>> <b>14</b>
>> <c>111</c>
>> <d>Philipp Leitner </d>
>> </concatSomeStuff>
>>
>> still works.
>>
>> Is this really how Axis2 (or doc-style SOAP in general) is supposed to 
>> work? The order of the parameters is important, while the name is not 
>> important? For some reason I always figured it should be the other way 
>> 'round.
>>
>> Can somebody shed some light on this issue?
>>
>> /philipp
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>

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


Re: Axis2 doc/wrapped service with many params

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Philipp,

Both the order and the names of the parameters are supposed to matter in 
wrapped doc/lit, since this uses an <xs:sequence> to compose the 
parameter elements. With JiBX data binding the names definitely matter, 
as is also the case with XMLBeans; if ADB doesn't care about the names 
this seems like a significant error in the ADB code.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Philipp Leitner wrote:
> Hi all,
>
> I just did a few experiements with an Axis2 service that I deployed. I 
> am using the doc/wrapped style, and have an operation that looks 
> something like this (in Java notation):
>
> <snip>
>
> public String concatSomeStuff(String param1, String param2, String 
> param3, int param4);
>
> </snip>
>
> The operation will just concatenate the parameters and return them as 
> String.
>
> Now I discovered that a SOAP request like this
>
> <concatSomeStuff>
> <param3>14</param3>
> <param2>Sperrgasse </param2>
> <param0>Philipp Leitner </param0>
> <param1>111</param1>
> </concatSomeStuff>
>
> bears a different result then a request like
>
> <concatSomeStuff>
> <param2>Sperrgasse </param2>
> <param3>14</param3>
> <param1>111</param1>
> <param0>Philipp Leitner </param0>
> </concatSomeStuff>
>
> (note the different order of the parameters).
>
> Meanwhile, the actual /name/ of the parameters does not seem to 
> matter. A request like
>
> <concatSomeStuff>
> <a>Sperrgasse </a>
> <b>14</b>
> <c>111</c>
> <d>Philipp Leitner </d>
> </concatSomeStuff>
>
> still works.
>
> Is this really how Axis2 (or doc-style SOAP in general) is supposed to 
> work? The order of the parameters is important, while the name is not 
> important? For some reason I always figured it should be the other way 
> 'round.
>
> Can somebody shed some light on this issue?
>
> /philipp
>

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