1

I'm experienced in creating soap webservice clients with cxf and jaxb. However now I have a jaxb java mapping class, and have to send this as XML using HTTP POST/1.1 to a URL path.

Question: can this be done using cxf? Or if not, with spring? I especially need (de)-serialization of request and response, automatic logging, etc. Just as it is the case with cxf soap clients.

membersound
  • 81,582
  • 193
  • 585
  • 1,120

1 Answers1

0

Yes, you can use CFX for JAXWS clients. You simple need the WSDL from the service provider. Then you use wsdl2java tool to turn the WSDL into Java stub code that you then compile along with your application.

There is a really good guide here.

0x44656E6E79
  • 1,053
  • 3
  • 14
  • 21
  • There is no wsdl, just simple XSD files and I have to post XML. – membersound Feb 17 '16 at 23:23
  • Try to go to http://the-url-of-service-that-does-not-provide-wsdl/wsdl. This is the standard URL where you should download the WSDL file. If not you can create your own WSDL based on the service definition and XSD file. – 0x44656E6E79 Feb 18 '16 at 09:22
  • It's not possible to generate a `wsdl` from `xsd`, @see http://stackoverflow.com/questions/920086/generating-a-wsdl-from-an-xsd-file – membersound Feb 18 '16 at 09:34
  • Yes that's right, not only with XSD, but XSD together with JAXWS documentation are enough to create WSDL. check [http://stackoverflow.com/questions/6752420/how-do-you-call-a-web-service-in-java-with-only-xsd-and-no-wsdl](http://stackoverflow.com/questions/6752420/how-do-you-call-a-web-service-in-java-with-only-xsd-and-no-wsdl) – 0x44656E6E79 Feb 18 '16 at 10:38