axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa_abeysin...@yahoo.com>
Subject RE: Axis C++ 1.3 final is released
Date Tue, 09 Nov 2004 13:25:29 GMT
BTW: how often we get services with optional elements in complex types and SOAP streams that
does not have the same sequence of elements defined by WSDL?
 
If the frequency is less then we are better off. Hoever, if this is a very common case, then
we have to give some serious thought on supporting this situation.
 
Samisa...
 
Samisa Abeysinghe <samisa_abeysinghe@yahoo.com> wrote:
I should have said "pull model used by deserializer"
 
Samisa...

Samisa Abeysinghe <samisa_abeysinghe@yahoo.com> wrote:
If this is the case, the I think we are in *serious* trouble. Nither the generated code not
the pull model used by the serializer has the capability of handling elements in a random
order.
 
Even if we get over minOccures problem, with *considerable* effort of course, we will have
to do a comprehenside design around how to handle the "out of expected order" elements appearing
in SOAP stream.
 
Samisa...

adrian.p.smith@bt.com wrote:
If the schema says then yes, the order is expected to be correct, but not if it says 



-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
Sent: 09 November 2004 01:41
To: Apache AXIS C User List
Subject: RE: Axis C++ 1.3 final is released


> All elements in the response have minOccurs="0", so they can be omitted. Is this another
issue?

