title: JiBX unmarshalling exception in spring ws
body: <p>I am new to Spring WS and JiBX. I have not used annotations. I am getting the following error while using Jibx in Spring WS.</p>
  
  <pre><code>JiBX unmarshalling exception: No unmarshaller for element "{http://www.visu.com/pos/soapws/}orderRequest" (line 1, col 103); nested exception is org.jibx.runtime.JiBXException: No unmarshaller for element "{http://www.visu.com/pos/soapws/}orderRequest"
  </code></pre>
  
  <p>Here is my Endpoint and the spring configuration</p>
  
  <pre><code>public class OrderEndPoint extends AbstractMarshallingPayloadEndpoint{
  
  private Marshaller marshaller;
  private Unmarshaller unmarshaller;
  private OrderService orderService;
  
  public OrderEndPoint(final OrderService orderService, final Marshaller marshaller, final Unmarshaller unmarshaller) {
      super(marshaller);
      super.setUnmarshaller(unmarshaller);
      //this.marshaller = marshaller;
      //this.unmarshaller = unmarshaller;
      this.orderService = orderService;       
      System.out.println("This is Order End point constructor");
  }
  
  @Override
  protected Object invokeInternal(final Object newOrder) throws Exception {
      System.out.println("This is test for Invoke Internal");
      final OrderRequest orderReq = (OrderRequest)newOrder;
      final Order order = orderReq.getOrder();
      this.orderService.placeOrder(order); 
      return "Order with the order number "+order.getOrderNumber()+" saved successfully";
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>&lt;!-- Jibx marshellers --&gt;
  &lt;bean id="unmarshaller" class="org.springframework.oxm.jibx.JibxMarshaller"&gt;
      &lt;property name="targetClass" value="com.visu.pos.soapws.model.OrderRequest"/&gt;
      &lt;property name="bindingName" value="binding"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="marshaller" class="org.springframework.oxm.jibx.JibxMarshaller"&gt;
      &lt;property name="targetClass" value="com.visu.pos.soapws.model.OrderResponse"/&gt;
      &lt;property name="bindingName" value="binding"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Below is the Order.xsd which is used for binding</p>
  
  <pre><code>&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.visu.com/pos/soapws/" elementFormDefault="qualified" targetNamespace="http://www.visu.com/pos/soapws/"&gt;
  
    &lt;xs:element type="tns:orderRequest" name="orderRequest"/&gt;
    &lt;xs:complexType name="orderRequest"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element type="tns:order" name="order" minOccurs="1"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  
    &lt;xs:element type="tns:order" name="order"/&gt;
    &lt;xs:complexType name="order"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="customer" minOccurs="0"&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element type="xs:string" name="firstName" minOccurs="0"/&gt;
              &lt;xs:element type="xs:string" name="lastName" minOccurs="0"/&gt;
              &lt;xs:element type="xs:string" name="middleName" minOccurs="0" maxOccurs="unbounded"/&gt;
            &lt;/xs:sequence&gt;
            &lt;xs:attribute type="xs:long" use="required" name="customerNumber"/&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
        &lt;xs:element type="tns:address" name="billTo" minOccurs="0"/&gt;
        &lt;xs:element name="shipping" minOccurs="0"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:string"&gt;
              &lt;xs:enumeration value="STANDARD_MAIL"/&gt;
              &lt;xs:enumeration value="PRIORITY_MAIL"/&gt;
              &lt;xs:enumeration value="INTERNATIONAL_MAIL"/&gt;
              &lt;xs:enumeration value="DOMESTIC_EXPRESS"/&gt;
              &lt;xs:enumeration value="INTERNATIONAL_EXPRESS"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:element&gt;
        &lt;xs:element type="tns:address" name="shipTo" minOccurs="0"/&gt;
        &lt;xs:element name="item" minOccurs="0" maxOccurs="unbounded"&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element type="xs:string" name="id" minOccurs="0"/&gt;
              &lt;xs:element type="xs:string" name="description" minOccurs="0"/&gt;
            &lt;/xs:sequence&gt;
            &lt;xs:attribute type="xs:int" use="required" name="quantity"/&gt;
            &lt;xs:attribute type="xs:float" use="required" name="price"/&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute type="xs:long" use="required" name="orderNumber"/&gt;
      &lt;xs:attribute type="xs:date" name="orderDate"/&gt;
      &lt;xs:attribute type="xs:date" name="shipDate"/&gt;
      &lt;xs:attribute type="xs:float" name="total"/&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:complexType name="address"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element type="xs:string" name="street1" minOccurs="0"/&gt;
        &lt;xs:element type="xs:string" name="street2" minOccurs="0"/&gt;
        &lt;xs:element type="xs:string" name="city" minOccurs="0"/&gt;
        &lt;xs:element type="xs:string" name="state" minOccurs="0"/&gt;
        &lt;xs:element type="xs:string" name="postCode" minOccurs="0"/&gt;
        &lt;xs:element type="xs:string" name="country" minOccurs="0"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:complexType name="orderResponse"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element type="xs:string" name="orderResponse" minOccurs="0"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:element type="tns:orderResponse" name="orderResponse"/&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>Verified on the net that the Jibx implementation does not need Marshaller and Unmarshaller separately. Though I declared the marshaller it is throwing this error. I tried all options available but to no use. Please help in this regard. Thanks in advance!!</p>