You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2004/06/08 08:30:53 UTC

problem with sending byte arrays (BASE64) ...

hi,

you can find code to reproduce problem at
http://www.extreme.indiana.edu/~aslom/bnp/wsperf/axis_cpp/
including WSDL file that i used ot generate skeletons and stubs
http://www.extreme.indiana.edu/%7Easlom/bnp/wsperf/wsdl/benchmark1all.wsdl

REQUEST:
<?xml version='1.0' encoding='utf-8'?><S:Envelope 
xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:S='http://www.w3.org/2003/05/soap-envelope'><S:Body><n1:echoBase64 
xmlns:n1='urn:Benchmark1'><input>AAECAwQFBgcICQ==</input></n1:echoBase64></S:Body></S:Envelope>---

RESPONSE:
<?xml version='1.0' encoding='utf-8' ?><env:Envelope 
xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\" 
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" 
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><env:Body><ns1:echoBase64Response 
xmlns:ns1=\"http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl\"><echoBase64Return 
xsi:type=\"xsd:base64Binary\"></echoBase64Return></ns1:echoBase64Response></env:Body></env:Envelope>---

it seems that xsi:type is required - if included when AXIS C++ generated 
client is used i get it working

REQUEST:
<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http:/
/schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema
" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:echo
Base64 
xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><input xs
i:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQgdG8gZWl0aG
VyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</input></ns1:echoBase64></SOAP-ENV:Body><
/SOAP-ENV:Envelope>

RESPONSE:
<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:echoBase64Response 
xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><echoBase64Return 
xsi:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQgdG8gZWl0aGVyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</echoBase64Return></ns1:echoBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope>

are there any plans ot fix it?

alek

-- 
The best way to predict the future is to invent it - Alan Kay


Re: problem with sending byte arrays (BASE64) ...

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Susantha Kumara wrote:

>Hi Alek,
>
>Yes you are correct. xsi:type="xsd:base64Binary" is needed because your
>service is RPC/Encoded. If it is RPC/Literal or Document/Literal these
>type information is not needed. 
>  
>
are you sure that RPC/encoded requires xsi:type? i think it is just hint 
required only if element type is different from initially declared in WSDL?

thanks,

alek

>Is that wrong ?.
>
>--
>Susantha Kumara
>Virtusa (pvt) Ltd.
>Office : +94112714385
>Mobile : +94777420453
>
>  
>
>>-----Original Message-----
>>From: Aleksander Slominski [mailto:aslom@cs.indiana.edu]
>>Sent: Tuesday, June 08, 2004 12:31 PM
>>To: Apache AXIS C Developers List
>>Subject: problem with sending byte arrays (BASE64) ...
>>
>>hi,
>>
>>you can find code to reproduce problem at
>>http://www.extreme.indiana.edu/~aslom/bnp/wsperf/axis_cpp/
>>including WSDL file that i used ot generate skeletons and stubs
>>
>>    
>>
>http://www.extreme.indiana.edu/%7Easlom/bnp/wsperf/wsdl/benchmark1all.ws
>dl
>  
>
>>REQUEST:
>><?xml version='1.0' encoding='utf-8'?><S:Envelope
>>xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>>xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>>
>>    
>>
>xmlns:S='http://www.w3.org/2003/05/soap-envelope'><S:Body><n1:echoBase64
>  
>
>xmlns:n1='urn:Benchmark1'><input>AAECAwQFBgcICQ==</input></n1:echoBase64
>  
>
>><
>>/S:Body></S:Envelope>---
>>
>>RESPONSE:
>><?xml version='1.0' encoding='utf-8' ?><env:Envelope
>>xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\"
>>xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
>>xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-
>>instance\"><env:Body><ns1:echoBase64Response
>>
>>    
>>
>xmlns:ns1=\"http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl\"><echoB
>as
>  
>
>>e64Return
>>
>>    
>>
>xsi:type=\"xsd:base64Binary\"></echoBase64Return></ns1:echoBase64Respons
>e>
>  
>
>></env:Body></env:Envelope>---
>>
>>it seems that xsi:type is required - if included when AXIS C++
>>    
>>
>generated
>  
>
>>client is used i get it working
>>
>>REQUEST:
>><?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
>>xmlns:SOAP-ENV="http:/
>>/schemas.xmlsoap.org/soap/envelope/"
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema
>>"
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-
>>ENV:Body><ns1:echo
>>Base64
>>xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><input
>>    
>>
>xs
>  
>
>i:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQgdG
>8g
>  
>
>>ZWl0aG
>>VyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</input></ns1:echoBase64></SOAP-
>>ENV:Body><
>>/SOAP-ENV:Envelope>
>>
>>RESPONSE:
>><?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
>>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-
>>ENV:Body><ns1:echoBase64Response
>>
>>    
>>
>xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><echoBas
>e6
>  
>
>>4Return
>>
>>    
>>
>xsi:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQg
>dG
>  
>
>8gZWl0aGVyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</echoBase64Return></ns1:e
>ch
>  
>
>>oBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope>
>>
>>are there any plans ot fix it?
>>
>>alek
>>
>>--
>>The best way to predict the future is to invent it - Alan Kay
>>    
>>
>
>
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay


