Hi Adrian,
thanks a lot for everything you told me.
I'm still having problems.
i'm new to this things , and so it's more difficult for me.
Well , in my bean implementation there is no wsdd file.
But the content of that file is in a web-service.xml.
Ant is also configured in this way:
<target name="wsr">
<jar jarfile="jar/sppm.wsr" basedir="${build.dir}">
<metainf dir="" includes="web-service.xml"/>
<exclude name="**"/>
</jar>
</target>
and so i think that it works the same as a wsdd file isn't it?
i've addedd the elements you told me:
<typeMapping
xmlns:ns="http://Trigger.trigger.proxy.triggers.wp4.firb.dico.unimi.it"
qname="ns:Trigger"
type="java:it.unimi.dico.firb.wp4.triggers.proxy.trigger.Trigger"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://TriggerSet.trigger.proxy.triggers.wp4.firb.dico.unimi.it"
qname="ns:TriggerSet"
type="java:it.unimi.dico.firb.wp4.triggers.proxy.trigger.TriggerSet"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://Parameter.parameters.proxy.triggers.wp4.firb.dico.unimi.it"
qname="ns:Parameter"
type="java:it.unimi.dico.firb.wp4.triggers.proxy.parameters.Parameter"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://Event.event.proxy.triggers.wp4.firb.dico.unimi.it"
qname="ns:Event"
type="java:it.unimi.dico.firb.wp4.triggers.proxy.event.Event"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
you can see that i've mapped also the subclasses needed for the
TriggerSet class.
Then fter getting up and running the service i've looked at the wsdl
automatically generated by jboss, cutted and pasted and generated all
classes with wsdl2java, and replaced my old classes with those new
one.
( WSDL2java generates also come other classes like
triggerLocator.java and
triggerSOAPBindingStub.java which i've NOT included in my development)
i gave a look at axis java examples of custom type mapping.
i remember that there was something like:
QName qn = new QName( "urn:BeanService", "Order" );
call.registerTypeMapping(Order.class, qn,
new
org.apache.axis.encoding.ser.BeanSerializerFactory(Order.class, qn),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class,
qn));
in the client implementation.
Do i have to add those lines (obviously changed!) ?
On Fri, 04 Mar 2005 11:34:24 +0000, Adrian Perez Jorge <[EMAIL PROTECTED]>
wrote:
> Hi fabrizio,
>
> I believe your "object graph" is not so complex to get trouble in
> serialization/deserialization.
>
> That's what I do to use EJB's for service providing (more or less):
>
> - develop your session bean.
> - build a deploy-YourSessionBean.wsdd file like this:
>
> <deployment ...>
> <service name="YourServiceName" provider="java:EJB" style="wrapped"
> use="literal">
> <parameter name="beanJndiName" value="YourSessionBean"/>
> <!-- rest of ejb's params here (local/remote interfaces/home, etc.)-->
> </service>
> <typeMapping
> xmlns:ns="http://your.package.reversed"
> qname="ns:Trigger"
> type="java:your.package.Trigger"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> encodingStyle=""
> />
> <!-- here, typemappings of the rest of possible classes/beans used in
> your web service parameters/return values object graph
> like Event, Parameter, ... -->
> </deployment>
>
> - deploy your session beans and axis servlet/web app.
> - deploy your web service using the .wsdd file above.
> - use Java2WSDL over the interface or implementation class of your
> session bean, and specify Trigger, Event, Parameter,... as extra classes
> (and also style wrapped/literal if you like that), namespace and
> location. You will get an .wsdl file you can use at the client side.
> The important here is to include Trigger, Event, Parameter,... as extra
> classes, to their wsdl definition will be included in the .wsdl file.
>
> I have used this to implement web services using session beans,
> including .net clients (must use unqualified at .net client side).
>
> Hope this help you,
>
> Adrian P.J.
>
> fabrizio picca wrote:
>
> >still having problems Jai.
> >
> >i think that the problem resides in the structure of the object that i
> >want to send.
> >
> >i'm trying to sendo something like this:
> >
> >triggerSet Object
> > String 1
> > String 2
> > vector of Trigger object
> >
> >Trigger object
> > String 1
> > String 2
> > vector of event object
> >
> >Event object
> > String 1
> > String 2
> > Parameter object
> >
> >Parameter object
> > String 1
> > String 2
> > String 3
> >
> >maybe this is impossible to serialize...
> >
> >
> >
>