axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Anstett" <tobias.anst...@iaas.uni-stuttgart.de>
Subject RE: OMElement and xsd:any
Date Wed, 03 Sep 2008 09:03:22 GMT
Hi,

 

I have written some real "dirty fix" - I have overwritten the
MTOMAwareOMBuilder class in my classpath and changed the operation:

 

    public Object getProperty(String string) throws IllegalArgumentException
{

        throw new UnsupportedOperationException("this method has not yet
been implemented");

    }

 

to

    public Object getProperty(String string) throws IllegalArgumentException
{

      //dirty hack form

      return null;

//        throw new UnsupportedOperationException("this method has not yet
been implemented");

    }

 

My webservice operation acts now as expected.

 

Any comments out there ?

 

Cheers, Tobias

 

From: Tobias Anstett [mailto:tobias.anstett@iaas.uni-stuttgart.de] 
Sent: Mittwoch, 3. September 2008 09:45
To: axis-user@ws.apache.org
Subject: RE: OMElement and xsd:any

 

Hi,

 

I just tested to create a new OMElement with the factory, but still receive
the error message.

 

Can anybody help, please ?!

 

Cheers, Tobias

 

From: Tobias Anstett [mailto:tobias.anstett@iaas.uni-stuttgart.de] 
Sent: Montag, 1. September 2008 14:40
To: axis-user@ws.apache.org
Subject: OMElement and xsd:any

 

Hi,

 

i am using the latest Axis 1.4 in my project. I have designed a wsdl with
the following complexTypes:

 

<xsd:element name="retrieveResponse"
type="tns:genericDataType"></xsd:element>

 

<xsd:complexType name="genericDataType">

  <xsd:choice minOccurs="1" maxOccurs="1">

    <xsd:any minOccurs="1" maxOccurs="1" namespace="##any"
processContents="lax"></xsd:any>

    <xsd:sequence minOccurs="1" maxOccurs="1">

      <xsd:element name="contentType" minOccurs="1" maxOccurs="1"
type="xsd:string"></xsd:element>

      <xsd:element name="binaryData" type="xsd:hexBinary" minOccurs="1"
maxOccurs="1"></xsd:element>

    </xsd:sequence>

  </xsd:choice>

</xsd:complexType>

 

When I set the RetrieveResponse Object as follows:

 

.

RetrieveResponse retrieveResponse = new RetrieveResponse();

GenericDataType genericData = new GenericDataType();

  if (content instanceof XmlContent) {

    XmlContent xmlContent = (XmlContent) content;

    Document document = xmlContent.getXmlDocument();

    OMElement omElement = XMLUtils.toOM(document.getDocumentElement());

    genericData.setExtraElement(omElement);

    retrieveResponse.setRetrieveResponse(genericData);

    return retrieveResponse;

  }

. //the else case will handle the second alternative of the choice (the
sequence)

 

 

I am getting this huge stack trace.

 

Does anybody know why and can help me ?

 

14:25:34,587 ERROR AxisEngine:212 - Error in extracting message properties

org.apache.axis2.AxisFault: Error in extracting message properties

      at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)

      at org.apache.axis2.engine.Phase.invoke(Phase.java:317)

      at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)

      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)

      at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(
AbstractInOutMessageReceiver.java:43)

      at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageRe
ceiver.java:100)

      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)

      at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:275)

      at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)

      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)

      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)

      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

      at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)

      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)

      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)

      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)

      at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:583)

      at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

      at java.lang.Thread.run(Thread.java:619)

Caused by: org.apache.rampart.RampartException: Error in extracting message
properties

      at
org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:290)

      at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:58)

      at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)

      ... 22 more

Caused by: org.apache.ws.security.WSSecurityException: Error in converting
SOAP Envelope to Document; nested exception is: 

      org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
java.lang.UnsupportedOperationException: this method has not yet been
implemented

      at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java
:157)

      at
org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:150)

      ... 24 more

