cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2225) JAXB Xpath always results in empty target node
Date Thu, 04 Jun 2009 20:43:07 GMT

     [ https://issues.apache.org/jira/browse/CXF-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2225.
------------------------------

       Resolution: Invalid
    Fix Version/s: Invalid


Changing parameter names requires a JAX-WS customization file, not a JAXB customization file.
  The JAXB customizations just apply to stuff in the schema.  "/xsd:definitions/xsd:message....."
is not part of the schema.

With 2.2.2, you can pass the -autoNameResolution flag to wsdl2java and it will automatically
generate new names for the conflicts.



> JAXB Xpath always results in empty target node 
> -----------------------------------------------
>
>                 Key: CXF-2225
>                 URL: https://issues.apache.org/jira/browse/CXF-2225
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.2.1
>         Environment: Eclipse 3.4 / Maven / JAVA 5
> CXF 2.2.1 
> wsdl2java Maven plugin version 2.1.4
>            Reporter: Deboschère Tony
>             Fix For: Invalid
>
>
> Hi.
> I have a wsdl file from third party. 
> I wanted to generate the cxf client from it.
> In the WSDL I Have this : 
> in the portType section:
> <operation name="JobSubmit">
>             <input message="xoa:JobSubmitRequest"/>
>             <output message="xoa:JobSubmitResult"/>
> </operation>
> In message section:
> <message name="JobSubmitRequest">
>         <part element="xoa:JobSubmitRequest" name="parameter"/>
>         <part element="xoa:Request" name="request_header"/>
>     </message>
>     <message name="JobSubmitResult">
>         <part element="xoa:JobSubmitResult" name="parameter"/>
>         <part element="xoa:Response" name="response_header"/>
>     </message>
> As you can see both message have a part named 'parameter'
> It seems to be the reason why I have a java mehtod with a missing parameter : 
> @WebMethod(operationName = "JobSubmit", action = "XOAJobSubmit")
>     public void jobSubmit(
>         @WebParam(partName = "parameter", mode = WebParam.Mode.INOUT, name = "JobSubmitResult",
targetNamespace = "http://premconn.premiereconnect.com/2007/02")
>         javax.xml.ws.Holder<JobSubmitResult> parameter,
>         @WebParam(partName = "request_header", name = "Request", targetNamespace = "http://premconn.premiereconnect.com/2007/02",
header = true)
>         Request requestHeader,
>         @WebParam(partName = "response_header", mode = WebParam.Mode.OUT, name = "Response",
targetNamespace = "http://premconn.premiereconnect.com/2007/02", header = true)
>         javax.xml.ws.Holder<Response> responseHeader
>     );
> So I try to use a JAXB Binding like this : 
> <?xml version="1.0" encoding="UTF-8"?>
> <jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" jxb:version="2.1"
> 	xmlns="http://java.sun.com/xml/ns/jaxws" wsdlLocation="./wsdl/syncTest.wsdl">
> 	<jxb:bindings schemaLocation="../wsdl/syncTest.wsdl">
> 		<jxb:schemaBindings>
> 			<jxb:package name="com.manpower.fmk.webservice.external.sms.schema" />
> 		</jxb:schemaBindings>
> 	</jxb:bindings>
> 	<jxb:bindings schemaLocation="../wsdl/syncTest.wsdl">
> 		<jxb:bindings node="/xsd:definitions/xsd:message[@name='JobSubmitRequest']/xsd:part[@name='parameter']">
> 			<jxb:attribute name="parameterRequest" />
> 		</jxb:bindings>
> 	</jxb:bindings>
> </jxb:bindings>
> But all I can get from the wsdl2java plugin is : 
> eason: Thrown by JAXB : XPath evaluation of "/xsd:definitions/xsd:message[@name='JobSubmitRequest']/xsd:part[@name='parameter']"
results in empty target node
> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : XPath evaluation of "/xsd:definitions/xsd:message[@name='JobSubmitRequest']/xsd:part[@name='parameter']"
results in empty target node
> 	at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:34)
> 	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:285)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:504)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:495)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:232)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:289)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:289)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:134)
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:96)
> 	at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:448)
> 	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:221)
> 	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
> 	at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:218)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:536)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:187)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
> 	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
> 	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:360)
> 	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:257)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
> 	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
> 	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
> 	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
> Caused by: com.sun.istack.SAXParseException2: XPath evaluation of "/xsd:definitions/xsd:message[@name='JobSubmitRequest']/xsd:part[@name='parameter']"
results in empty target node
> 	at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:501)
> 	... 31 more
> So if someone has an hint about what is going on, I'd be gratefull.
> Regards.
> Deboschère Tony - France

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message