I'm not sure what it's all about either. I just kind of followed the
instructions in:
http://feature.opengeospatial.org/forumbb/viewtopic.php?p=2424&sid=d681ab2e7b5117640ad50ee78328d69
that I found by googling the error message.
:-)
Dan
On Jul 16, 2008, at 11:57 AM, nmt999 wrote:
Though I did not understand what you were trying to do in the
binding, it
works. Would you be able to suggest any quick tutorial for beginners
to get
an understanding on this binding.
Thank you very much for your help.
Regards
nmt
dkulp wrote:
Try this:
<bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="MasterAccountService.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
version="2.0">
<bindings node="wsdl:definitions/
wsdl:[EMAIL PROTECTED]'MasterAccountService']/
wsdl:[EMAIL PROTECTED]'getMasterAccountStatus']">
<parameter part="wsdl:definitions/
wsdl:[EMAIL PROTECTED]'getMasterAccountStatusRequest']/
wsdl:[EMAIL PROTECTED]'parameters']"
childElementName="tns:masterAccountID"
name="masterAccountID1" />
</bindings>
<bindings node="wsdl:definitions/wsdl:types/
xsd:[EMAIL PROTECTED]'http://marketing.ews.yahooapis.com/
V4']" >
<jaxb:globalBindings underscoreBinding="asCharInWord"/>
<jaxb:bindings node="xsd:[EMAIL PROTECTED]'MasterAccount']/
xsd:sequence/xsd:[EMAIL PROTECTED]'ID']">
<jaxb:factoryMethod name="masterAccountID_"/>
</jaxb:bindings>
</bindings>
</bindings>
On Jul 15, 2008, at 3:48 PM, nmt999 wrote:
wsdl2java when run on the wsdl
https://sandbox.marketing.ews.yahooapis.com/services/V4/MasterAccountService?wsdl
gives the following error
WSDLToJava Error: Thrown by JAXB : Two declarations cause a
collision in the
ObjectFactory class.
There are 2 methods getMasterAccount and getMasterAccountStatus
taking the
same single input parameter masterAccountID.
I was advised by the experts on this forum to use an external
binding file.
I have generated the following in an attempt to rename the input
parameter
for the getMasterAccountStatus method that will be generated to
avoid
collision in ObjectFactory class
<bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="MasterAccountService.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws">
<bindings
node="wsdl:definitions/wsdl:[EMAIL PROTECTED]'MasterAccountService']/
wsdl:[EMAIL PROTECTED]'getMasterAccountStatus']">
<parameter
part="definitions/[EMAIL PROTECTED]'getMasterAccountStatusRequest']/
[EMAIL PROTECTED]'parameters']"
childElementName="tns:masterAccountID"
name="masterAccountID1" />
</bindings>
</bindings>
when I try to run the wsdl2java using binding file above i get the
following
error
../bin/wsdl2java -verbose -b binding.xml MasterAccountService.wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -verbose -b binding.xml MasterAccountService.wsdl
wsdl2java - Apache CXF 2.1.1
WSDLToJava Error: java.lang.RuntimeException: Fail to create wsdl
definition
file:/home/project/test1/wsdl/MasterAccountService.wsdl
org.apache.cxf.tools.common.ToolException:
java.lang.RuntimeException: Fail
to create wsdl definition
file:/home/project/test1/wsdl/MasterAccountService.wsdl
at
org
.apache
.cxf
.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:
240)
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.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:173)
Caused by: java.lang.RuntimeException: Fail to create wsdl
definition
file:/home/project/test1/wsdl/MasterAccountService.wsdl
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.wsdl11
.JAXWSDefinitionBuilder.customize(JAXWSDefinitionBuilder.java:
128)
at
org
.apache
.cxf
.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:
127)
at
org
.apache
.cxf
.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:
232)
... 3 more
Caused by: org.apache.cxf.tools.common.ToolException: XPath query
//definitions/[EMAIL PROTECTED]'getMasterAccountStatusRequest']/
[EMAIL PROTECTED]'parameters']
is identifying either multiple or no target nodes.
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.customization
.JAXWSBindingParser.queryXPathNode(JAXWSBindingParser.java:214)
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.customization
.JAXWSBindingParser.parseElement(JAXWSBindingParser.java:106)
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.customization
.JAXWSBindingDeserializer.unmarshall(JAXWSBindingDeserializer.java:
50)
at
com.ibm.wsdl.xml.WSDLReaderImpl.parseExtensibilityElement(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseOperation(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.wsdl11
.JAXWSDefinitionBuilder
.buildCustomizedDefinition(JAXWSDefinitionBuilder.java:182)
at
org
.apache
.cxf
.tools
.wsdlto
.frontend
.jaxws
.wsdl11
.JAXWSDefinitionBuilder.customize(JAXWSDefinitionBuilder.java:
123)
... 5 more
Need help with fixing the external binding file.
Regards
nmt
--
View this message in context:
http://www.nabble.com/help-with-fixing-external-binding-file-tp18473472p18473472.html
Sent from the cxf-user mailing list archive at Nabble.com.
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog
--
View this message in context:
http://www.nabble.com/help-with-fixing-external-binding-file-tp18473472p18490757.html
Sent from the cxf-user mailing list archive at Nabble.com.
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog