0

I need to create the dynamic client to call web services, which can call web services with Service Mode as Service.Mode.PAYLOAD as well as Service.Mode.MESSAGE. I have created the Dispatcher as:

Dispatch<Source> sourceDispatch =service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);

But this can invoke the services with Service Mode PAYLOAD only. Please suggest me the way how can I previously determine the Service Mode from WSDL link (service Mode parser code) before creating Dispatch instance?

informatik01
  • 16,038
  • 10
  • 74
  • 104
AmM
  • 115
  • 1
  • 11

1 Answers1

0

The mode does not depend on the WSDL. If you want to pass to sourceDispatch.invoke(T msg) an entire SOAP message use mode.MESSAGE. If you only want to pass the PAYLOAD (the body) use mode.PAYLOAD, and invoke will wrap it in a message for you. The mode also determines wether invoke returns you a message or the payload.

Catweazle
  • 619
  • 12
  • 25