You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by david2 <Da...@l-3comcept.com> on 2007/12/14 01:24:53 UTC

Creating a Serializer for JiBX-altered classes

I have a simple service that returns an unbounded array containing custom
objects generated/altered by JiBX to provide XML binding.  When I invoke the
service, it executes OK on the server side, but on the client side I get a
SoapFault: [ID = 'NoSerializer'].  The message also mentioned that I "must
include a custom-serializer element for this type in the deployment
descriptor.

I thought that at one point I had a working web service returning an Array
of custom Objects without a custom serializer, but I may be wrong.  Is this
possible?

Also, while there appear to be several custom serializer examples here on
the forum, it looks like they are all created and registered in startup
code, rather than in a deployment descriptor.   Could someone post an
example of how a custom serializer is initialized in a deployment descriptor
(identifying which deployment descriptor, and where and how the
initialization should be inserted) or point to an existing example if one is
already posted?

Lastly, are there any obscure pitfalls when creating custom serializers in
conjunction with JiBX, or is it simple a matter of using the standard JiBX
marshalling/unmarshalling contexts?
-- 
View this message in context: http://www.nabble.com/Creating-a-Serializer-for-JiBX-altered-classes-tp14327762p14327762.html
Sent from the Muse User mailing list archive at Nabble.com.


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


RE: Creating a Serializer for JiBX-altered classes

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Hi David,
The Muse samples have all the basic features I think you need.  The
apache-httpd sample shows how to create and configure custom serializers
on both the server and client side.

The general idea is that Muse has default serializer support for
primitive types and a few basic complex types (i.e. Date, Element).  For
all other custom types that you expose directly to Muse either as
operation input or output, you need to also configure your own
serializers.  This way, Muse can know how to serialize/deserialize your
custom types.
-Vinh
 

-----Original Message-----
From: david2 [mailto:David.Bueche@l-3comcept.com] 
Sent: Friday, December 14, 2007 7:37 AM
To: muse-user@ws.apache.org
Subject: Re: Creating a Serializer for JiBX-altered classes


Just found the example I was needing (of initializing a custom
serializer in the (muse) deployment descriptor.  It is in the sample at
<Muse install
dir>\samples\j2ee\apache-httpd\config\muse.xml (at the very end of the
file).  Here is the snippet:
             ...
			</init-param>
		</capability>
	</resource-type>
	<custom-serializer>
	
<java-serializable-type>org.apache.muse.test.http.SupportedLanguage</jav
a-serializable-type>
	
<java-serializer-class>org.apache.muse.test.http.SupportedLanguageSerial
izer</java-serializer-class>
	</custom-serializer>
</muse>
--
View this message in context:
http://www.nabble.com/Creating-a-Serializer-for-JiBX-altered-classes-tp1
4327762p14337930.html
Sent from the Muse User mailing list archive at Nabble.com.


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

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


Re: Creating a Serializer for JiBX-altered classes

Posted by david2 <Da...@l-3comcept.com>.
Just found the example I was needing (of initializing a custom serializer in
the (muse) deployment descriptor.  It is in the sample at <Muse install
dir>\samples\j2ee\apache-httpd\config\muse.xml (at the very end of the
file).  Here is the snippet:
             ...
			</init-param>
		</capability>
	</resource-type>
	<custom-serializer>
	
<java-serializable-type>org.apache.muse.test.http.SupportedLanguage</java-serializable-type>
	
<java-serializer-class>org.apache.muse.test.http.SupportedLanguageSerializer</java-serializer-class>
	</custom-serializer>
</muse>
-- 
View this message in context: http://www.nabble.com/Creating-a-Serializer-for-JiBX-altered-classes-tp14327762p14337930.html
Sent from the Muse User mailing list archive at Nabble.com.


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