You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2012/12/05 18:10:02 UTC
[jira] [Commented] (CXF-4575) Could not find any node with XPath
expression
[ https://issues.apache.org/jira/browse/CXF-4575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510601#comment-13510601 ]
Daniel Kulp commented on CXF-4575:
----------------------------------
This is a bug in your binding.xml. If you are referring to a node in a schema, you need to use a "jxb:binding", not a "jaxws:binding". This should work:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings wsdlLocation="wsdl/WSOrder.wsdl"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<jxb:binding schemaLocation="wsdl/Order.xsd"
node="xs:schema[@targetNamespace='http://www.axcess-financial.com.pe/schema/transaction']">
<jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:serializable uid="15102012"/>
</jxb:globalBindings>
</jxb:binding>
</jaxws:bindings>
{code}
> Could not find any node with XPath expression
> ---------------------------------------------
>
> Key: CXF-4575
> URL: https://issues.apache.org/jira/browse/CXF-4575
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.7.0
> Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
> Default locale: es_PE, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> Reporter: Osmar Miraval
> Fix For: Invalid
>
> Attachments: Order.xsd, WSOrder.wsdl
>
>
> I have wsdl and xsd in files separate when attempt generate java files show the next error:
> [ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.0:wsdl2java
> (generate-sources) on project svOrder: Execution generate-sources of goal org.a
> pache.cxf:cxf-codegen-plugin:2.7.0:wsdl2java failed: Could not find any node wit
> h the XPath expression: //wsdl:definitions/wsdl:types/xs:schema[@targetNamespace
> ='http://www.axcess-financial.com.pe/schema/transaction'] -> [Help 1]
> this is code chunk from pom.xml
> <execution>
> <id>generate-sources</id>
> <phase>generate-sources</phase>
> <configuration>
> <sourceRoot>${basedir}/src/main/java</sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>${basedir}/src/main/resources/wsdl/WSOrder.wsdl</wsdl>
> <wsdlLocation>classpath:wsdl/WSOrder.wsdl</wsdlLocation>
> <extraargs>
> <extraarg>-b</extraarg>
> <extraarg>${basedir}/src/main/resources/binding.xml</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>
> <goals>
> <goal>wsdl2java</goal>
> </goals>
> </execution>
> {code}
> this is code chunk from binding.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <jaxws:bindings wsdlLocation="wsdl/WSOrder.wsdl"
> xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <jaxws:bindings schemaLocation="wsdl/Order.xsd"
> node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://www.axcess-financial.com.pe/schema/transaction']">
> <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <jxb:serializable uid="15102012"/>
> </jxb:globalBindings>
> </jaxws:bindings>
> </jaxws:bindings>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira