Tracked the problem down to the class org.apache.axis.Message

public void writeTo(java.io.OutputStream os) throws SOAPException,
IOException {
         //Do it the old fashion way.
        if (getSendType() == Attachments.SEND_TYPE_NONE || mAttachments ==
null || 0 == mAttachments.getAttachmentCount()) {
            try {
                String charEncoding = XMLUtils.getEncoding(this,
msgContext);;
                mSOAPPart.setEncoding(charEncoding);
                mSOAPPart.writeTo(os);
            } catch (java.io.IOException e) {
                log.error(Messages.getMessage("javaIOException00"), e);
            }
        } else {
            try {
                mAttachments.writeContentToStream(os);
            } catch (java.lang.Exception e) {
????--->                log.error(Messages.getMessage("exception00"), e);
            }
        }
    }
I always don't know why the method call sometimes work and sometimes not. 
I don't know why axis wants to write to a attachement in case of a simple
method (boolean existsStorageObject(String). (more about my mapping in my
first mail.)
I also don't know how to interpret the catch clouse without a throw. 
Did my call work or not? Can I ignore the Execption????
When I can't ignore it why is the Exception not send up the call stack??

Really confused about this.

Greetings Martin

-----Ursprüngliche Nachricht-----
Von: Martin Grüneberg [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 19. September 2005 10:22
An: [email protected]
Betreff: [axis 1.2.1] Trouble with randomly occuring Errors

Hi,
I'm stuck here with a problem. I use axis 1.2.1 on a tomcat5.5 server (jdk
1.5) and on the client side (jdk 1.4.2). The client and the server transmit
large objects over some methods (up to 30MB) which I serialize and transport
attachements (DataHandler). Most of the method calls work quite good but I
get randomly error messages on calling a simple method which takes a string
and results in a boolean. The method works or works not which I can not
understand.

Here is a part of the stacktrace on the client side. 
On the server side everything seems to be ok (nothing in the logs).

19-09-2005 09:33:51,156 ERROR (Message.writeTo() 536) - Exception:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.NullPointerException
 faultActor: 
 faultNode: 
 faultDetail: 
        
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
        at
org.apache.axis.attachments.AttachmentsImpl.writeContentToStream(Attachments
Impl.java:473)
        at org.apache.axis.Message.writeTo(Message.java:534)
        at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511)
        at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at
activegroup.dba.webservice.DBA_WS_BindingStub.existsStorageObject(DBA_WS_Bin
dingStub.java:682)
        at
activegroup.dba.webservice.WebserviceClientAccessWrapper.existsStorageObject
(WebserviceClientAccessWrapper.java:108)
....

Here the defining parts of the wedl which I usewd to generate the
stubs/skelletons (wsdl2java

<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soapencoding="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:tns="urn:webservice" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="dba"
targetNamespace="urn:webservice">
        <wsdl:types>
                <xsd:schema
targetNamespace="http://xml.apache.org/xml-soap";>
                        <xsd:import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

.... More ...

                </xsd:schema>
        </wsdl:types>
        <!-- Messages -->
        <wsdl:message name="emptyMsg"/>
        <wsdl:message name="booleanMsg">
                <wsdl:part name="boolean" type="xsd:boolean"/>
        </wsdl:message>
        <wsdl:message name="stringMsg">
                <wsdl:part name="string" type="xsd:string"/>
        </wsdl:message>
.... More ...

<wsdl:portType name="dbaPT">
<wsdl:operation name="existsStorageObject">
                        <wsdl:input message="tns:stringMsg"
name="existsStorageObjectInMsg"/>
                        <wsdl:output message="tns:booleanMsg"
name="existsStorageObjectResponse"/>
</wsdl:operation>

.... More ...

</wsdl:portType>

        <wsdl:binding name="DBA_WS_Binding" type="tns:dbaPT">
                <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
                <wsdl:operation name="existsStorageObject">
                        <wsdl:input name="existsStorageObjectInMsg">
                                <soap:body namespace="urn:webservice"
use="literal"/>
                        </wsdl:input>
                        <wsdl:output name="existsStorageObjectResponse">
                                <soap:body namespace="urn:webservice"
use="literal"/>
                        </wsdl:output>
                </wsdl:operation>

.... More ...

   </wsdl:binding>

        <wsdl:service name="DBAService">
                <wsdl:port binding="tns:DBA_WS_Binding" name="DBAService">
                        <soap:address
location="http://localhost/dba/services/DBAService"/>
                </wsdl:port>
        </wsdl:service>

</wsdl:definitions>

I hope someone can give me a hint why this non deterministic behaviour
happens!

Kind regards
Martin Grüneberg


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 16.534 from 19.09.2005
Virus news: www.antiviruslab.com


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 16.534 from 19.09.2005
Virus news: www.antiviruslab.com

Reply via email to