Good point Adrian! I missed that :(.
This must be the reason that is causing the problem.

To my knowledge, WSDL2Ws tool does not deal with this correctly (I came to this conclusion
by
looking at the generated code for the WSDL). It expects all the elements to be there, and
throws
an error, if at least a single element is missing.
Also, the ordering of the element is very critical for the generated code to work.

e.g.
param->names = (xsd__string_Array&)pIWSDZ->getBasicArray(XSD_STRING, "names",0);
param->addrs = (xsd__string_Array&)pIWSDZ->getBasicArray(XSD_STRING, "addrs",0);
param->xdirInd = pIWSDZ->getElementAsString("xdirInd",0);
param->noOfBillRecords = pIWSDZ->getElementAsInt("noOfBillRecords",0);

(the '0' parameters in above code indicates that namespace is NULL - it must have used NULL
instead of 0)

If "xdirInd" is missing in the response, and "noOfBillRecords" is present,
getElementAsString("xdirInd",0) call on the serializer will see that next element is
"noOfBillRecords" and will error. 
If we are looking for an optional element, we are doing a serious mistake here (and thus this
is a
serious bug)
The correct logic would be to 
1. Test if the element is opetional
if yes
1.1. Test if the current element is what we are looking for
if yes
1.1.1 return Success
if no
1.1.2 Back track to point to the start of the elemnt and return Success
if no
1.2 return Failure

I hope the above algorithm does not violate the pull model we have. 

Additionally, can we expect the SOAP message to have the elements in the same order defined
by the
WSDL? If yes (I think it is) we are OK. If not we have another bug :(

Thanks,
Samisa...


--- adrian.p.smith@bt.com wrote:

> All elements in the response have minOccurs="0", so they can be omitted. Is this another
issue?
> 
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> Sent: 08 November 2004 11:35
> To: Apache AXIS C User List
> Subject: RE: Axis C++ 1.3 final is released
> 
> 
> I have the WSDL sent by you some time back and I am using that to generate code.
> I see that the generated code is expecting an element named "xdirInd" in the response
and the
> response has no such element. (None of the elements in the WSDL has nillable="true".
Hence I
> guess
> all elements must appear in that order)
> 
> Additionally, the generated code expects to see "bdgtAcctPymts" after "acctEntrys" elements,
but
> the reasponse has "tar" following "acctEntrys" and thus the generated code fails.
> 
> Have there been changes done to the WSDL lately? If so, could you please send the new
WSDL?
> Thanks,
> Samisa...
> 
> --- adrian.p.smith@bt.com wrote:
> 
> > Sorry, I use YATT over a VPN to capture the response and it's a bit flakey!
> > 
> > Here is one taken from our mid-tier server log file: 
> > 
> > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tns="http://www.bt.com/css/mmbi/2002/06/types"
> > xmlns:ns1="http://www.bt.com/css/mmbi/WS021A/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">> >
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
PCK002069bt.com
> > SS01 ND1234567890200107190000223344dyemw01
> >
>
im011111
AdrianWS021AgetCustomerProfile2020/07/04V4.006CSS
> >
>
R83CMadrianOK1123012700010120856148911230127052BODMINTXDY57NON3CCNOYN> > xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[]">MISS C
> > ACACIA> SOAP-ENC:arrayType="xsd:string[]">59
> > ST ANDREWS
> > ROADFINNIEGLENBODMINTONRINGSHIREBD1 
> >
>
1CC0107> > xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">MISS C
> > ACACIA> > SOAP-ENC:arrayType="xsd:string[]">59 ST ANDREWS
> >
>
ROADFINNIEGLENBODMINTONRINGSHIRE> > xsi:type="SOAP-ENC:Array"
> >
>
SOAP-ENC:arrayType="xsd:string[]">143.3800.0000.00143.38AYLYI001
PMILOPERSONAL
> > COMMSYRES SINGLE
> > EXCLBODORDINARY
> >
>
ACCOUNT23/12/0407/11/00NI001143.38NO143.3801/11/00B/W***NONOCust
> > Options :CE1
> > SOAP-ENC:arrayType="xsd:string[]">
01 Option 90100 - Tariff for
> Customer
> > Account
> >
>
only

00.00C> > xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">NO CSDP 
> 
> > 33.82Y TARIFF GRAND TOTAL : NO
> 
> > N 00000.40 D 01/11/00> >
>
SOAP-ENC:arrayType="xsd:string[]">??39.50??25.000Success> > xsi:type="SOAP-ENC:Array"
> >
>
SOAP-ENC:arrayType="tns:bill[]">I00107/11/00??143.38000000000000000
> > xsi:type="SOAP-ENC:Array"
> >
>
SOAP-ENC:arrayType="tns:product[]">
1
A90100

C
FRIENDS
> > &
> >
>
FAMILY0.000.00

1
A14499

C
EXCH
> > LINE +
> >
>
LINEBOX29.3629.36

1
A14493

C
PRIORITY
> > FAULT
> >
>
REPAIR0.000.00

1
A52053

O
RESPONSE
> >
>
123ORS0.00

1
A45743

C
CALL
> >
>
SIGN0.000.00

1
A51875

C
BT
> > Calling Features Pack
> >
>
14.464.46

2
A42349

C
HOME
> > NUMBER 99 MCC
> >
>
(13)0.000.00


> > 
> > 
> > -----Original Message-----
> > From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> > Sent: 08 November 2004 10:40
> > To: Apache AXIS C User List
> > Subject: RE: Axis C++ 1.3 final is released
> > 
> > 
> > There seems to be an error in your response:
> > NO
> > 
> > looks to me as if invalid XML. Please check if this is a copy/paste error is if
that is the
> real
> > response sent by the server.
> > 
> > Thanks,
> > Samisa...
> > 
> > --- adrian.p.smith@bt.com wrote:
> > 
> > > OK, I've rebuilt my client with the new jar. I still get:
> > > 
> > > Exception : Cannot deserialize the requested element
> > > Exception : 55
> > > 
> > > Here is the captred response:
> > > 
> > > HTTP/1.1 200 OK
> > > Date: Mon, 08 Nov 2004 10:10:32 GMT
> > > Server: WebLogic WebLogic Server 6.1 SP5 04/21/2003 22:50:41 #253745 
> > > Content-Length: 5211
> > > Content-Type: text/xml; charset=UTF-8
> > > 
> > > > > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> > > xmlns:tns="http://www.bt.com/css/mmbi/2002/06/types"
> > > xmlns:ns1="http://www.bt.com/css/mmbi/WS021A/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > >
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">> > >
> >
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
PCK002069bt.com
> > > SS01 ND1234567890200107190000223344dyemw01
> > >
> >
>
im011111
AdrianWS021AgetCustomerProfile2020/07/04V4.006CSS
> > >
> >
>
R83CMadrianOK1123012700010120856148911230127052BODMINTXDY57NON3CCNOYN> > > xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[]">MISS C
> > >
> >
> ACACIANO59
> > > ST ANDREWS
> > > ROADFINNIEGLENBODMINTONRINGSHIREBD1 
> > >
> >
>
1CC0107> > > xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">MISS
C
> > > ACACIA> > > SOAP-ENC:arrayType="xsd:string[]">59 ST ANDREWS
> > >
> >
>
ROADFINNIEGLENBODMINTONRINGSHIRE> > > xsi:type="SOAP-ENC:Array"
> > >
> >
>
SOAP-ENC:arrayType="xsd:string[]">143.3800.0000.00143.38AYLYI001
PMILOPERSONAL
> > > COMMSYRES SINGLE
> > > EXCLBODORDINARY
> > >
> >
>
ACCOUNT23/12/0407/11/00NI001143.38NO143.3801/11/00B/W***NOCust
> > > Options :CE1
> > > SOAP-ENC:arrayType="xsd:string[]">
01 Option 90100 - Tariff for
> > Customer
> > > Account
> > >
> >
>
only

00.00C> > > xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[]">NO CSDP

> 
> > 
> > > 33.82Y TARIFF GRAND TOTAL : 
> NO
> > 
> > > N 00000.40 D 01/11/00> > >
> >
>
SOAP-ENC:arrayType="xsd:string[]">£39.50£25.000Success> > > xsi:type="SOAP-ENC:Array"
> > >
> >
>
SOAP-ENC:arrayType="tns:bill[]">I00107/11/00£143.38000000000000000
> > > xsi:type="SOAP-ENC:Array"
> > >
> >
>
SOAP-ENC:arrayType="tns:product[]">
1
A90100

C
FRIENDS
> > > &
> > >
> 
=== message truncated ===




__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 




---------------------------------
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com

---------------------------------
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
			
---------------------------------
Do you Yahoo!?
 Check out the new Yahoo! Front Page. www.yahoo.com
Mime
View raw message