Tyler Nelson wrote:
Hi Dan,
Thanks that makes sense. I wanted to make sure that I wasn't doing anything completely stupid. :)

One problem still exists however, if you include the wsdl via ObjectServiceFactory's Service create(Class clazz, QName name, URL wsdlUrl, Map properties) method it explicitly sets the CREATE_DEFAULT_BINDINGS property to default to false so we can't use a default (one) operation, becauses none will exist.

It sets this to false because it tries to pick up the binding information from the wsdl:bindings section. I've only tested this with JSR 181/JAX-WS stuff, so that might be why you aren't getting quite the functionality you want...

Would it maks sense to remove this line of code ?
properties.put (CREATE_DEFAULT_BINDINGS, Boolean.FALSE);

Or change the logic around buildBindings so that a default operation gets created ?

Obviously the fix is to subclass ObjectFactory and remove that line of code, but it would be cool if I didnt have to do that to use MessageBinding out of the box.

Should I create a jira issue for it?

I'm going to say no, because I want to accomodate the use case I outlined above. You should be able to override that though by passing in your own properties hashmap and doing:

properties.put (CREATE_DEFAULT_BINDINGS, Boolean.TRUE);
serviceFactory.create(..., properties);
Thanks again for your help.

--Tyler







On 4/12/06, * Dan Diephouse* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    The MessageBinding isn't smart enough to determine the operation. The
    MessageBinding doesn't read any of the message at all, it just assumes
    one operation You can get around this by using SOAPActions,
    WS-Addressing actions or writing a Handler that determines the
    operation.

    - Dan

    Tyler Nelson wrote:

    > Hi Guys,
    >    I'm having an issue while using my own WSDL and
    MessageBinding with
    > xfire.
    > Looks like the SoapBodyHandler is looking for a message serializer
    > depending on the operation from the MessageExchange. However that
    > operation is always null. Then it looks for a default serializer,
    > however since ObjectServiceFactory sets the create default
    bindings to
    > false that is null also.
    >
    > Then i get a null pointer when the serializer tries to read the
    message.
    >
    > For now i extended ObjectFactory to set the default bindings, it is
    > kind of a hack but it works.  :)
    >
    > My question is where is the operation in MessageExchange suppose
    to be
    > set? Am i missing something obvious?
    >
    > Thanks,
    >     Tyler
    >


    --
    Dan Diephouse
    (616) 971-2053
    Envoi Solutions LLC
    http://netzooid.com




--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to