JAVA wsimport tool yields collision errors with some PG web-services


JAVA's wsimport tool yields collision errors when comsuming some PG web services (e.g.:   Sandbox transaction management web service)




wsdl generate below in ObjectFactory class:

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

createTransactionResponse(TransactionResponse), for complexType TransactionResponse (Line 172)

These two methods have name conflict.




Use JXB file to change the name of complexType “Transaction” to “Trans”. JXB file as below, save it as for example cust.xjb. To import, use command

wsimport -s . -b cust.xjb


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<jaxb:bindings version="2.0" xmlns:jaxb=""

   xmlns:xjc="" xmlns:xs=""


   <jaxb:bindings schemaLocation="" node="/xs:schema">

               <jaxb:bindings node="//xs:complexType[@name='Transaction']">

                              <jaxb:class name="Trans"/>        





Follow Us

Stay up to date with the latest PG news via RSS, Twitter and Google +1

Copyright © 2012 Payments Gateway - All Rights Reserved Privacy | Legal