Support Services

Java's wsimport tool returns collision errors when consuming some of Forte's SOAP web services. What causes these errors and how can I work around it?

The wsdl below is generated in the ObjectFactory class:

createTransactionResponse(TransactionResponse), for complexType Transaction, element Response (Line 122),
createTransactionResponse(TransactionResponse), for complexType TransactionResponse (Line 172)

These two methods have a name conflict. As a workaround, use a JXB file to change the name of the complexType "Transaction" to "Trans" in the JXB file as shown below and save it (e.g., cust.xjb). To import the file, use the following command:

wsimport -s . -b cust.xjb https://sandbox.paymentsgateway.net/WS/Transaction.wsdl


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings version="2.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <jaxb:bindings schemaLocation="https://sandbox.paymentsgateway.net/WS/Transaction.wsdl#types?schema1" node="/xs:schema">
          <jaxb:bindings node="//xs:complexType[@name='Transaction']">
                  <jaxb:class name="Trans"/>
           </jaxb:bindings>
  </jaxb:bindings>
</jaxb:bindings>



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.