Franz, just a small thought:
You test value == null, but you did a value.getClass() before... to
avoid an NPE, you should test value == null earlier.
Mika
Franz Garsombke schrieb:
I have this working now. I extended AegisBindingProvider and overrode
the following method. The type mapping is retrieved from the Object
value coming in. It works pretty smoothly. I will document this on the
website.
public void writeParameter(MessagePartInfo p, XMLStreamWriter
writer, MessageContext context, Object value)
throws XFireFault {
Type type =
getTypeMapping(context.getService()).getTypeCreator().createType(value.getClass());
MessageWriter mw = new ElementWriter(writer);
if (type.isNillable() && value == null) {
mw.writeXsiNil();
return;
}
context.setProperty(CURRENT_MESSAGE_PART, p);
type.writeObject(value, mw, context);
}
Thanks,
Franz
*/Franz Garsombke <[EMAIL PROTECTED]>/* wrote:
Allright...so I have the new transport and channel classes created
that basically just return the SOAP request as a String. This can
then be used to post to a JMS topic, etc. We don't want to be
bound to a 'JMS Transport'.
I have one more thing that I need to figure out. We would much
rather call send(Object obj) then send(MyDataType dataType). The
problem with that is the first signature creates an exception
because the schema type of ObjectType is created versus an
XmlBeansType. I have tracked this down to the
XmlBeansTypeCreator.createType method. My question is...if I had a
signature like send(Object obj, Class classType) how can I use
classType as the class that is used by the TypeCreator vs. clazz =
m.getParameterTypes()[index]; ? If this isssue can be resolved we
can have a generic SOAP request creator versus having to maintain
a Service class with dozens of send(MyDataType dataType) methods.
It looks like I might have to tweak the AegisBindingProvider
getParameterType(TypeMapping tm, MessagePartInfo param, int
paramtype) so that when it calls type =
tm.getTypeCreator().createType(op.getMethod(), param.getIndex());
I can pass in more than the Method and parameter. How can I pass
the class type I know ahead of time into this whole mechanism?
Thanks again for a great framework. After this piece is solved
both ways (taking in a String SOAP request and creating a String
SOAP request with full marshalling) will be complete.
Thanks,
Franz
------------------------------------------------------------------------
Brings words and photos together (easily) with
PhotoMail
<http://us.rd.yahoo.com/mail_us/taglines/PMall/*http://photomail.mail.yahoo.com>
- it's free and works with Yahoo! Mail.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
cyber:con gmbh
Mika Göckel
Rathausallee 10
53757 Sankt Augustin
tel (+49)2241 / 9350 0
fax (+49)2241 / 9350 99
mob (+49) 172 / 279 2771
skype mika.goeckel
email [EMAIL PROTECTED]