Open apupier opened 5 years ago
the issue occurs when a port type contains an "_"
Fixes merged
I provided a PR which is avoiding the NPE and testing the same things than other tests but I have no idea if the generated code is really working or not (and don't know how to check that for now)
Sorry I missed the new PR
@tdiesler what needs to be checked on the generated code? how to test that the generated code is correct the wsdl/camel rest dsl?
I'd say it works in the context of its test coverage. If a functionality is auto tested we claim that it works. If it is not tested we assume that it is not there.
is the test that I've written accurate? I duplicate the other tests, but does it makes sense in the context of name with underscores? How to know if it is the right way to handle it?
Here is an example of a comprehensive functional test
https://github.com/jboss-fuse/wsdl2rest/blob/master/tests/spring/src/test/java/org/jboss/fuse/wsdl2rest/test/rpclit/CamelRestRpcLitTest.java https://github.com/jboss-fuse/wsdl2rest/blob/master/tests/spring/src/test/java/org/jboss/fuse/wsdl2rest/test/rpclit/CamelRestRpcLitTest.java
There is one for rpc/lit and one for doc/lit.
You could check whether the generated camel route works for your stuff
— thomas
On Oct 17, 2018, at 2:44 PM, Aurélien Pupier notifications@github.com wrote:
is the test that I've written accurate? I duplicate the other tests, but does it makes sense in the context of name with underscores? How to know if it is the right way to handle it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jboss-fuse/wsdl2rest/issues/66#issuecomment-430613393, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO80h1DFpw7fJbalkwy5MN9z5A561MCks5ulyZCgaJpZM4XH_KR.
I still don't know if java code is well generated but camel dsl file is for sure badly generated:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="cxfrs-cc50ce86-29df-438d-a2a1-cdfde19c5d83" xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<xmljson id="xmljson"/>
</dataFormats>
<restConfiguration component="jetty" host="localhost" port="8081" bindingMode="json">
</restConfiguration>
<rest id="id-26650c10-4b95-410d-9539-c7e128152879" path="/jaxrs">
<$method.httpMethod.toLowerCase() id="id-48e4f63d-d888-4cad-9d95-dddfcecccb94" uri="//{arg0}"
type="com.oracle.xmlns.enterprise.tools.schemas.a_second_name_with_underscore_email_req.ASECONDNAMEWITHUNDERSCOREEMAILREQTypeShape"
outType="com.oracle.xmlns.enterprise.tools.schemas.a_third_name_with_underscore_msg.ATHIRDNAMEWITHUNDERSCOREMSGTypeShape"
>
<to uri="direct:A_SECOND_NAME_WITH_UNDERSCORE_EMAIL_OPR_SRV"/>
</$method.httpMethod.toLowerCase()>
</rest>
<route id="A_SECOND_NAME_WITH_UNDERSCORE_EMAIL_OPR_SRV">
<from uri="direct:A_SECOND_NAME_WITH_UNDERSCORE_EMAIL_OPR_SRV" />
<log loggingLevel="INFO" message="A_SECOND_NAME_WITH_UNDERSCORE_EMAIL_OPR_SRV"/>
<to uri="cxf://http://localhost:8080/somepath?serviceClass=1.com/Enterprise/HCM/services/A_NAME_WITH_UNDERSCORE_SRV.oracle.xmlns.A_NAME_WITH_UNDERSCORE_SRV_PortType&defaultOperationName=A_SECOND_NAME_WITH_UNDERSCORE_EMAIL_OPR_SRV"/>
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
<setBody>
<simple>${body[0]}</simple>
</setBody>
</route>
</camelContext>
</beans>
unassigned: time allocated to work on it exploded.
wsdl file available on case support https://access.redhat.com/support/cases/#/case/02193740