Grails-Plugin-Consortium / grails-cxf

CXF Plugin for the Grails web framework
http://grails.org/plugin/cxf
38 stars 46 forks source link

Grails cxf plugin, how to use user-defined DTO as a parameter and return value #57

Open linedwin opened 7 years ago

linedwin commented 7 years ago

Grails cxf plugin, how to use user-defined DTO as a parameter and return value, DTO contains any-type such as greoovy def data type

ctoestreich commented 7 years ago

@linedwin You can do this by using a mapper before calling cxf and before returning result. But I am not sure if you can just make your own DTO the input and output without making it exactly like the generated POJO from wsdl2java. Can you provide more details/context?

linedwin commented 7 years ago

Hi, sir, First of all, I would like to thank you for your reply to this question is that I need to use the user-defined DTO web service as a method of input parameters and output return value,My working environment is as follows: Gradle: 3.0 Groovy: 2.4.7 Ant: Apache Ant (TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_111 (Oracle Corporation 25.111-b14) OS: Windows 10 10.0 amd64 IDE: Intellj IDEA 2016.3

I have attached a simple example such as the attachment , Sorry, the attachment should be Google's security mechanism can not be used. Zip transmission, in turn will be invited to deputy file pkg name to zipbut did not produce wsdl Method and input and output data structure, wsdl results are as follows:

<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://test.ehis.hcsaastech.com/" name="EdwinServiceService" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns=" http://test.ehis.hcsaastech.com/" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">

2016-12-10 0:30 GMT+08:00 Christian Oestreich : > @linedwin You can do this by using a mapper > before calling cxf and before returning result. But I am not sure if you > can just make your own DTO the input and output without making it exactly > like the generated POJO from wsdl2java. Can you provide more > details/context? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
linedwin commented 7 years ago

Hi, Sir,

In addition, I use the development framework is Grails 3.2.3

2016-12-10 0:30 GMT+08:00 Christian Oestreich notifications@github.com:

@linedwin https://github.com/linedwin You can do this by using a mapper before calling cxf and before returning result. But I am not sure if you can just make your own DTO the input and output without making it exactly like the generated POJO from wsdl2java. Can you provide more details/context?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grails-Plugin-Consortium/grails-cxf/issues/57#issuecomment-266057332, or mute the thread https://github.com/notifications/unsubscribe-auth/AWEWWM5yu0nRJflKd-epZ44MG_5nmAXBks5rGYImgaJpZM4LHdXr .

linedwin commented 7 years ago

sir,

Thank you, the problem has been solved, the program can run

2016-12-10 10:02 GMT+08:00 edwiin Lin isedwiin@gmail.com:

Hi, Sir,

In addition, I use the development framework is Grails 3.2.3

2016-12-10 0:30 GMT+08:00 Christian Oestreich notifications@github.com:

@linedwin https://github.com/linedwin You can do this by using a mapper before calling cxf and before returning result. But I am not sure if you can just make your own DTO the input and output without making it exactly like the generated POJO from wsdl2java. Can you provide more details/context?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Grails-Plugin-Consortium/grails-cxf/issues/57#issuecomment-266057332, or mute the thread https://github.com/notifications/unsubscribe-auth/AWEWWM5yu0nRJflKd-epZ44MG_5nmAXBks5rGYImgaJpZM4LHdXr .