Hi Pavel,

I don't know what could be causing this problem for you, and unfortunately the exception stack trace cuts off the parts that might provide some clues. I also haven't heard from anyone else having a problem of this type.

You're not seeing any error messages prior to the exception, are you? The code will print out one or more error messages to System.err before throwing this exception, and I thought that if you're running this through Ant those errors would be visible on the console. Not that there should be errors in any case - the bindings look correct, AFAIKS.

You might try updating to the latest version of the axis2-jibx jar for the 1.1.1 release, which you can download from http://www.sosnoski.com/jibx-wiki/space/axis2-jibx But as far as I know that just fixes issues relating to Rampart usage, and shouldn't effect what you're seeing.

Perhaps someone else has experienced a similar problem and can make suggestions. If not, the best I can suggest is that you email me directly and send a zip of the entire directory for this example in the state it's in immediately after you get the error. I can then double-check the generated bindings/schemas/WSDL.

 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Pavel Sharov wrote:
Hi Dennis and others,
the Jibx2Wsdl tool really sounds very promising and long-expected.
Sticking to the instructions I however fail to run the example 1
provided at
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl/example1.
Executing 'ant' in the very beginning produces me the following error:
[java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: invalid jibx binding definition file
gen/binding.xml
     [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:224)
     [java]     at
org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
     [java]     at
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
     [java] Caused by: java.lang.RuntimeException: invalid jibx binding
definition file gen/binding.xml
     [java]     at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility
.java:246)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtensi
on.java:74)
     [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:177)
     [java]     ... 2 more
I am quite new to JiBX and got no idea of the reason of the problem at
first glance... I am using Axis2 v.1.1.1. Below are the generated
bindings it fails to consume.
Thank you in advance for any helping me out!
Pavel ======== binding.xml ===============================
<binding name="binding" package="com.sosnoski.ws.library.jibx2wsdl"
force-classes="true" add-constructors="true">
  <include path="BookServer1Binding.xml"/>
  <include path="jibx2wsdlBinding.xml"/>
</binding>

=================================================
======== BookServer1Binding.xml =======================
<binding
xmlns:tns="http://sosnoski.com/ws/library/jibx2wsdl/BookServer1";
xmlns:ns1="http://sosnoski.com/ws/library/jibx2wsdl";
force-classes="true" add-constructors="true">
  <namespace uri="http://sosnoski.com/ws/library/jibx2wsdl/BookServer1";
default="elements" prefix="ns1"/>
  <mapping class="com.sosnoski.ws.library.jibx2wsdl.AddDuplicateData"
name="addDuplicate">
    <structure map-as="ns1:book" field="m_book" usage="optional"
name="book"/>
  </mapping>
  <mapping abstract="true" type-name="tns:bookList"
class="java.util.List" create-type="java.util.ArrayList">
    <collection>
      <structure map-as="ns1:book" name="book"/>
    </collection>
  </mapping>
  <mapping abstract="true" type-name="tns:typeList"
class="java.util.List" create-type="java.util.ArrayList">
    <collection>
      <structure map-as="ns1:type" name="type"/>
    </collection>
  </mapping>
</binding>
=================================================
============== jibx2wsdlBinding.xml ===================
<binding xmlns:tns="http://sosnoski.com/ws/library/jibx2wsdl";
force-classes="true" add-constructors="true">
  <namespace uri="http://sosnoski.com/ws/library/jibx2wsdl";
default="elements" prefix="ns2"/>
  <mapping abstract="true" type-name="tns:book"
class="com.sosnoski.ws.library.jibx2wsdl.Book">
    <value style="element" name="type" field="m_type" usage="optional"/>
    <value style="element" name="title" field="m_title"
usage="optional"/>
    <value style="element" name="isbn" field="m_isbn" usage="optional"/>
    <collection field="m_authors" usage="optional" name="authors">
      <value name="author" type="java.lang.String"/>
    </collection>
  </mapping>
  <mapping abstract="true" type-name="tns:type"
class="com.sosnoski.ws.library.jibx2wsdl.Type">
    <value style="element" name="description" field="m_description"
usage="optional"/>
    <value style="element" name="name" field="m_name" usage="optional"/>
    <value style="attribute" name="count" field="m_count"/>
  </mapping>
</binding>
=================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to