Hello all:

I have the following binding.xml file

<?xml version="1.0" encoding="UTF-8"?>
<binding> 
  <namespace prefix="ns" uri="http://foo.com/common/"; /> 
  
  <mapping name="getType1Request" class="com.foo.gettype1.GetType1Request">
    <namespace uri="http://foo.com/getType1/"; default="elements"/>
        
    <value name="param1" ns="http://foo.com/common/"; field="param1" 
usage="required"/>
        
        <structure field="commons" usage="optional" 
type="com.foo.gettype1.CommonListType"/>
  </mapping>
  
  <mapping name="getType1Response" class="com.foo.gettype1.GetType1Response">
    <namespace uri="http://foo.com/common/"; default="elements"/>
        
    <structure field="commons" usage="optional" 
type="com.foo.gettype1.CommonListType"/>
  </mapping>
  
  <mapping name="commons" class="com.foo.gettype1.CommonListType">
    <namespace uri="http://foo.com/getType1/"; default="elements"/>

    <collection field="commonList">       
      <structure name="common" map-as="com.foo.common.CommonType"/>
    </collection>
  </mapping>
  
  <mapping class="com.foo.common.CommonType" abstract="true">
    <namespace prefix="cmn" uri="http://foo.com/common/"/>
    <value name="brandName" field="brandName" usage="optional"/>
  </mapping>

</binding>

When I submit the request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
                  xmlns:foo="http://foo.com/getType1/"; 
                          xmlns:cmn="http://foo.com/common/";>
   <soapenv:Header/>        
   <soapenv:Body>
      <foo:getType1Request>
         <cmn:param1>12</cmn:param1>
         <foo:commons>
            <cmn:common>
               <cmn:brandName>ABrand</cmn:brandName>
            </cmn:common>
         </foo:commons>
      </foo:getType1Request>
   </soapenv:Body>
</soapenv:Envelope>

I receive JiBX unmarshalling exception:

JiBX unmarshalling exception: Expected "{http://foo.com/getType1/}commons"; end 
tag, found "{http://foo.com/common/}common"; start tag (line -1, col -1); nested 
exception ..

Suprisingly, if I remove the cmn:common tag from the request, it works and also 
the response works.  I realize that it is a namespace issue but I can't see the 
forest for the trees.  Can anyone spot my namespace issue in the binding.xml 
file.

Thank you,

Perry Hoekstra

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to