You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Suzy Fynes <su...@sentenial.ie> on 2005/02/02 16:52:45 UTC

Adding objects as parameters

 
 
Hey,
 
I'm calling a service that has objects as its parameters, how do I use
it in the client? Do I enter each attribute as a string or do I create
an object of the required type? 
(this is all in axis with a java client)
 
e.g.
 
if it was just wsdl with string parameters I do the following
.
 call.addParameter("customerAccountName" , XMLType.XSD_STRING,
ParameterMode.IN);
            call.addParameter("customerAccountNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("customerEmailAddress" ,
XMLType.XSD_STRING, ParameterMode.IN);      
            call.addParameter("customerFaxNumber" , XMLType.XSD_STRING,
ParameterMode.IN);
            call.addParameter("customerHomeTelephoneNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("customerMobileNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
 
    . Object[] params = new Object[] {"Joan
McDonald","00217096","mc@yahoo.com","","0744552224","074455613"}
 
.. String valid = (String) call.invoke(params);
                                    
now if the service requires a customer object, which has the above
parameters as attributes do I create a customer object and
call.invoke(.)
 
thanks

Calendar serialization

Posted by Tomek Minkowski <tm...@cezar.ce3.com.pl>.
 	I have to serilaize some dates, and have problem with HOURS.
 	When it's 12.38.20, and inside java platform it IS 12.38.20, my 
serialized date is:
 	<until xsi:type="xsd:dateTime">2005-02-07T11:38:20.500Z</until>

 	What's interesting: the server (created by me) sends me over 
events concerning 12:38 (time in the db) as well wrapping it up with axis 
as 11:38. I wouldn't care much what's in the SOAP, but another 
deserialization at client gets me 11:38. So the events are proper, but 
dates are changed. The timezones of server and client are both the same.

 	Pozdrawiam,
 	Tomasz Minkowski, Ce3


Re: Whois

Posted by Anne Thomas Manes <at...@gmail.com>.
There are 4 or 5 WhoIs services listed at www.xmethods.org. 

Anne


On Wed, 2 Feb 2005 20:18:12 +0100 (CET), Tomek Minkowski
<tm...@cezar.ce3.com.pl> wrote:
> 
>         Hi,
>         I guess this is off-topic, but I guess you' re the guys that might
> know the thing...
>         Is there an integrated web service server acting as  an interface
> to RIPE's, ARIN's and APNIC's whois databases?
>         I can't find much on the net.
>         Thanks.
>         TM
>

Whois

Posted by Tomek Minkowski <tm...@cezar.ce3.com.pl>.
 	Hi,
 	I guess this is off-topic, but I guess you' re the guys that might 
know the thing...
 	Is there an integrated web service server acting as  an interface 
to RIPE's, ARIN's and APNIC's whois databases?
 	I can't find much on the net.
 	Thanks.
 	TM

Strange serialization

Posted by Tomek Minkowski <tm...@cezar.ce3.com.pl>.
 	Axis serializes data very ineffectively:
 	Example:

 	<multiRef id="id5" soapenc:root="0"
 		soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 		xsi:type="ns22:EventSummary" xmlns:ns22="http://beans.eventsrv"
 		xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
SEE HERE: <count href="#id58"/>
          <name xsi:type="soapenc:string">ICMP PING speedera</name>
          <signature href="#id59"/>
       </multiRef>
AND HERE:  <multiRef id="id58" soapenc:root="0"
 		soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 		xsi:type="xsd:int"
 		xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">11</multiRef>

 	Why "count" is not just an xsd:int with value? Why the multiref??
 	WSDL for that part:

 	<complexType name="EventSummary">
 	<sequence>
 		<element name="count" type="xsd:int"/>
 		<element name="name" nillable="true" type="soapenc:string"/>
 		<element name="signature" type="xsd:int"/>
 	</sequence>
 	</complexType>

 	Thanks for help.
 	Tomasz Minkowski


Re: Adding objects as parameters

Posted by Tomek Minkowski <tm...@cezar.ce3.com.pl>.


 	Hello,

 	Create a bean with with fields as needed by the service and then:

 	call.registerTypeMapping(YourBean.class, ...);
 	As serializer /deserializer use
 	org.apache.axis.encoding.ser.BeanDeserializerFactory and
 	org.apache.axis.encoding.ser.BeanSerializerFactory.

 	Then you populate the bean and push it on the params[] array.

 	Hope this helps,
 	TM


On Wed, 2 Feb 2005, Suzy Fynes wrote:

>
>
> Hey,
>
> I'm calling a service that has objects as its parameters, how do I use
> it in the client? Do I enter each attribute as a string or do I create
> an object of the required type?
> (this is all in axis with a java client)
>
> e.g.
>
> if it was just wsdl with string parameters I do the following
> .
> call.addParameter("customerAccountName" , XMLType.XSD_STRING,
> ParameterMode.IN);
>            call.addParameter("customerAccountNumber" ,
> XMLType.XSD_STRING, ParameterMode.IN);
>            call.addParameter("customerEmailAddress" ,
> XMLType.XSD_STRING, ParameterMode.IN);
>            call.addParameter("customerFaxNumber" , XMLType.XSD_STRING,
> ParameterMode.IN);
>            call.addParameter("customerHomeTelephoneNumber" ,
> XMLType.XSD_STRING, ParameterMode.IN);
>            call.addParameter("customerMobileNumber" ,
> XMLType.XSD_STRING, ParameterMode.IN);
>
>    . Object[] params = new Object[] {"Joan
> McDonald","00217096","mc@yahoo.com","","0744552224","074455613"}
>
> .. String valid = (String) call.invoke(params);
>
> now if the service requires a customer object, which has the above
> parameters as attributes do I create a customer object and
> call.invoke(.)
>
> thanks
>