axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balaji Thirugnanam <Bthirugna...@ceiamerica.com>
Subject Bean Serialization
Date Wed, 06 Aug 2003 18:28:20 GMT
I am wondering, if the default BeanSerializer would add
loop tag kinda elements if I have an array of custom
objects inside a java bean.

ex.,  
class Bean1
{
	public CustomType[] getCustomType();
.
.
}

For the above example, I thought the AXIS-BeanSerializer 
will have loop'd elements with each element as CustomType

Is it correct ?

-Balaji .T

-----Original Message-----
From: Bayliss Paul [mailto:Paul.Bayliss@comverse.com]
Sent: Wednesday, August 06, 2003 2:25 PM
To: 'axis-user@ws.apache.org'
Subject: RE: RPC & Faults


Hi Cory,

But you do want to return a SOAP Fault element, right?

Axis will create a new Exception class that matches your wsdl description.
It is up to you whether you throw this exception in response to catching
another exception or from any of your own criteria.

Let me know if I'm still not understanding your question.

Cheers,
Paul

-----Original Message-----
From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
Sent: Wednesday, August 06, 2003 2:20 PM
To: axis-user@ws.apache.org
Subject: RE: RPC & Faults


The problem is, often times the errors I want to report aren't in the form
of Exceptions.

-----Original Message-----
From: Bayliss Paul [mailto:Paul.Bayliss@comverse.com]
Sent: Wednesday, August 06, 2003 1:17 PM
To: 'axis-user@ws.apache.org'
Subject: RE: RPC & Faults


I'm using the document model, however I believe that the following should
work...

The exception classes will be created automatically if you use the WSDL2Java
utility. All you will have to do is to throw the exceptions and the fault
elements will be serialized and sent. WDSL2Java is documented in the Axis
user guide and reference.

Regards,
Paul

-----Original Message-----
From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
Sent: Wednesday, August 06, 2003 2:11 PM
To: axis-user@xml.apache.org
Subject: RPC & Faults


Good afternoon,

According to the WSDL specification, faults are defined as follows for a
request/response operation:

-------------------------------------
<wsdl:definitions .... >
    <wsdl:portType .... > *
        <wsdl:operation name="nmtoken" parameterOrder="nmtokens">
           <wsdl:output name="nmtoken"? message="qname"/>
           <wsdl:input name="nmtoken"? message="qname"/>
           <wsdl:fault name="nmtoken" message="qname"/>*
        </wsdl:operation>
    </wsdl:portType >
</wsdl:definitions>
-------------------------------------

So, I'm assuming that I can specify my own type of fault and feed it to the
wsdl:fault element, ie:

-------------------------------------
<complexType name="corysfault">
	<sequence>
		<element name="someInfo" type="xsd:string"/>
		<element name="moreInfo" type="xsd:string"/>
	</sequence>
</complexType>
-------------------------------------

My question is this -- where do I need to start in order to pull this off
via an rpc/encoded service where Axis is handling all the
marshalling/unmarshalling of soap encoded messages into java types?  Is
there a facility to return an unchecked Axis exception that's constructed
according the schema I've defined above?  I'm imagining some sort of object
that I pass to some Axis utility to throw an exception perhaps?

-------------------------------------
CorysFault {
	private String someInfo;
	private String moreInfo;

	public CorysFault() {
	}
	
	public get/set someInfo
	public get/set moreInfo
}
-------------------------------------

Seems like this would be quite easy to pull off if I was using the message
provider, but alas, I'm not.

Thanks in advance for any input,
Cory

Mime
View raw message