You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brendan Reekie <br...@sandvine.com> on 2007/05/18 15:10:14 UTC
Issues with Axis2 and JAXBRI binding
Hi All,
I'm trying to get an understanding of why I'm getting LinkageError on
the server and "First Element must contain the local name, Envelope"
error on the client. The sample application is using Axis2 for the
server and using a JAXBRI binding for the client. I read a couple of
other threads about the possibility if your WSDL contained an import to
an XSD document, mine originally did but I pulled it up into one file
(see attached). Using the same code and WSDL I can deploy the server
under JAXWS and connect to it from a JAXWS client also an Axis2 client
(JAXBRI binding) and it works correctly.
Any ideas on what maybe causing this? I'm currently running with the
production build of Axis2 1.2.
Client Console Output:
org.apache.axis2.AxisFault: First Element must contain the local name,
Envelope
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:81)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:356)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)
at
org.apache.axis2.jaxws.calculator.CalculatorServiceStub.AddNumbers(Calcu
latorServiceStub.java:151)
at
org.apache.axis2.jaxws.calculator.AxisClient2AxisServer.main(AxisClient2
AxisServer.java:18)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element
must contain the local name, Envelope
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(St
AXSOAPModelBuilder.java:221)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
StAXSOAPModelBuilder.java:179)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1
35)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(
StAXSOAPModelBuilder.java:163)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPM
odelBuilder.java:111)
at
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474
)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:142)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:77)
Server Console Output:
May 18, 2007 8:54:51 AM org.apache.axis2.transport.http.AxisServlet
doPost
SEVERE: java.lang.LinkageError: Class javax/xml/stream/XMLStreamReader
violates loader constraints
Server Stack Trace:
SEVERE: Servlet.service() for servlet AxisServlet threw exception
java.lang.NullPointerException
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:170)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
at java.lang.Thread.run(Thread.java:595)
TCPMON Capture:
POST /axis2/services/CalculatorService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8081
Transfer-Encoding: chunked
131
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<ns2:AddNumbersRequest
xmlns:ns2="http://calculator.jaxws.axis2.apache.org"><Value1>1234</Value
1><Value2>56789</Value2></ns2:AddNumbersRequest></soapenv:Body></soapenv
:Envelope>
0
Thanks in advance,
Brendan
RE: Issues with Axis2 and JAXBRI binding
Posted by Brendan Reekie <br...@sandvine.com>.
Thanks for the reply Martin. I had used WSGEN to generate the WSDL off
our existing JAXWS annotations. I tried modeling the WSDL after the
example in the jaxws-calculator but instead of using RequestWrapper and
ResponseWrapper work with the WebResult tag. Is there another strategy
for generating the WSDL's off an existing code base annotated for JAXWS?
Thanks,
Brendan
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Friday, May 18, 2007 10:45 AM
To: axis-user@ws.apache.org
Subject: Re: Issues with Axis2 and JAXBRI binding
apparently your WSDL referenced a QName (Qualified Name)
http://www.w3.org/TR/wsdl
whereas QName (Qualified Name) consists of namespace and LocalPart
http://www.w3.org/TR/xmlschema-2/#QName
so it looks as if the QName (Qualified Name) you have constructed is
either
constructed QName is missing the LocalPart or
constructed a QName with a LocalPart where the namespaces collide
rules for constructing proper QNames are defined here
http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName
HTH
M--
This email message and any files transmitted with it contain
confidential
information intended only for the person(s) to whom this email message
is
addressed. If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: Brendan Reekie <ma...@sandvine.com>
To: axis-user@ws.apache.org
Sent: Friday, May 18, 2007 9:10 AM
Subject: Issues with Axis2 and JAXBRI binding
Hi All,
I'm trying to get an understanding of why I'm getting
LinkageError on the server and "First Element must contain the local
name, Envelope" error on the client. The sample application is using
Axis2 for the server and using a JAXBRI binding for the client. I read
a couple of other threads about the possibility if your WSDL contained
an import to an XSD document, mine originally did but I pulled it up
into one file (see attached). Using the same code and WSDL I can deploy
the server under JAXWS and connect to it from a JAXWS client also an
Axis2 client (JAXBRI binding) and it works correctly.
Any ideas on what maybe causing this? I'm currently running
with the production build of Axis2 1.2.
Client Console Output:
org.apache.axis2.AxisFault: First Element must contain the local
name, Envelope
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:81)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:356)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)
at
org.apache.axis2.jaxws.calculator.CalculatorServiceStub.AddNumbers(Calcu
latorServiceStub.java:151)
at
org.apache.axis2.jaxws.calculator.AxisClient2AxisServer.main(AxisClient2
AxisServer.java:18)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First
Element must contain the local name, Envelope
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(St
AXSOAPModelBuilder.java:221)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
StAXSOAPModelBuilder.java:179)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1
35)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(
StAXSOAPModelBuilder.java:163)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPM
odelBuilder.java:111)
at
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474
)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:142)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:77)
Server Console Output:
May 18, 2007 8:54:51 AM
org.apache.axis2.transport.http.AxisServlet doPost
SEVERE: java.lang.LinkageError: Class
javax/xml/stream/XMLStreamReader violates loader constraints
Server Stack Trace:
SEVERE: Servlet.service() for servlet AxisServlet threw
exception
java.lang.NullPointerException
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:170)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
ejava:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
ejava:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
at java.lang.Thread.run(Thread.java:595)
TCPMON Capture:
POST /axis2/services/CalculatorService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8081
Transfer-Encoding: chunked
131
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<ns2:AddNumbersRequest
xmlns:ns2="http://calculator.jaxws.axis2.apache.org"><Value1>1234</Value
1><Value2>56789</Value2></ns2:AddNumbersRequest></soapenv:Body></soapenv
:Envelope>
0
Thanks in advance,
Brendan
________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Issues with Axis2 and JAXBRI binding
Posted by Martin Gainty <mg...@hotmail.com>.
apparently your WSDL referenced a QName (Qualified Name)
http://www.w3.org/TR/wsdl
whereas QName (Qualified Name) consists of namespace and LocalPart
http://www.w3.org/TR/xmlschema-2/#QName
so it looks as if the QName (Qualified Name) you have constructed is either
constructed QName is missing the LocalPart or
constructed a QName with a LocalPart where the namespaces collide
rules for constructing proper QNames are defined here
http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName
HTH
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: Brendan Reekie
To: axis-user@ws.apache.org
Sent: Friday, May 18, 2007 9:10 AM
Subject: Issues with Axis2 and JAXBRI binding
Hi All,
I'm trying to get an understanding of why I'm getting LinkageError on the server and "First Element must contain the local name, Envelope" error on the client. The sample application is using Axis2 for the server and using a JAXBRI binding for the client. I read a couple of other threads about the possibility if your WSDL contained an import to an XSD document, mine originally did but I pulled it up into one file (see attached). Using the same code and WSDL I can deploy the server under JAXWS and connect to it from a JAXWS client also an Axis2 client (JAXBRI binding) and it works correctly.
Any ideas on what maybe causing this? I'm currently running with the production build of Axis2 1.2.
Client Console Output:
org.apache.axis2.AxisFault: First Element must contain the local name, Envelope
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:81)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:356)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
at org.apache.axis2.jaxws.calculator.CalculatorServiceStub.AddNumbers(CalculatorServiceStub.java:151)
at org.apache.axis2.jaxws.calculator.AxisClient2AxisServer.main(AxisClient2AxisServer.java:18)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:221)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:179)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:163)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:111)
at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:142)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:77)
Server Console Output:
May 18, 2007 8:54:51 AM org.apache.axis2.transport.http.AxisServlet doPost
SEVERE: java.lang.LinkageError: Class javax/xml/stream/XMLStreamReader violates loader constraints
Server Stack Trace:
SEVERE: Servlet.service() for servlet AxisServlet threw exception
java.lang.NullPointerException
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
TCPMON Capture:
POST /axis2/services/CalculatorService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8081
Transfer-Encoding: chunked
131
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:AddNumbersRequest xmlns:ns2="http://calculator.jaxws.axis2.apache.org"><Value1>1234</Value1><Value2>56789</Value2></ns2:AddNumbersRequest></soapenv:Body></soapenv:Envelope>
0
Thanks in advance,
Brendan
------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org