You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Maurice <be...@x3.net> on 2014/05/14 11:51:40 UTC

Empty target node with external binding file

Dear readers,

i am trying, for several days now , to customize bindings of a WSDL to fit
into my local domain using Karaf 2.3.4 with Felix and CXF 2.7.10.
The Client gets created by
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(String
wsdlUrl, QName service, QName port, List<String> bindingFiles).
Here i pass a binding file which generates the following exception:

/blueprint stuff...Caused by: java.lang.RuntimeException: Error compiling
schema from WSDL at
{https://le.zhp-online.de/static/wsdl/vo_handling_physiotherapy.wsdl}: 
XPath evaluation of
"wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType[@name='Verordnung']"
results in empty target node
 at line 16 column 100 of schema
file:/C:/Users/x3.mbetzel/Development/karaf/apache-karaf-2.3.4-dms-2.0.0/etc/orchestrater-jaxb-bindings.xjb

	at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.throwException(DynamicClientFactory.java:733)
	at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:322)
	at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:236)
	at
net.x3.webservice.dynamic.client.factories.JaxWsClientFactory.create(JaxWsClientFactory.java:95)
	at
net.x3.webservice.dynamic.client.beans.JaxWsClientPool.getJaxWsClient(JaxWsClientPool.java:103)
	at
net.x3.webservice.dynamic.client.beans.DynamicWsClient.getOutOfBandHeaderMessagePart(DynamicWsClient.java:98)
	at
Proxycb5649db_0b18_443b_b957_3445857f5bab.getOutOfBandHeaderMessagePart(Unknown
Source)
	at
net.x3.ehealth.hmm.dms.validaterorchestrater.beans.ValidaterOrchestrater.init(ValidaterOrchestrater.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
	at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.4.0]
	... 38 more
Caused by: com.sun.istack.internal.SAXParseException2: XPath evaluation of
"wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType[@name='Verordnung']"
results in empty target node
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:610)
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:604)
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:280)
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:376)
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:131)
	at
com.sun.tools.internal.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:93)
	at
com.sun.tools.internal.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:437)
	at
com.sun.tools.internal.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
	at
org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:54)
	at com.sun.proxy.$Proxy21.bind(Unknown Source)
	at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:320)
	... 51 more/

Any xpath editor confirms my path to be correct though. What am i missing?

The binding file:





--
View this message in context: http://cxf.547215.n5.nabble.com/Empty-target-node-with-external-binding-file-tp5743952.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Empty target node with external binding file

Posted by Daniel Kulp <dk...@apache.org>.
Can you try with just:

//xsd:schema/xsd:complexType[@name='Verordnung’]"

(note the double slash at the beginning)

I think we feed just the schemas into XJC for generation and thus the wsdl parts in the path might not work.   Not 100% sure on that.

Dan



On May 14, 2014, at 5:51 AM, Maurice <be...@x3.net> wrote:

> Dear readers,
> 
> i am trying, for several days now , to customize bindings of a WSDL to fit
> into my local domain using Karaf 2.3.4 with Felix and CXF 2.7.10.
> The Client gets created by
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(String
> wsdlUrl, QName service, QName port, List<String> bindingFiles).
> Here i pass a binding file which generates the following exception:
> 
> /blueprint stuff...Caused by: java.lang.RuntimeException: Error compiling
> schema from WSDL at
> {https://le.zhp-online.de/static/wsdl/vo_handling_physiotherapy.wsdl}: 
> XPath evaluation of
> "wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType[@name='Verordnung']"
> results in empty target node
> at line 16 column 100 of schema
> file:/C:/Users/x3.mbetzel/Development/karaf/apache-karaf-2.3.4-dms-2.0.0/etc/orchestrater-jaxb-bindings.xjb
> 
> 	at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.throwException(DynamicClientFactory.java:733)
> 	at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:322)
> 	at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:236)
> 	at
> net.x3.webservice.dynamic.client.factories.JaxWsClientFactory.create(JaxWsClientFactory.java:95)
> 	at
> net.x3.webservice.dynamic.client.beans.JaxWsClientPool.getJaxWsClient(JaxWsClientPool.java:103)
> 	at
> net.x3.webservice.dynamic.client.beans.DynamicWsClient.getOutOfBandHeaderMessagePart(DynamicWsClient.java:98)
> 	at
> Proxycb5649db_0b18_443b_b957_3445857f5bab.getOutOfBandHeaderMessagePart(Unknown
> Source)
> 	at
> net.x3.ehealth.hmm.dms.validaterorchestrater.beans.ValidaterOrchestrater.init(ValidaterOrchestrater.java:37)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
> 	at
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.4.0]
> 	... 38 more
> Caused by: com.sun.istack.internal.SAXParseException2: XPath evaluation of
> "wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType[@name='Verordnung']"
> results in empty target node
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:610)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:604)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:280)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:376)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:131)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:93)
> 	at
> com.sun.tools.internal.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:437)
> 	at
> com.sun.tools.internal.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:215)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
> 	at
> org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:54)
> 	at com.sun.proxy.$Proxy21.bind(Unknown Source)
> 	at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:320)
> 	... 51 more/
> 
> Any xpath editor confirms my path to be correct though. What am i missing?
> 
> The binding file:
> 
> 
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Empty-target-node-with-external-binding-file-tp5743952.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Empty target node with external binding file

Posted by Maurice <be...@x3.net>.
Hello Dan,

i have to report that it is a no go. I have tryed every xpath variant
possible. The point is that CXF is using reflexion internally to address
com.sun.tools.internal.xjc, the JDK implementation of Jaxb if i am correct,
and i am missing the knowlledge to debug into that. Because of the time
spent on this i will have to research this some other time and find a less
dynamic sollution, like aggregating the XML from the SOAP services.




--
View this message in context: http://cxf.547215.n5.nabble.com/Empty-target-node-with-external-binding-file-tp5743952p5744067.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Empty target node with external binding file

Posted by Maurice <be...@x3.net>.
Some more background:
I am building an app that collects similar information from several SOAP
services. There might be slight differences between the embedded schema's
which have to be compensated for to allow easy integration in the local
domain. I use a dynamic ws client to generate 1 stub per endpoint on runtime
to avoid having to do wsdl2java (Maven) on compile time, forcing a redeploy.
This is working out great except for the needed modification of the schema.
With the wsdl2java tool and maven using jaxws:bindings works. But it seems
that this external binding file also does not get honoured by direct
insertion in the api (which uses jaxb binding as noted in the api), see
above. 
Does it need different binding files?
Or is there a better way of doing this, i have read something of a internal
domain schema being used to modify external wsdls,  here on the mailing
list?



--
View this message in context: http://cxf.547215.n5.nabble.com/Empty-target-node-with-external-binding-file-tp5743952p5743979.html
Sent from the cxf-user mailing list archive at Nabble.com.