java - Exception when receiving SOAP message -
i'm using jax-ws 2.2.7 produce web service. operation signature is:
@webmethod @requestwrapper(localname = "setinvocationaddress", targetnamespace = "http://services.choreos.org/", classname = "org.choreos.services.setinvocationaddress") @responsewrapper(localname = "setinvocationaddressresponse", targetnamespace = "http://services.choreos.org/", classname = "org.choreos.services.setinvocationaddressresponse") @action(input = "http://services.choreos.org/shopentrance/setinvocationaddressrequest", output = "http://services.choreos.org/shopentrance/setinvocationaddressresponse") public void setinvocationaddress( @webparam(name = "arg0", targetnamespace = "") string arg0, @webparam(name = "arg1", targetnamespace = "") string arg1, @webparam(name = "arg2", targetnamespace = "") list<string> arg2);
this web service running on tomcat 6 java 7.
i have sent following soap message it:
<?xml version="1.0" encoding="utf-8"?> <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pre="http://services.choreos.org/"> <soap-env:body> <pre:setinvocationaddress> <arg0>cd-shopentrance-marketingapplication</arg0> <arg1>marketingapplication</arg1> <arg2>http://localhost:8080/marketingapplication/marketingapplication</arg2> </pre:setinvocationaddress> </soap-env:body> </soap-env:envelope>
in localhost environment works. not in production.
when things did not work, got following stack trace @ server side (tomcat log):
may 24, 2015 11:29:04 pm com.sun.xml.ws.transport.http.httpadapter$httptoolkit handle severe: couldn't create soap message due exception: xml reader error: com.ctc.wstx.exc.wstxparsingexception: non-default namespace can not map empty uri (as per namespace 1.0 # 2) in xml 1.0 documents @ [row,col {unknown-source}]: [1,90] com.sun.xml.ws.protocol.soap.messagecreationexception: couldn't create soap message due exception: xml reader error: com.ctc.wstx.exc.wstxparsingexception: non-default namespace can not map empty uri (as per namespace 1.0 # 2) in xml 1.0 documents @ [row,col {unknown-source}]: [1,90] @ com.sun.xml.ws.encoding.soapbindingcodec.decode(soapbindingcodec.java:317) @ com.sun.xml.ws.transport.http.httpadapter.decodepacket(httpadapter.java:344) @ com.sun.xml.ws.transport.http.httpadapter.access$400(httpadapter.java:100) @ com.sun.xml.ws.transport.http.httpadapter$httptoolkit.handle(httpadapter.java:634) @ com.sun.xml.ws.transport.http.httpadapter.handle(httpadapter.java:264) @ com.sun.xml.ws.transport.http.servlet.servletadapter.invokeasync(servletadapter.java:218) @ com.sun.xml.ws.transport.http.servlet.wsservletdelegate.doget(wsservletdelegate.java:159) @ com.sun.xml.ws.transport.http.servlet.wsservletdelegate.dopost(wsservletdelegate.java:194) @ com.sun.xml.ws.transport.http.servlet.wsservlet.dopost(wsservlet.java:80) @ javax.servlet.http.httpservlet.service(httpservlet.java:637) @ javax.servlet.http.httpservlet.service(httpservlet.java:717) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:290) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:233) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:102) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:293) @ org.apache.coyote.http11.http11processor.process(http11processor.java:861) @ org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:606) @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:489) @ java.lang.thread.run(thread.java:745) caused by: com.sun.xml.ws.streaming.xmlstreamreaderexception: xml reader error: com.ctc.wstx.exc.wstxparsingexception: non-default namespace can not map empty uri (as per namespace 1.0 # 2) in xml 1.0 documents @ [row,col {unknown-source}]: [1,90] @ com.sun.xml.ws.streaming.xmlstreamreaderutil.wrapexception(xmlstreamreaderutil.java:326) @ com.sun.xml.ws.streaming.xmlstreamreaderutil.next(xmlstreamreaderutil.java:99) @ com.sun.xml.ws.streaming.xmlstreamreaderutil.nextcontent(xmlstreamreaderutil.java:169) @ com.sun.xml.ws.streaming.xmlstreamreaderutil.nextelementcontent(xmlstreamreaderutil.java:104) @ com.sun.xml.ws.encoding.streamsoapcodec.decode(streamsoapcodec.java:202) @ com.sun.xml.ws.encoding.streamsoapcodec.decode(streamsoapcodec.java:338) @ com.sun.xml.ws.encoding.streamsoapcodec.decode(streamsoapcodec.java:156) @ com.sun.xml.ws.encoding.soapbindingcodec.decode(soapbindingcodec.java:312) ... 22 more caused by: com.ctc.wstx.exc.wstxparsingexception: non-default namespace can not map empty uri (as per namespace 1.0 # 2) in xml 1.0 documents @ [row,col {unknown-source}]: [1,90] @ com.ctc.wstx.sr.streamscanner.constructwfcexception(streamscanner.java:606) @ com.ctc.wstx.sr.streamscanner.throwparseerror(streamscanner.java:479) @ com.ctc.wstx.sr.streamscanner.throwparseerror(streamscanner.java:464) @ com.ctc.wstx.sr.basicstreamreader.handlensattrs(basicstreamreader.java:3058) @ com.ctc.wstx.sr.basicstreamreader.handlestartelem(basicstreamreader.java:2941) @ com.ctc.wstx.sr.basicstreamreader.handlerootelem(basicstreamreader.java:2078) @ com.ctc.wstx.sr.basicstreamreader.nextfromprolog(basicstreamreader.java:2058) @ com.ctc.wstx.sr.basicstreamreader.next(basicstreamreader.java:1117) @ com.sun.xml.ws.util.xml.xmlstreamreaderfilter.next(xmlstreamreaderfilter.java:96) @ com.sun.xml.ws.streaming.xmlstreamreaderutil.next(xmlstreamreaderutil.java:80) ... 28 more
someone has idea of happens?
tks!!!
as exception says, cannot have blank target namespace. should be:
@webparam(name = "arg0", targetnamespace = "http://services.choreos.org/")
seems jax-ws generated wrong annotation or have problem wsdl/xsd.
Comments
Post a Comment