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: 
http://www.nabble.com/file/p18336185/DudeEndpoint.wsdl DudeEndpoint.wsdl 


Any clue? I would really appreciate it.

ameremortal

-- 
View this message in context: 
http://www.nabble.com/Axis2-JiBX---Namespace-not-found-tp18336185p18336185.html
Sent from the jibx-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to