axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: AxisFault thrown with 'unknown'
Date Fri, 20 Feb 2009 13:33:45 GMT

contentType is set for the each element in your XSD e.g.
                    <xsd:element maxOccurs="1" minOccurs="1" name="binaryData" nillable="true"

                        type="xmime:base64Binary"
                        xmime:expectedContentTypes="application/octet-stream"
                        xmlns:xmime="http://www.w3.org/2005/05/xmlmime"/>

concerning WSDL messages you can use Message Formatter such as what is seen here
    <!--Following content type to message formatter mapping can be used to implement support
for different message -->
    <!--format  serialization in Axis2. These message formats are expected to be resolved
based on the content type. -->
    <messageFormatters>
        <messageFormatter contentType="application/x-www-form-urlencoded"
                          class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
        <messageFormatter contentType="multipart/form-data"
                          class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
        <messageFormatter contentType="application/xml"
                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
        <messageFormatter contentType="text/xml"
                          class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
        <messageFormatter contentType="application/soap+xml"
                          class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
    </messageFormatters>

If you could post your XSD and WSDL we could be of further assistance

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender.
This transmission is of a confidential nature and Sender does not endorse distribution to
any party other than intended recipient. Sender does not necessarily endorse content contained
within this transmission. 




Date: Fri, 20 Feb 2009 13:31:43 +1100
Subject: AxisFault thrown with 'unknown'
From: viduras@gmail.com
To: axis-user@ws.apache.org; axis-dev@ws.apache.org

Hi,

I've modified the Axis2 1.4 engine for some experiments and after a recent modification it
is throwing the following AxisFault at the client intermittently,

org.apache.axis2.AxisFault: unknown
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)

    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)

    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at edu.rmit.cs.ws.testservice.FactorPrimesServiceStub.primeCount(FactorPrimesServiceStub.java:740)
    at edu.rmit.cs.net.client.TCPProcessor.createRequest(TCPProcessor.java:127)

    at edu.rmit.cs.net.client.TCPProcessor.run(TCPProcessor.java:63)
    at java.lang.Thread.run(Thread.java:713)

The client uses an unmodified version of the axis2-kernel-1.4.jar.

A few things observed,


- If the web service calls are done in a sequential manner (one after the other waiting for
the first one to complete) the problem doesn't seem to be there.
- Even when the requests are sent in parallel to the server, the first requests gets serviced
without any problem. The error comes only on the second request or after that. When the exception
is thrown it gets thrown for all the subsequent requests.

- When the exception is received at the client, the client hangs momentarily.
- No errors are reported on the server.

I've been unable to pinpoint exactly what causes this so far after a couple of days effort.
However, I found out that the AxisFault gets thrown due to a SOAP fault that happens somewhere
up the execution. The AxisFault gets thrown from the client code due to the code in OutInAxisOperationClient.handleRequest,


if (resenvelope.hasFault()||responseMessageContext.isProcessingFault()) {
                if (options.isExceptionToBeThrownOnSOAPFault()) {
                    // does the SOAPFault has a detail element for Excpetion

                    throw Utils.getInboundFaultFromMessageContext(responseMessageContext);
                }
            }

due to the MessageContext inside operationContext.messageContexts.[Hashmap].key("In"), it
its properties having a 'fault' for the ContentType.


I couldn't specifically find where the ContentType is set from and what causes the fault.
Any help in finding out what causes this would be greatly appreciated.

Thanks,

Vidura


_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_022009
Mime
View raw message