Caused by: org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException:
java.lang.UnsupportedOperationException: this method has not yet been
implemented

      at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)

      at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:449)

      at
org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:488)

      at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java
:130)

      ... 25 more

Caused by: javax.xml.stream.XMLStreamException:
java.lang.UnsupportedOperationException: this method has not yet been
implemented

      at
org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.jav
a:1054)

      at
org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:977)

      at
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java
:506)

      at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161)

      ... 28 more

Caused by: java.lang.UnsupportedOperationException: this method has not yet
been implemented

      at
org.apache.axis2.databinding.utils.writer.MTOMAwareOMBuilder.getProperty(MTO
MAwareOMBuilder.java:241)

      at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.getProperty(MTOMXMLStreamWriter
.java:265)

      at
org.apache.axiom.om.impl.util.OMSerializerUtil.isSetPrefixBeforeStartElement
(OMSerializerUtil.java:172)

      at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializ
erUtil.java:243)

      at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializ
erUtil.java:197)

      at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.
java:901)

      at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.
java:889)

      at
org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:375)

      at
de.ustutt.iaas.oper.ws.genericrepositoryservice.model.GenericDataType.serial
ize(GenericDataType.java:236)

      at
de.ustutt.iaas.oper.ws.genericrepositoryservice.model.GenericDataType.serial
ize(GenericDataType.java:181)

      at
de.ustutt.iaas.oper.ws.genericrepositoryservice.model.RetrieveResponse.seria
lize(RetrieveResponse.java:124)

      at
de.ustutt.iaas.oper.ws.genericrepositoryservice.model.RetrieveResponse.seria
lize(RetrieveResponse.java:109)

      at
de.ustutt.iaas.oper.ws.genericrepositoryservice.model.RetrieveResponse$1.ser
ialize(RetrieveResponse.java:97)

      at
org.apache.axis2.databinding.ADBDataSource.getReader(ADBDataSource.java:108)

      at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourced
ElementImpl.java:167)

      at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElem
entImpl.java:190)

      at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getFirstOMChild(OMSourced
ElementImpl.java:838)

      at
org.apache.axiom.om.impl.llom.OMNavigator._getFirstChild(OMNavigator.java:14
2)

      at
org.apache.axiom.om.impl.llom.OMNavigator.updateNextNode(OMNavigator.java:11
4)

      at org.apache.axiom.om.impl.llom.OMNavigator.next(OMNavigator.java:97)

      at
org.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode(OMStAXWrapper.jav
a:1061)

      at
org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.jav
a:1052)

      ... 31 more

14:25:35,515 ERROR CommonsHTTPTransportSender:333 - 

org.apache.axis2.AxisFault

      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

      at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageForm
atter.java:83)

      at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputSt
ream(CommonsHTTPTransportSender.java:330)

      at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTT
PTransportSender.java:213)

      at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:530)

      at
org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:414
)

      at
org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.jav
a:377)

      at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:165)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)

      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)

      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)

      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

      at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)

      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)

      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)

      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)

      at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:583)

      at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

      at java.lang.Thread.run(Thread.java:619)

Caused by: com.ctc.wstx.exc.WstxIOException: null

      at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)

      at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:
146)

      at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java
:472)

      at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageForm
atter.java:79)

      ... 20 more

Caused by: ClientAbortException:  java.net.SocketException: Software caused
connection abort: socket write error

      at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)

      at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)

      at
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.ja
va:98)

      at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)

      at
com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)

      at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)

      ... 23 more

Caused by: java.net.SocketException: Software caused connection abort:
socket write error

      at java.net.SocketOutputStream.socketWrite0(Native Method)

      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

      at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

      at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputB
uffer.java:740)

      at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)

      at
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.jav
a:299)

      at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:964)

      at org.apache.coyote.Response.action(Response.java:183)

      at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)

      ... 28 more

14:25:35,604  INFO AxisServlet:379 - org.apache.axis2.AxisFault

 

Cheers, Tobias


Mime
View raw message