Axis2-JiBX - Namespace not found

View: New views
1 Messages — Rating Filter:   Alert me  

Axis2-JiBX - Namespace not found

by ameremortal () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I am using Axis2 with JiBX binding and getting the following exception at the moment the JiBXDataSource is initialized.

java.lang.IllegalStateException: Namespace not found
        at org.apache.axis2.jibx.JiBXDataSource.<init>(JiBXDataSource.java:142)

This exception is thrown at client side, which is calling the deployed service. I was using jibx-run-1.1.5.jar that was coming with Axis2 1.4 distribution for both generation of binding code and the running of code. I have also tried to use the later version of JiBX, but the result was the same.

I cannot figure out what is going wrong. I've even started to debug the JiBX code, but still cannot figure out what may go wrong. Plz help.

This is my mapping file for two Java classes Dude.java and Mate.java:

<?xml version="1.0" encoding="UTF-8"?>
<binding force-classes="true" xmlns:ax21="http://types.sei.ws.abnamro.com/xsd">-

  <mapping  abstract="true" class="com.abnamro.ws.sei.types.Dude" type-name="ax21:Dude">
   <namespace uri="http://types.sei.ws.abnamro.com/xsd" prefix="dude"/>
    <value name="name" field="name" usage="required"/>
    <value name="status" field="status" usage="required"/>
    <value name="gang" field="gang" usage="required"/>
  </mapping>
   
  <mapping abstract="true" class="com.abnamro.ws.sei.types.Mate" type-name="ax21:Mate">
    <namespace uri="http://types.sei.ws.abnamro.com/xsd" prefix="dude"/>
    <value name="nickname" field="nickname" usage="required"/>
    <value name="location" field="location" usage="required"/>
    <value name="occupation" field="occupation" usage="required"/>
  </mapping>
</binding>

I use WSDL to generate the WS artifacts. Here is my ant task (please note, I am using unwrapping):

<target name="wsdl2java" depends="clean.axis2, prepare.axis2, compile">  
                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
            <classpath refid="axis.classpath"/>
            <arg line="-uri ${wsdl.dir}\DudeEndpoint.wsdl"/>
            <arg line="-s"/>
            <arg line="-ss"/>
            <arg line="-uw"/>
            <arg line="-sd"/>
            <arg line="-ssi"/>
            <arg line="-ap"/>
            <arg line="-ns2p http://types.sei.ws.abnamro.com/xsd=com.abnamro.ws.sei.xsd"/>
            <arg line="-l java"/>
            <arg line="-p com.abnamro.ws.sei"/>
            <arg line="-d jibx"/>
            <arg line="-o ${axis2.build.dir}"/>
            <arg line="-Ebindingfile ${jibx.binding.file}"/>
        </java>
        </target>

I do compile JiBX binding into the compiled Dude.class and Mate.class and have all the auto-generated JiBX classes.

This is my WSDL file: DudeEndpoint.wsdl


Any clue? I would really appreciate it.

ameremortal