Hi, I have develope a Webservice using http+jsr181 components.

The structure of the Service Assembly is similar to the wsdl-first one, but
when I use client.html to test the webservice, I get an Xfire error:

INFO  - DefaultFaultHandler            - Fault occurred!
org.codehaus.xfire.fault.XFireFault: Not enough message parts were received
for the operation.
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.fillInHolders(ServiceInvocationHandler.java:226)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:71)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:113)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

This is the webservice's WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="AuthenticationService"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:tns="http://webservices.mlopez.es/types";
        xmlns:ns="http://webservices.mlopez.es/";
        xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
        targetNamespace="http://webservices.mlopez.es/"; 
        xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/wsdl:partner-link/";>
  <wsdl:types>
<!--
    <xsd:schema>
      <xsd:import namespace="http://webservices.mlopez.es/types";
schemaLocation="AuthenticationService_schema1.xsd"/>
    </xsd:schema>-->
        <xs:schema targetNamespace="http://webservices.mlopez.es/types";
         elementFormDefault="qualified">

  <xs:element name="Exception">
          <xs:complexType>
                <xs:sequence>
                      <xs:element name="message" type="xs:string" />
                </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="getGruposTrabajoTicket">
          <xs:complexType>
             <xs:sequence>
               <xs:element name="ticketId" type="xs:string"/>
             </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="getGruposTrabajoTicketResponse">
          <xs:complexType>
              <xs:sequence>
                  <xs:element name="return" type="xs:string" />
              </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="getLiferayJSESSIONID">
          <xs:complexType>
              <xs:sequence>
                  <xs:element name="arg0" type="xs:string" />
              </xs:sequence>
           </xs:complexType>
  </xs:element>

  <xs:element name="getLiferayJSESSIONIDResponse">
          <xs:complexType>
                  <xs:sequence>
                        <xs:element name="return" type="xs:string" />
                    </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="getTicket">
          <xs:complexType>
                   <xs:sequence>
                          <xs:element name="username" type="xs:string"/>
                          <xs:element name="password" type="xs:string"/>
                    </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="getTicketResponse">
          <xs:complexType>
              <xs:sequence>
                  <xs:element name="return" type="xs:string" />
              </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="validateTicket">
          <xs:complexType>
                    <xs:sequence>
                              <xs:element name="ticketId" type="xs:string" />
                    </xs:sequence>
          </xs:complexType>
  </xs:element>

  <xs:element name="validateTicketResponse">
          <xs:complexType>
                    <xs:sequence>
                              <xs:element name="return" type="xs:boolean"/>
                    </xs:sequence>
        </xs:complexType> 
 </xs:element>

</xs:schema>
  </wsdl:types>

  <wsdl:message name="getTicket">
    <wsdl:part name="payload" element="tns:getTicket"/>
  </wsdl:message>

  <wsdl:message name="getTicketResponse">
    <wsdl:part name="payload" element="tns:getTicketResponse"/>
  </wsdl:message>

  <wsdl:message name="Exception">
    <wsdl:part name="payload" element="tns:Exception"/>
  </wsdl:message>

  <wsdl:message name="validateTicket">
    <wsdl:part name="payload" element="tns:validateTicket"/>
  </wsdl:message>

  <wsdl:message name="validateTicketResponse">
    <wsdl:part name="payload" element="tns:validateTicketResponse"/>
  </wsdl:message>

  <wsdl:message name="getLiferayJSESSIONID">
    <wsdl:part name="payload" element="tns:getLiferayJSESSIONID"/>
  </wsdl:message>

  <wsdl:message name="getLiferayJSESSIONIDResponse">
    <wsdl:part name="payload" element="tns:getLiferayJSESSIONIDResponse"/>
  </wsdl:message>

  <wsdl:message name="getGruposTrabajoTicket">
    <wsdl:part name="payload" element="tns:getGruposTrabajoTicket"/>
  </wsdl:message>

  <wsdl:message name="getGruposTrabajoTicketResponse">
    <wsdl:part name="payload" element="tns:getGruposTrabajoTicketResponse"/>
  </wsdl:message>

  <wsdl:portType name="Authentication">

    <wsdl:operation name="getTicket">
      <wsdl:input message="ns:getTicket"/>
      <wsdl:output message="ns:getTicketResponse"/>
      <wsdl:fault name="Exception" message="ns:Exception"/>
    </wsdl:operation>

    <wsdl:operation name="validateTicket">
      <wsdl:input message="ns:validateTicket"/>
      <wsdl:output message="ns:validateTicketResponse"/>
    </wsdl:operation>

    <wsdl:operation name="getLiferayJSESSIONID">
      <wsdl:input message="ns:getLiferayJSESSIONID"/>
      <wsdl:output message="ns:getLiferayJSESSIONIDResponse"/>
      <wsdl:fault name="Exception" message="ns:Exception"/>
    </wsdl:operation>

    <wsdl:operation name="getGruposTrabajoTicket">
      <wsdl:input message="ns:getGruposTrabajoTicket"/>
      <wsdl:output message="ns:getGruposTrabajoTicketResponse"/>
      <wsdl:fault name="Exception" message="ns:Exception"/>
    </wsdl:operation>

  </wsdl:portType>

<wsdl:binding name="AuthenticationPortBinding" type="ns:Authentication">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getTicket">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="Exception">
        <soap:fault name="Exception" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="validateTicket">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getLiferayJSESSIONID">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="Exception">
        <soap:fault name="Exception" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getGruposTrabajoTicket">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="Exception">
        <soap:fault name="Exception" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="AuthenticationService">
    <wsdl:port name="AuthenticationPort"
binding="ns:AuthenticationPortBinding">
      <soap:address
location="http://localhost:8080/GruposTrabajoWS/AuthenticationService"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

The jsr181 xbean.xml:

<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";>
    <jsr181:endpoint pojoClass="es.mlopez.webservices.Authentication"           
         
                         wsdlResource="classpath:AuthenticationService.wsdl" 
style="document"/>
</beans>

And finally the soap message:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
              xmlns:tns="http://webservices.mlopez.es/types";>
  <env:Body>
    <tns:getTicket>
      <tns:username>MyUser</tns:username>
      <tns:password>MyPass</tns:password>
    </tns:getTicket>
  </env:Body>
</env:Envelope>

What I'm doing wrong ? Thanks!

-- 
View this message in context: 
http://www.nabble.com/Not-enough-message-parts-were-received-for-the-operation.-tf3374875s12049.html#a9391755
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to