Recently in the webservice to do java development, mainly to do interface development. Found some details of the problem:
1, using a custom object, although it can, this way, limited to the client when the call
It must generate client code can call, if invoked by the dynamic wsdl is pass, and
So that needs attention, minimize the use of custom objects returned, try using the standard type. Otherwise,
Debugging it is very troublesome, the problem I also discovered through the investigation.
2, webservice xml development of the form can be returned
3, webservice json development can also be returned in the form of
4, webservice development can also be transmitted through the xml to pass parameters.
Here that the dynamic calls under the cxf ways:
String xmlStr = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<user><uid>user01</uid><password>111111</password></user>"; JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); org.apache.cxf.endpoint.Client client = dcf.createClient("http://192.168.1.206:8080/treemana/services/userApp?wsdl"); Object objects=client.invoke("createUser",xmlStr); System.out.println(objects.toString());
Required to download jar package as Annex