axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: Bug in generated *MessageReceiverInOut.java
Date Fri, 21 Sep 2007 04:26:34 GMT
please create a jira.

Thanks
Deepal

Alex Stein wrote:
> Hello everybody,
>
> I am having problems with my error handling in axis2 version 1.3 (jaxbri databinding).
I am getting an OMException in my generated MessageReiceiverInOut-Class when using a wsdl
fault in my wsdl. The wsdl looks more or less like this:
>
>
> <xs:element name="ServiceFault">
> 	<xs:complexType>
> 		<xs:sequence>
> 			<xs:element name="uuid" nillable="true" type="xs:string" />
> 			<xs:element name="faultstring" nillable="true" type="xs:string" />
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:element>
>
> ...
>
> <wsdl:message name="ServiceException">
>   <wsdl:part element="ns:ServiceFault" name="ServiceException" />
> </wsdl:message>
>
> ...
>
> <wsdl:operation name="store">
> 	<wsdl:input	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsaw:Action="urn:store"
message="axis2:storeMessage" />
> 	<wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"	message="axis2:storeResponseMessage"
wsaw:Action="urn:store" />
> 	<wsdl:fault message="axis2:ServiceException" name="ServiceException" />
> </wsdl:operation>
>
> ...
>
>
> In the method invokeBusinessLogic the thrown ServiceExceptionis caught an the method
toOM is called to create the OMElement for the fault:
>
>             if (e.getFaultMessage() != null){
>                 f.setDetail(toOM(e.getFaultMessage(),false));
>             }
>
> In the method toOM the following code is generated to create the OMElement:
>
> factory.createOMElement(source, "", namespace);
>
> Here the empty string is raising a OMException with the message "localname can not be
null or empty". If the e.getFaultMessage() returns null everything works fine, but of course
no data is transportet to the client.
>
> Is this a bug or am I making something wrong in the error handling?
>
> Thanks
>
> Alex
>
>   

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message