How to remove the v in "<v:Envelope" tag

640 views
Skip to first unread message

salem

unread,
Feb 14, 2012, 6:30:11 PM2/14/12
to ksoap2-android
This is probably a silly question but I"m trying to send a soap
request to our server using ksoap2 on android and I'm coming across a
bump. My outgoing request looks like the following:

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://
schemas.xmlsoap.org/soap/envelope/">

<v:Header>
<n0:BasicAuth xmlns:n0="http://serveraddress">
<n0:Name>user</n0:Name>
<n0:Password>user</n0:Password>
</n0:BasicAuth>
</v:Header>

<v:Body>
<n1:Listinfo id="o0" c:root="1" xmlns:n1="http://serveraddress">
<creatorId i:type="d:string">admin</creatorId>
</n1:Listinfo>
< /v:Body>
</v:Envelope>


The problem that I'm coming across is that the server that I'm
requesting this from does not recognize/accept the "v:" element in the
tags. If I test with soapui and switch out "v:" with "soapenv:" the
request gets accepted and I get a proper return. I'm wondering if
there is a way to change that value or do I need to write the request
manually in the code?

Thank you

Salem

salem

unread,
Feb 15, 2012, 1:32:11 PM2/15/12
to ksoap2-android
Update:

After looking further into the issue. It appears that the server only
cares about the body tag not the envelope tag. so now I'm trying to
find a way to change the output request to send <soap:body> rather
then <v:body>

salem

unread,
Feb 16, 2012, 9:54:38 AM2/16/12
to ksoap2-android
So after a few days of looking around it appears that there is no
built in ability that would allow me to change the <v:> to <soap:>. I
went ahead and and downloaded the source and altered the public void
write in SoapEnvelpe.java to use the value "soap" instead "v" and that
fixed my issue. Is it possible to ask for this to be updated in your
next release? It seemed like too minor of a change to go through the
process of pushing the change to github and having it added to the
branch :)

P.S. Thank you for making this available on android, it has been a
great asset

Manfred Moser

unread,
Feb 16, 2012, 10:44:06 AM2/16/12
to ksoap2-...@googlegroups.com
It would have to be made configurable via some sort of setting or so
on SoapEnvelope... and that warrants a pull request.

manfred

Reply all
Reply to author
Forward
0 new messages