RE: problem with sending byte arrays (BASE64) ...

Posted by Susantha Kumara <su...@opensource.lk>.
Hi Alek,

Yes you are correct. xsi:type="xsd:base64Binary" is needed because your
service is RPC/Encoded. If it is RPC/Literal or Document/Literal these
type information is not needed. 

Is that wrong ?.

--
Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453

> -----Original Message-----
> From: Aleksander Slominski [mailto:aslom@cs.indiana.edu]
> Sent: Tuesday, June 08, 2004 12:31 PM
> To: Apache AXIS C Developers List
> Subject: problem with sending byte arrays (BASE64) ...
> 
> hi,
> 
> you can find code to reproduce problem at
> http://www.extreme.indiana.edu/~aslom/bnp/wsperf/axis_cpp/
> including WSDL file that i used ot generate skeletons and stubs
>
http://www.extreme.indiana.edu/%7Easlom/bnp/wsperf/wsdl/benchmark1all.ws
dl
> 
> REQUEST:
> <?xml version='1.0' encoding='utf-8'?><S:Envelope
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>
xmlns:S='http://www.w3.org/2003/05/soap-envelope'><S:Body><n1:echoBase64
>
xmlns:n1='urn:Benchmark1'><input>AAECAwQFBgcICQ==</input></n1:echoBase64
><
> /S:Body></S:Envelope>---
> 
> RESPONSE:
> <?xml version='1.0' encoding='utf-8' ?><env:Envelope
> xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\"
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-
> instance\"><env:Body><ns1:echoBase64Response
>
xmlns:ns1=\"http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl\"><echoB
as
> e64Return
>
xsi:type=\"xsd:base64Binary\"></echoBase64Return></ns1:echoBase64Respons
e>
> </env:Body></env:Envelope>---
> 
> it seems that xsi:type is required - if included when AXIS C++
generated
> client is used i get it working
> 
> REQUEST:
> <?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http:/
> /schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
> "
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-
> ENV:Body><ns1:echo
> Base64
> xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><input
xs
>
i:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQgdG
8g
> ZWl0aG
> VyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</input></ns1:echoBase64></SOAP-
> ENV:Body><
> /SOAP-ENV:Envelope>
> 
> RESPONSE:
> <?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-
> ENV:Body><ns1:echoBase64Response
>
xmlns:ns1="http://www.extreme.indiana.edu/wsdl/Benchmark1.wsdl"><echoBas
e6
> 4Return
>
xsi:type="xsd:base64Binary">c29tZSBzdHJpbmcgdGhhdCBpcyBzZW50IGVuY29kZWQg
dG
>
8gZWl0aGVyIGJhc2U2NEJpbmFyeSBvciBoZXhCaW5hcnk=</echoBase64Return></ns1:e
ch
> oBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope>
> 
> are there any plans ot fix it?
> 
> alek
> 
> --
> The best way to predict the future is to invent it - Alan Kay