Hi all,
     I got a error when the external client through the (soap over JMS)JMS BC 
to access BPEL service
 (OdeBpleEngine deployed) in servicemix. The error message like " calling 
{http://sitelist.bpel.huhu.com}
 BPEL_SITELIST.BPEL_SITELISTRequest(...)} was unroutable." but use Http BC was 
working fine. 
 The different btween MessageExchanges that Http BC and Jms BC created from the 
same soap message was 
 the "operation" property.
   the correct operation(in this case) should be "process" (Http BC),but Jms BC 
set "BPEL_SITELISTRequest", 
   The debug message list below:

======[Use Http BC]=======
DEBUG - SedaQueue                      - [EMAIL PROTECTED] 
dequeued exchange:
InOut[
  id: ID:csr-cti82mi4hre-1402-1184221637515-3:0
  status: Active
  role: provider
  service: {http://sitelist.bpel.huhu.com}BPEL_SITELIST
  endpoint: BPEL_SITELIST
  operation: {http://sitelist.bpel.huhu.com}process
  in: 
  <?xml version="1.0" encoding="UTF-8"?>
  <BPEL_SITELISTRequest xmlns="http://sitelist.bpel.huhu.com"; 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <input>
      <ns1:customerName xmlns:ns1="http://input.huhu.com";>Merrill 
Lynch</ns1:customerName>
  </input>
  </BPEL_SITELISTRequest>
]

======[Use Jms BC]======
DEBUG - SedaQueue                      - [EMAIL PROTECTED] 
dequeued exchange: 
InOut[
  id: ID:csr-cti82mi4hre-1402-1184221637515-4:0
  status: Active
  role: provider
  service: {http://sitelist.bpel.huhu.com}BPEL_SITELIST
  endpoint: BPEL_SITELIST
  operation: {http://sitelist.bpel.huhu.com}BPEL_SITELISTRequest
  in: 
  <?xml version="1.0" encoding="UTF-8"?>
  <BPEL_SITELISTRequest xmlns="http://sitelist.bpel.huhu.com"; 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <input>
     <ns1:customerName xmlns:ns1="http://input.huhu.com";>Merrill 
Lynch</ns1:customerName>
  </input>
  </BPEL_SITELISTRequest>
]
DEBUG - DeliveryChannelImpl            - Accepting 
ID:csr-cti82mi4hre-1402-1184221637515-4:0 in DeliveryChannel{OdeBpelE
ngine}
ERROR - OdeService                     - ODE MEX {MyRoleMex#327680 [Client 
ID:csr-cti82mi4hre-1402-1184221637515-4:0] ca
lling {http://sitelist.bpel.huhu.com}BPEL_SITELIST.BPEL_SITELISTRequest(...)} 
was unroutable.
====================

 after code debug, I find where cause this issue. In JmsEndpoint 
overrideDefinition(...) method, 
 property "protected Definition definition (in Endpoint.java)" didn't set 
appropriately.

 so,  MultiplexingConsumerProcessor.java -> onMessage(message) -> 
toNMS(message, context) 
 -> soapHelper.onReceive(context) -> SoapHelper.java -> MessageExchange 
onReceive(context) 
 -> findOperation(context) return null and 
          {
          // By default, use name of body element (i.e., RPC-style)
                QName bodyName = context.getInMessage().getBodyName();
                context.setProperty(Context.OPERATION, bodyName);
          }
 
 the error occure at findOperation(context)-> definition = 
endpoint.getDefinition() return null when the 
 JMS BC XBean config file was set : "...soap="true"... 
wsdlResource="repository/SP/BPEL_SITELIST.wsdl"..."

=====JmsEndpoint.java=====
protected void overrideDefinition(Definition def) {
        Service svc = null;
        Port port = null;
        if (targetService != null && targetEndpoint != null) {
            svc = def.getService(targetService);
            port = (svc != null) ? svc.getPort(targetEndpoint) : null;
        } else if (targetService != null) {
            svc = def.getService(targetService);
            if (svc != null) {
                Iterator it = svc.getPorts().values().iterator();
                port = (it.hasNext()) ? (Port) it.next() : null;
            }
        } else if (targetInterfaceName != null) {
            Iterator it = def.getServices().values().iterator();
            svc = it .hasNext() ? (Service) it.next() : null;
            if (svc != null) {
                it = svc.getPorts().values().iterator();
                port = (it.hasNext()) ? (Port) it.next() : null;
            }
        } else {  
            svc = def.getService(service);
            port = (svc != null) ? svc.getPort(endpoint) : null;
        }
        
        if (port != null) {
            port.getExtensibilityElements().clear();
            /*
            if (isSoap()) {
                SOAPAddress address = new SOAPAddressImpl();
                address.setLocationURI(getLocationURI());
                port.addExtensibilityElement(address);
                def.addNamespace("soap", 
"http://schemas.xmlsoap.org/wsdl/soap/";);
            } else {
                HTTPAddress address = new HTTPAddressImpl();
                address.setLocationURI(getLocationURI());
                port.addExtensibilityElement(address);
                def.addNamespace("http", 
"http://schemas.xmlsoap.org/wsdl/http/";);
            }
            */
            // TODO: add binding information
            svc.getPorts().clear();
            svc.addPort(port);
            definition = def;
        }
        
        //Is there any consideration that set definition == null?  add by huhu 
20070718
        if(isSoap()){
            definition = def;
        }
        //end
    }
    


 Thanks,  
-------------------------------------------------------
[EMAIL PROTECTED] 2007-07-19 
^-^ you can call me hu hu!    
I eager to learn, and eager more to share!

Reply via email to