| Author |
namespace mismatch in webservice
|
shekhar puttur
Greenhorn
Joined: Mar 30, 2010
Posts: 8
|
|
Hi All,
I am developing a Java webservice which uses with apache tomcat and axis2.1.4.1.
Cliinet side i use gsoap2.7.15 .
At the client i am not getting result due to namespace mismatch.
Logs are:
SENT.log:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://pcrf.condor"><SOAP-ENV:Body><ns1:add><ns1:input>101</ns1:input></ns1:add></SOAP-ENV:Body></SOAP-ENV:Envelope>
RECV.log:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:addResponse xmlns:ns="http://pcrf.condor"><ns:return>131</ns:return></ns:addResponse></soapenv:Body></soapenv:Envelope>
TEST.log:
Push OK ('soapenv' matches 'SOAP-ENV' in namespace table)
Tags and (default) namespaces match: 'soapenv:Envelope' 'SOAP-ENV:Envelope'
Begin element found (level=1) 'soapenv:Envelope'='SOAP-ENV:Envelope'
stdsoap2.cpp(13682): malloc(42) = 0x8f21790
Tags and (default) namespaces match: 'soapenv:Body' 'SOAP-ENV:Body'
Begin element found (level=2) 'soapenv:Body'='SOAP-ENV:Body'
stdsoap2.cpp(8228): malloc(28) = 0x8f217c0
stdsoap2.cpp(8282): malloc(256) = 0x8f217f8
stdsoap2.cpp(2652): malloc(22) = 0x8f21918
Push namespace binding (level=2) 'ns' 'http://pcrf.condor'
Push OK ('ns' matches 'ns1' in namespace table)
Tags and (default) namespaces match: 'ns:addResponse' 'ns1:addResponse'
Begin element found (level=3) 'ns:addResponse'='ns1:addResponse'
Enter id='' type=9 loc=0xbfe94460 size=12 level=0
Unexpected element 'ns:return' in input (level=3, 1)
Tags 'ns:return' and 'SOAP-ENV:' match but namespaces differ
IGNORING element 'ns:return'
End element found (level=4) 'ns:return'=''
End element found (level=3) 'ns:addResponse'='ns1:addResponse'
End element found (level=2) 'soapenv:Body'='SOAP-ENV:Body'
End element found (level=1) 'soapenv:Envelope'='SOAP-ENV:Envelope'
End of receive message ok
In the response namespace is ns, that is actually causing the mismatch at the client,
How to solve this namespace issue?
Could please tell me the solution.
Thanks
Shekhar
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
Shekhar this is the Meaningless Drivel forum, a web service problem has nothing to do with it. Please Carefully Choose One Forum when you start a topic. Also UseCodeTags when you post a source code.
I'll move this topic to the appropriate forum...
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: namespace mismatch in webservice
|
|
|