java - Axis2 - Undeclared namespace prefix "soapenv" -


does know how solve following problem when calling stub generated axis2 1.7.5 (wsdl2java)?

org.apache.axis2.axisfault: com.ctc.wstx.exc.wstxparsingexception: undeclared namespace prefix "soapenv"  @ [row,col {unknown-source}]: [1,56]     @ org.apache.axis2.util.utils.getinboundfaultfrommessagecontext(utils.java:508)     @ org.apache.axis2.description.outinaxisoperationclient.handleresponse(outinaxisoperation.java:368) 

i found stub sent following request without adding/defining soap version (xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/") causes problem

<soapenv:envelope>     <soapenv:header></soapenv:header>     <soapenv:body>....</soapenv:body> </soapenv:envelope> 

as therefore, tried set soapversionurl follows

stub._getserviceclient().getoptions().setsoapversionuri(org.apache.axis2.namespace.constants.uri_soap11_env); 

or directly set namespace in stub as

envelope.declarenamespace("http://schemas.xmlsoap.org/soap/envelope/", "soapenv") 

however, both methods still ignore "xmlns:soapenv" namespace , causes undefined prefix "soapenv".

if make request in soapui, can see soap version in request follows

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">    <soapenv:header/>    <soapenv:body>         ...    </soapenv:body> </soapenv:envelope> 

i think may axis2 / wsdl2java setting problems

please kindly help. thank alot.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -