Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOARequestCreator doesn't work for complex types #268

Open
mbalyaba opened this issue Apr 18, 2018 · 0 comments
Open

SOARequestCreator doesn't work for complex types #268

mbalyaba opened this issue Apr 18, 2018 · 0 comments

Comments

@mbalyaba
Copy link

mbalyaba commented Apr 18, 2018

HI.
I'm trying to parse wsdl by link https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl.
If operation Request has complex type param then NPE.

Definitions definitions = new WSDLParser().parse(wsdlUrl); SOARequestCreator creator = new SOARequestCreator(definitions, new RequestTemplateCreator(), new MarkupBuilder(writer)); creator.createRequest(portName, operationName, bindingOperation.getBinding().getName());

Exception

java.lang.NullPointerException: Cannot get property 'name' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at com.predic8.wstool.creator.RequestTemplateCreator.createComplexType(RequestTemplateCreator.groovy:91) at com.predic8.wstool.creator.RequestTemplateCreator$createComplexType$0.call(Unknown Source) at com.predic8.schema.ComplexType.create(ComplexType.groovy:94) at com.predic8.schema.ComplexType$create.call(Unknown Source) at com.predic8.wstool.creator.RequestTemplateCreator.createPart(RequestTemplateCreator.groovy:210) at com.predic8.wstool.creator.RequestTemplateCreator$createPart.call(Unknown Source) at com.predic8.wsdl.Part.create(Part.groovy:55) at com.predic8.wsdl.Part$create.call(Unknown Source) at com.predic8.wstool.creator.SOARequestCreator$_buildBody_closure3_closure9_closure10.doCall(SOARequestCreator.groovy:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056) at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at com.predic8.wstool.creator.SOARequestCreator$_buildBody_closure3_closure9.doCall(SOARequestCreator.groovy:91) at com.predic8.wstool.creator.SOARequestCreator$_buildBody_closure3_closure9.doCall(SOARequestCreator.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:408) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:67) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:446) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:369) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:82) at com.predic8.wstool.creator.SOARequestCreator$_buildBody_closure3.doCall(SOARequestCreator.groovy:87) at com.predic8.wstool.creator.SOARequestCreator$_buildBody_closure3.doCall(SOARequestCreator.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:408) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:67) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:929) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:906) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168) at com.predic8.wstool.creator.SOARequestCreator.buildBody(SOARequestCreator.groovy:83) at com.predic8.wstool.creator.SOARequestCreator.this$3$buildBody(SOARequestCreator.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) at com.predic8.wstool.creator.SOARequestCreator$_createRequest_closure2.doCall(SOARequestCreator.groovy:78) at com.predic8.wstool.creator.SOARequestCreator$_createRequest_closure2.doCall(SOARequestCreator.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:408) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:67) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:929) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:906) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168) at com.predic8.wstool.creator.SOARequestCreator.createRequest(SOARequestCreator.groovy:74)

threefish added a commit to threefish/soa-model that referenced this issue Aug 14, 2022
支持复杂对象,原问题参考 membrane#268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant