You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sylvester <sy...@gmail.com> on 2009/01/31 05:06:24 UTC

CXF- specified for routing, but can't find it registered error

Hi,
I've run into a problem with CXF today. I have a CXF BC communicating 
with a CXF SE. No problem building and deploying. I can see the wsdl in 
the browser as well. I am using smx 3.2.3 for this.

My cxf bc xbean is:

beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
    xmlns:myservice="http://example.com/exampleService"
    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <cxfbc:consumer wsdl="classpath:service.wsdl"
        targetService="myservice:ExampleService" />

</beans>

CXF se xbean:

<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <cxfse:endpoint>
        <cxfse:pojo>
          <bean class="com.ExampleService" />
        </cxfse:pojo>
    </cxfse:endpoint>

</beans>
and com.ExampleService is annotated as:

@WebService(name = "ExampleService", targetNamespace = 
"http://example.com/exampleService")
public class ExampleService {

    @WebMethod
    public String getHighLevelBusinessFlow (String CIId, String StateId){
...
}

I generated the wsdl using the .class file from the target folder of my 
SE with the java2ws utility that came with my CXF 2.1.3.

The response to my soap request is like:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring><![CDATA[Could not find route for exchange: InOut[
  id: ID:blah-blah-
  status: Active
  role: provider
  service: {http://example.com/exampleService}ExampleService
  operation: {http://example.com/exampleService}getHighLevelBusinessFlow
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
xmlns:msg="http://example.com/exampleService" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
name="getHighLevelBusinessFlow" type="msg:getHighLevelBusinessFlow" 
version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
xmlns:exam="http://example.com/exampleService">
         <!--Optional:-->
         <arg0 xmlns="">1</arg0>
         <!--Optional:-->
         <arg1 xmlns="">2</arg1>
      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
] for service: {http://example.com/exampleService}ExampleService and 
interface: null]]></faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

I see:

] for service: {http://example.com/exampleService}ExampleService and 
interface:
null
        at 
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
eMessage(CxfBcConsumer.java:608)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:220)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
st(JettyHTTPDestination.java:278)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
ttyHTTPDestination.java:252)

and the log has:
 qtp0-0     | DefaultBroker            | rvicemix.jbi.nmr.DefaultBroker  
344 | ServiceName ({http://example.com/exampleService}ExampleService) 
specified for routing, but can't find it registered

I tried changing the targetNamespace  and the name but that didn't work 
either. What could be going wrong?

Thanks,
Sylvester



Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester Steele <sy...@gmail.com>.


Freeman Fang wrote:
> 
>      targetService="myservice:ExampleService" />
> Hi,
> Also add
> targetInterface="myservice:ExampleService"
> for your cxf bc consumer configuration
> Freeman
> 

Freeman,
I did this but it still shows me the same error. NOTE: The class which gets
called does not implement any interface.

Sylvester
-- 
View this message in context: http://www.nabble.com/CXF--specified-for-routing%2C-but-can%27t-find-it-registered-error-tp21759798p21787195.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Sylvester wrote:
> Freeman,
> I was using smx 3.2.3 earlier, just tried it with 3.2.1 and I get a 
> different error.
>
> ERROR - CxfSeComponent                 - Error processing exchange InOut[
>  id: ID:192.168.2.79-11f360dcc63-12:0
>  status: Active
>  role: provider
>  service: {http://example.com/exampleService}ExampleService
>  endpoint: ExampleServicePort
>  operation: {http://example.com/exampleService}sayHello
>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
> xmlns:msg="http://example.com/exampleService" name="sayHello" 
> type="msg:sayHello" version="1.0"><jbi:part><exam:sayHello 
> xmlns:exam="http://example.com/exampleService">
>         <!--Optional:-->
>         <arg0>qw</arg0>
>      </exam:sayHello></jbi:part></jbi:message>
> ]
> java.lang.NullPointerException
>    at 
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:180)
>    at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538) 
>
>    at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490) 
>
>    at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) 
>
>    at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610) 
>
>    at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170) 
>
>    at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167) 
>
>    at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) 
>
>    at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) 
>
>    at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) 
>
>    at java.lang.Thread.run(Thread.java:595)
>
> smx 3.2.1writes to the log as well.
>
> Sylvester
>
> Freeman Fang wrote:
>> Sylvester wrote:
>>> Nothing in the servicemix.log file, but it shows me this big 
>>> stacktrace:
>>>
>>> Feb 2, 2009 1:26:42 PM 
>>> org.apache.cxf.transport.jbi.JBITransportFactory setDeliv
>>> eryChannel
>>> INFO: configuring DeliveryChannel:      
>>> org.apache.servicemix.common.EndpointDel
>>> iveryChannel@f45ec3
>>> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
>>> doIntercept
>>> INFO: Interceptor has thrown exception, unwinding now
>>> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
>>> element (uri:"
>>> http://example.com/exampleService", local:"blah"). Expected elem
>>> ents are (none)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:631)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:532)
>>>        at 
>>> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>>>        at 
>>> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
>>> Message(JBIWrapperInInterceptor.java:124)
>>>        at 
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>> orChain.java:220)
>>>        at 
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>> ationObserver.java:77)
>>>        at 
>>> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
>>> Util.java:156)
>>>        at 
>>> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
>>> 284)
>>>        at 
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>>> feCycle.java:538)
>>>        at 
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>>> BaseLifeCycle.java:490)
>>>        at 
>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>>> Cycle.java:46)
>>>        at 
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>>> d(DeliveryChannelImpl.java:620)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>>> w.java:172)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>>> ava:167)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>>> a:134)
>>>        at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>>> utor.java:650)
>>>        at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>>> .java:675)
>>>        at java.lang.Thread.run(Thread.java:595)
>>> Caused by: javax.xml.bind.UnmarshalException
>>> - with linked exception:
>>> [javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://example.com/
>>> exampleService", local:"blah"). Expected elements are (none)]
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
>>> mException(UnmarshallerImpl.java:400)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>>> UnmarshallerImpl.java:339)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
>>> nmarshallerImpl.java:309)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:616)
>>>        ... 17 more
>>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://ex
>>> ample.com/exampleService", local:"blah"). Expected elements are
>>> (none)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
>>> vent(UnmarshallingContext.java:525)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>>> va:199)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>>> va:194)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
>>> Element(Loader.java:71)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
>>> RootLoader.childElement(UnmarshallingContext.java:922)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
>>> lement(UnmarshallingContext.java:366)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
>>> ement(UnmarshallingContext.java:347)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
>>> ment(InterningXmlVisitor.java:35)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
>>> artElement(StAXStreamConnector.java:201)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
>>> tAXStreamConnector.java:135)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>>> UnmarshallerImpl.java:337)
>>>        ... 19 more
>>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://ex
>>> ample.com/exampleService", local:"blah"). Expected elements are
>>> (none)
>>>        ... 30 more
>>> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
>>> doIntercept
>>> INFO: Interceptor has thrown exception, unwinding now
>>> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
>>> element (uri:"
>>> http://example.com/exampleService", local:"blah"). Expected elem
>>> ents are (none)
>>>        at 
>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
>>> andleMessage(CxfBcConsumer.java:626)
>>>        at 
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>> orChain.java:220)
>>>        at 
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>> ationObserver.java:77)
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>>> st(JettyHTTPDestination.java:278)
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>>> ttyHTTPDestination.java:252)
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
>>> Handler.java:70)
>>>        at 
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
>>> 57)
>>>        at 
>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
>>> lerCollection.java:206)
>>>        at 
>>> org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
>>>        at 
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
>>> 52)
>>>        at org.mortbay.jetty.Server.handle(Server.java:324)
>>>        at 
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
>>> 2)
>>>        at 
>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
>>> n.java:840)
>>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:657)
>>>        at 
>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>        at 
>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:377)
>>>        at 
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
>>> va:409)
>>>        at 
>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
>>> ava:497)
>>> Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
>>> unexpected ele
>>> ment (uri:"http://example.com/exampleService", local:"blah"). Ex
>>> pected elements are (none)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:631)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:532)
>>>        at 
>>> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>>>        at 
>>> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
>>> Message(JBIWrapperInInterceptor.java:124)
>>>        at 
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>> orChain.java:220)
>>>        at 
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>> ationObserver.java:77)
>>>        at 
>>> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
>>> Util.java:156)
>>>        at 
>>> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
>>> 284)
>>>        at 
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>>> feCycle.java:538)
>>>        at 
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>>> BaseLifeCycle.java:490)
>>>        at 
>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>>> Cycle.java:46)
>>>        at 
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>>> d(DeliveryChannelImpl.java:620)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>>> w.java:172)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>>> ava:167)
>>>        at 
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>>> a:134)
>>>        at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>>> utor.java:650)
>>>        at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>>> .java:675)
>>>        at java.lang.Thread.run(Thread.java:595)
>>> Caused by: javax.xml.bind.UnmarshalException
>>> - with linked exception:
>>> [javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://example.com/
>>> exampleService", local:"blah"). Expected elements are (none)]
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
>>> mException(UnmarshallerImpl.java:400)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>>> UnmarshallerImpl.java:339)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
>>> nmarshallerImpl.java:309)
>>>        at 
>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>>> java:616)
>>>        ... 17 more
>>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://ex
>>> ample.com/exampleService", local:"blah"). Expected elements are
>>> (none)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
>>> vent(UnmarshallingContext.java:525)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>>> va:199)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>>> va:194)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
>>> Element(Loader.java:71)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
>>> RootLoader.childElement(UnmarshallingContext.java:922)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
>>> lement(UnmarshallingContext.java:366)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
>>> ement(UnmarshallingContext.java:347)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
>>> ment(InterningXmlVisitor.java:35)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
>>> artElement(StAXStreamConnector.java:201)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
>>> tAXStreamConnector.java:135)
>>>        at 
>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>>> UnmarshallerImpl.java:337)
>>>        ... 19 more
>>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>>> (uri:"http://ex
>>> ample.com/exampleService", local:"blah"). Expected elements are
>>> (none)
>>>        ... 30 more
>>>
>>>
>>> Sylvester
>>>
>>> Freeman Fang wrote:
>>>> Any exception you get from the log also?
>>>> Freeman
>>>>
>>>> Sylvester wrote:
>>>>> Hi,
>>>>> Well I managed to figure this one out. In the @Webservice tag I 
>>>>> was using (maven generated this, but it doesn't work) name= "blah" 
>>>>> I just changed it to serviceName= "blah" and this error went away. 
>>>>> However I am still stuck. I can deploy the service etc. but when I 
>>>>> send a message I get:
>>>>>
>>>>> <soap:Envelope 
>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>>   <soap:Body>
>>>>>      <soap:Fault>
>>>>>         <faultcode>soap:Server</faultcode>
>>>>>         <faultstring>Unmarshalling Error: unexpected element 
>>>>> (uri:"http://example.com/exampleService", local:"sayHello"). 
>>>>> Expected elements are (none)</faultstring>
>>>>>      </soap:Fault>
>>>>>   </soap:Body>
>>>>> </soap:Envelope>
>>>>>
>>>>> and the class which gets invoked is:
>>>>>
>> You said you set the serviceName as "blah", but here in the 
>> annotation it's serviceName = "ExampleService", I'm confused, do I 
>> miss sometthing?
>>>>>
>>>>> @WebService(serviceName = "ExampleService", targetNamespace = 
>>>>> "http://example.com/exampleService")
>>>>> public class ExampleService {
>>>>>
>>>>>    @WebMethod
>>>>>    public String sayHello(String name) {
>>>>>        return "Hello "+name;
>>>>>    }
>>>>> }
>>>>>
>>>>> I generated the wsdl using the java2ws tool that comes with cxf. 
>>>>> The wsdl is:
>>>>>
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <wsdl:definitions name="ExampleService"
>>>>>    targetNamespace="http://example.com/exampleService"
>>>>>    xmlns:tns="http://example.com/exampleService"
>>>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>>>>>    <wsdl:types>
>>>>>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>>            xmlns:tns="http://example.com/exampleService"
>>>>>            attributeFormDefault="unqualified" 
>>>>> elementFormDefault="unqualified"
>>>>>            targetNamespace="http://example.com/exampleService">
>>>>>            <xs:element name="sayHello" type="tns:sayHello" />
>>>>>            <xs:element name="sayHelloResponse"
>>>>>                type="tns:sayHelloResponse" />
>>>>>            <xs:complexType name="sayHello">
>>>>>                <xs:sequence>
>>>>>                    <xs:element minOccurs="0" name="arg0"
>>>>>                        type="xs:string" />
>>>>>                </xs:sequence>
>>>>>            </xs:complexType>
>>>>>            <xs:complexType name="sayHelloResponse">
>>>>>                <xs:sequence>
>>>>>                    <xs:element minOccurs="0" name="return"
>>>>>                        type="xs:string" />
>>>>>                </xs:sequence>
>>>>>            </xs:complexType>
>>>>>        </xs:schema>
>>>>>    </wsdl:types>
>>>>>    <wsdl:message name="sayHelloResponse">
>>>>>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>>>>>        </wsdl:part>
>>>>>    </wsdl:message>
>>>>>    <wsdl:message name="sayHello">
>>>>>        <wsdl:part name="parameters" 
>>>>> element="tns:sayHello"></wsdl:part>
>>>>>    </wsdl:message>
>>>>>    <wsdl:portType name="ExampleService">
>>>>>        <wsdl:operation name="sayHello">
>>>>>            <wsdl:input name="sayHello" message="tns:sayHello">
>>>>>            </wsdl:input>
>>>>>            <wsdl:output name="sayHelloResponse"
>>>>>                message="tns:sayHelloResponse">
>>>>>            </wsdl:output>
>>>>>        </wsdl:operation>
>>>>>    </wsdl:portType>
>>>>>    <wsdl:binding name="ExampleServiceSoapBinding"
>>>>>        type="tns:ExampleService">
>>>>>        <soap:binding style="document"
>>>>>            transport="http://schemas.xmlsoap.org/soap/http" />
>>>>>        <wsdl:operation name="sayHello">
>>>>>            <soap:operation soapAction="" style="document" />
>>>>>            <wsdl:input name="sayHello">
>>>>>                <soap:body use="literal" />
>>>>>            </wsdl:input>
>>>>>            <wsdl:output name="sayHelloResponse">
>>>>>                <soap:body use="literal" />
>>>>>            </wsdl:output>
>>>>>        </wsdl:operation>
>>>>>    </wsdl:binding>
>>>>>    <wsdl:service name="ExampleService">
>>>>>        <wsdl:port name="ExampleServicePort"
>>>>>            binding="tns:ExampleServiceSoapBinding">
>>>>>            <soap:address
>>>>>                location="http://localhost:9090/ExampleServicePort" />
>>>>>        </wsdl:port>
>>>>>    </wsdl:service>
>>>>> </wsdl:definitions>
>>>>>
>>>>> Adding operation name or web param etc didn't help either.
>>>>>
>>>>> Thanks,
>>>>> Sylvester
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Would you append your wsdl also?
>>>>>> Freeman
>>>>>>
>>>>>> Sylvester wrote:
>>>>>>> Hi,
>>>>>>> I've run into a problem with CXF today. I have a CXF BC 
>>>>>>> communicating with a CXF SE. No problem building and deploying. 
>>>>>>> I can see the wsdl in the browser as well. I am using smx 3.2.3 
>>>>>>> for this.
>>>>>>>
>>>>>>> My cxf bc xbean is:
>>>>>>>
>>>>>>> beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>    xmlns:myservice="http://example.com/exampleService"
>>>>>>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>>>>>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>>>>>       http://www.springframework.org/schema/beans 
>>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>>>
>>>>>>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>>>>>>        targetService="myservice:ExampleService" />
Hi,
Also add
targetInterface="myservice:ExampleService"
for your cxf bc consumer configuration
Freeman
>>>>>>>
>>>>>>> </beans>
>>>>>>>
>>>>>>> CXF se xbean:
>>>>>>>
>>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>>>       xmlns="http://www.springframework.org/schema/beans"
>>>>>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>>>>>>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>>>>>>       http://www.springframework.org/schema/beans 
>>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>>>
>>>>>>>    <cxfse:endpoint>
>>>>>>>        <cxfse:pojo>
>>>>>>>          <bean class="com.ExampleService" />
>>>>>>>        </cxfse:pojo>
>>>>>>>    </cxfse:endpoint>
>>>>>>>
>>>>>>> </beans>
>>>>>>> and com.ExampleService is annotated as:
>>>>>>>
>>>>>>> @WebService(name = "ExampleService", targetNamespace = 
>>>>>>> "http://example.com/exampleService")
>>>>>>> public class ExampleService {
>>>>>>>
>>>>>>>    @WebMethod
>>>>>>>    public String getHighLevelBusinessFlow (String CIId, String 
>>>>>>> StateId){
>>>>>>> ...
>>>>>>> }
>>>>>>>
>>>>>>> I generated the wsdl using the .class file from the target 
>>>>>>> folder of my SE with the java2ws utility that came with my CXF 
>>>>>>> 2.1.3.
>>>>>>>
>>>>>>> The response to my soap request is like:
>>>>>>>
>>>>>>> <soap:Envelope 
>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>>>>   <soap:Body>
>>>>>>>      <soap:Fault>
>>>>>>>         <faultcode>soap:Server</faultcode>
>>>>>>>         <faultstring><![CDATA[Could not find route for exchange: 
>>>>>>> InOut[
>>>>>>>  id: ID:blah-blah-
>>>>>>>  status: Active
>>>>>>>  role: provider
>>>>>>>  service: {http://example.com/exampleService}ExampleService
>>>>>>>  operation: 
>>>>>>> {http://example.com/exampleService}getHighLevelBusinessFlow
>>>>>>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>>>>>>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>>>>>>> xmlns:msg="http://example.com/exampleService" 
>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>>>>>> name="getHighLevelBusinessFlow" 
>>>>>>> type="msg:getHighLevelBusinessFlow" 
>>>>>>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>>>>>>> xmlns:exam="http://example.com/exampleService">
>>>>>>>         <!--Optional:-->
>>>>>>>         <arg0 xmlns="">1</arg0>
>>>>>>>         <!--Optional:-->
>>>>>>>         <arg1 xmlns="">2</arg1>
>>>>>>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>>>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>>>> and interface: null]]></faultstring>
>>>>>>>      </soap:Fault>
>>>>>>>   </soap:Body>
>>>>>>> </soap:Envelope>
>>>>>>>
>>>>>>> I see:
>>>>>>>
>>>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>>>> and interface:
>>>>>>> null
>>>>>>>        at 
>>>>>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl 
>>>>>>>
>>>>>>> eMessage(CxfBcConsumer.java:608)
>>>>>>>        at 
>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
>>>>>>> ./wsdl-first-cxfbc-su/src/main/resources/xbean.xml
>>>>>>> orChain.java:220)
>>>>>>>        at 
>>>>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti 
>>>>>>>
>>>>>>> ationObserver.java:77)
>>>>>>>        at 
>>>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque 
>>>>>>>
>>>>>>> st(JettyHTTPDestination.java:278)
>>>>>>>        at 
>>>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je 
>>>>>>>
>>>>>>> ttyHTTPDestination.java:252)
>>>>>>>
>>>>>>> and the log has:
>>>>>>> qtp0-0     | DefaultBroker            | 
>>>>>>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>>>>>>> ({http://example.com/exampleService}ExampleService) specified 
>>>>>>> for routing, but can't find it registered
>>>>>>>
>>>>>>> I tried changing the targetNamespace  and the name but that 
>>>>>>> didn't work either. What could be going wrong?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Sylvester
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Freeman,
I was using smx 3.2.3 earlier, just tried it with 3.2.1 and I get a 
different error.

ERROR - CxfSeComponent                 - Error processing exchange InOut[
  id: ID:192.168.2.79-11f360dcc63-12:0
  status: Active
  role: provider
  service: {http://example.com/exampleService}ExampleService
  endpoint: ExampleServicePort
  operation: {http://example.com/exampleService}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
xmlns:msg="http://example.com/exampleService" name="sayHello" 
type="msg:sayHello" version="1.0"><jbi:part><exam:sayHello 
xmlns:exam="http://example.com/exampleService">
         <!--Optional:-->
         <arg0>qw</arg0>
      </exam:sayHello></jbi:part></jbi:message>
]
java.lang.NullPointerException
    at 
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:180)
    at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
    at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
    at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
    at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
    at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
    at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
    at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)

smx 3.2.1writes to the log as well.

Sylvester

Freeman Fang wrote:
> Sylvester wrote:
>> Nothing in the servicemix.log file, but it shows me this big stacktrace:
>>
>> Feb 2, 2009 1:26:42 PM 
>> org.apache.cxf.transport.jbi.JBITransportFactory setDeliv
>> eryChannel
>> INFO: configuring DeliveryChannel:      
>> org.apache.servicemix.common.EndpointDel
>> iveryChannel@f45ec3
>> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
>> doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
>> element (uri:"
>> http://example.com/exampleService", local:"blah"). Expected elem
>> ents are (none)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:631)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:532)
>>        at 
>> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>>        at 
>> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
>> Message(JBIWrapperInInterceptor.java:124)
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>> orChain.java:220)
>>        at 
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>> ationObserver.java:77)
>>        at 
>> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
>> Util.java:156)
>>        at 
>> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
>> 284)
>>        at 
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>        at 
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>        at 
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>        at 
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:620)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>        at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>        at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>        at java.lang.Thread.run(Thread.java:595)
>> Caused by: javax.xml.bind.UnmarshalException
>> - with linked exception:
>> [javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://example.com/
>> exampleService", local:"blah"). Expected elements are (none)]
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
>> mException(UnmarshallerImpl.java:400)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>> UnmarshallerImpl.java:339)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
>> nmarshallerImpl.java:309)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:616)
>>        ... 17 more
>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://ex
>> ample.com/exampleService", local:"blah"). Expected elements are
>> (none)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
>> vent(UnmarshallingContext.java:525)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>> va:199)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>> va:194)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
>> Element(Loader.java:71)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
>> RootLoader.childElement(UnmarshallingContext.java:922)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
>> lement(UnmarshallingContext.java:366)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
>> ement(UnmarshallingContext.java:347)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
>> ment(InterningXmlVisitor.java:35)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
>> artElement(StAXStreamConnector.java:201)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
>> tAXStreamConnector.java:135)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>> UnmarshallerImpl.java:337)
>>        ... 19 more
>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://ex
>> ample.com/exampleService", local:"blah"). Expected elements are
>> (none)
>>        ... 30 more
>> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
>> doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
>> element (uri:"
>> http://example.com/exampleService", local:"blah"). Expected elem
>> ents are (none)
>>        at 
>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
>> andleMessage(CxfBcConsumer.java:626)
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>> orChain.java:220)
>>        at 
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>> ationObserver.java:77)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>> st(JettyHTTPDestination.java:278)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>> ttyHTTPDestination.java:252)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
>> Handler.java:70)
>>        at 
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
>> 57)
>>        at 
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
>> lerCollection.java:206)
>>        at 
>> org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
>>        at 
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
>> 52)
>>        at org.mortbay.jetty.Server.handle(Server.java:324)
>>        at 
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
>> 2)
>>        at 
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
>> n.java:840)
>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:657)
>>        at 
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>        at 
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:377)
>>        at 
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
>> va:409)
>>        at 
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
>> ava:497)
>> Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
>> unexpected ele
>> ment (uri:"http://example.com/exampleService", local:"blah"). Ex
>> pected elements are (none)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:631)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:532)
>>        at 
>> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>>        at 
>> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
>> Message(JBIWrapperInInterceptor.java:124)
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>> orChain.java:220)
>>        at 
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>> ationObserver.java:77)
>>        at 
>> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
>> Util.java:156)
>>        at 
>> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
>> 284)
>>        at 
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:538)
>>        at 
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:490)
>>        at 
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
>> Cycle.java:46)
>>        at 
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:620)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:167)
>>        at 
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>        at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>        at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>        at java.lang.Thread.run(Thread.java:595)
>> Caused by: javax.xml.bind.UnmarshalException
>> - with linked exception:
>> [javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://example.com/
>> exampleService", local:"blah"). Expected elements are (none)]
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
>> mException(UnmarshallerImpl.java:400)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>> UnmarshallerImpl.java:339)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
>> nmarshallerImpl.java:309)
>>        at 
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
>> java:616)
>>        ... 17 more
>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://ex
>> ample.com/exampleService", local:"blah"). Expected elements are
>> (none)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
>> vent(UnmarshallingContext.java:525)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>> va:199)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
>> va:194)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
>> Element(Loader.java:71)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
>> RootLoader.childElement(UnmarshallingContext.java:922)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
>> lement(UnmarshallingContext.java:366)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
>> ement(UnmarshallingContext.java:347)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
>> ment(InterningXmlVisitor.java:35)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
>> artElement(StAXStreamConnector.java:201)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
>> tAXStreamConnector.java:135)
>>        at 
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
>> UnmarshallerImpl.java:337)
>>        ... 19 more
>> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
>> (uri:"http://ex
>> ample.com/exampleService", local:"blah"). Expected elements are
>> (none)
>>        ... 30 more
>>
>>
>> Sylvester
>>
>> Freeman Fang wrote:
>>> Any exception you get from the log also?
>>> Freeman
>>>
>>> Sylvester wrote:
>>>> Hi,
>>>> Well I managed to figure this one out. In the @Webservice tag I was 
>>>> using (maven generated this, but it doesn't work) name= "blah" I 
>>>> just changed it to serviceName= "blah" and this error went away. 
>>>> However I am still stuck. I can deploy the service etc. but when I 
>>>> send a message I get:
>>>>
>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>   <soap:Body>
>>>>      <soap:Fault>
>>>>         <faultcode>soap:Server</faultcode>
>>>>         <faultstring>Unmarshalling Error: unexpected element 
>>>> (uri:"http://example.com/exampleService", local:"sayHello"). 
>>>> Expected elements are (none)</faultstring>
>>>>      </soap:Fault>
>>>>   </soap:Body>
>>>> </soap:Envelope>
>>>>
>>>> and the class which gets invoked is:
>>>>
> You said you set the serviceName as "blah", but here in the annotation 
> it's serviceName = "ExampleService", I'm confused, do I miss sometthing?
>>>>
>>>> @WebService(serviceName = "ExampleService", targetNamespace = 
>>>> "http://example.com/exampleService")
>>>> public class ExampleService {
>>>>
>>>>    @WebMethod
>>>>    public String sayHello(String name) {
>>>>        return "Hello "+name;
>>>>    }
>>>> }
>>>>
>>>> I generated the wsdl using the java2ws tool that comes with cxf. 
>>>> The wsdl is:
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <wsdl:definitions name="ExampleService"
>>>>    targetNamespace="http://example.com/exampleService"
>>>>    xmlns:tns="http://example.com/exampleService"
>>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>>>>    <wsdl:types>
>>>>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>            xmlns:tns="http://example.com/exampleService"
>>>>            attributeFormDefault="unqualified" 
>>>> elementFormDefault="unqualified"
>>>>            targetNamespace="http://example.com/exampleService">
>>>>            <xs:element name="sayHello" type="tns:sayHello" />
>>>>            <xs:element name="sayHelloResponse"
>>>>                type="tns:sayHelloResponse" />
>>>>            <xs:complexType name="sayHello">
>>>>                <xs:sequence>
>>>>                    <xs:element minOccurs="0" name="arg0"
>>>>                        type="xs:string" />
>>>>                </xs:sequence>
>>>>            </xs:complexType>
>>>>            <xs:complexType name="sayHelloResponse">
>>>>                <xs:sequence>
>>>>                    <xs:element minOccurs="0" name="return"
>>>>                        type="xs:string" />
>>>>                </xs:sequence>
>>>>            </xs:complexType>
>>>>        </xs:schema>
>>>>    </wsdl:types>
>>>>    <wsdl:message name="sayHelloResponse">
>>>>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>>>>        </wsdl:part>
>>>>    </wsdl:message>
>>>>    <wsdl:message name="sayHello">
>>>>        <wsdl:part name="parameters" 
>>>> element="tns:sayHello"></wsdl:part>
>>>>    </wsdl:message>
>>>>    <wsdl:portType name="ExampleService">
>>>>        <wsdl:operation name="sayHello">
>>>>            <wsdl:input name="sayHello" message="tns:sayHello">
>>>>            </wsdl:input>
>>>>            <wsdl:output name="sayHelloResponse"
>>>>                message="tns:sayHelloResponse">
>>>>            </wsdl:output>
>>>>        </wsdl:operation>
>>>>    </wsdl:portType>
>>>>    <wsdl:binding name="ExampleServiceSoapBinding"
>>>>        type="tns:ExampleService">
>>>>        <soap:binding style="document"
>>>>            transport="http://schemas.xmlsoap.org/soap/http" />
>>>>        <wsdl:operation name="sayHello">
>>>>            <soap:operation soapAction="" style="document" />
>>>>            <wsdl:input name="sayHello">
>>>>                <soap:body use="literal" />
>>>>            </wsdl:input>
>>>>            <wsdl:output name="sayHelloResponse">
>>>>                <soap:body use="literal" />
>>>>            </wsdl:output>
>>>>        </wsdl:operation>
>>>>    </wsdl:binding>
>>>>    <wsdl:service name="ExampleService">
>>>>        <wsdl:port name="ExampleServicePort"
>>>>            binding="tns:ExampleServiceSoapBinding">
>>>>            <soap:address
>>>>                location="http://localhost:9090/ExampleServicePort" />
>>>>        </wsdl:port>
>>>>    </wsdl:service>
>>>> </wsdl:definitions>
>>>>
>>>> Adding operation name or web param etc didn't help either.
>>>>
>>>> Thanks,
>>>> Sylvester
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>> Hi,
>>>>>
>>>>> Would you append your wsdl also?
>>>>> Freeman
>>>>>
>>>>> Sylvester wrote:
>>>>>> Hi,
>>>>>> I've run into a problem with CXF today. I have a CXF BC 
>>>>>> communicating with a CXF SE. No problem building and deploying. I 
>>>>>> can see the wsdl in the browser as well. I am using smx 3.2.3 for 
>>>>>> this.
>>>>>>
>>>>>> My cxf bc xbean is:
>>>>>>
>>>>>> beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>>    xmlns:myservice="http://example.com/exampleService"
>>>>>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>>>>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>>>>       http://www.springframework.org/schema/beans 
>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>>
>>>>>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>>>>>        targetService="myservice:ExampleService" />
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>> CXF se xbean:
>>>>>>
>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>>       xmlns="http://www.springframework.org/schema/beans"
>>>>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>>>>>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>>>>>       http://www.springframework.org/schema/beans 
>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>>
>>>>>>    <cxfse:endpoint>
>>>>>>        <cxfse:pojo>
>>>>>>          <bean class="com.ExampleService" />
>>>>>>        </cxfse:pojo>
>>>>>>    </cxfse:endpoint>
>>>>>>
>>>>>> </beans>
>>>>>> and com.ExampleService is annotated as:
>>>>>>
>>>>>> @WebService(name = "ExampleService", targetNamespace = 
>>>>>> "http://example.com/exampleService")
>>>>>> public class ExampleService {
>>>>>>
>>>>>>    @WebMethod
>>>>>>    public String getHighLevelBusinessFlow (String CIId, String 
>>>>>> StateId){
>>>>>> ...
>>>>>> }
>>>>>>
>>>>>> I generated the wsdl using the .class file from the target folder 
>>>>>> of my SE with the java2ws utility that came with my CXF 2.1.3.
>>>>>>
>>>>>> The response to my soap request is like:
>>>>>>
>>>>>> <soap:Envelope 
>>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>>>   <soap:Body>
>>>>>>      <soap:Fault>
>>>>>>         <faultcode>soap:Server</faultcode>
>>>>>>         <faultstring><![CDATA[Could not find route for exchange: 
>>>>>> InOut[
>>>>>>  id: ID:blah-blah-
>>>>>>  status: Active
>>>>>>  role: provider
>>>>>>  service: {http://example.com/exampleService}ExampleService
>>>>>>  operation: 
>>>>>> {http://example.com/exampleService}getHighLevelBusinessFlow
>>>>>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>>>>>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>>>>>> xmlns:msg="http://example.com/exampleService" 
>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>>>>> name="getHighLevelBusinessFlow" 
>>>>>> type="msg:getHighLevelBusinessFlow" 
>>>>>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>>>>>> xmlns:exam="http://example.com/exampleService">
>>>>>>         <!--Optional:-->
>>>>>>         <arg0 xmlns="">1</arg0>
>>>>>>         <!--Optional:-->
>>>>>>         <arg1 xmlns="">2</arg1>
>>>>>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>>> and interface: null]]></faultstring>
>>>>>>      </soap:Fault>
>>>>>>   </soap:Body>
>>>>>> </soap:Envelope>
>>>>>>
>>>>>> I see:
>>>>>>
>>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>>> and interface:
>>>>>> null
>>>>>>        at 
>>>>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl 
>>>>>>
>>>>>> eMessage(CxfBcConsumer.java:608)
>>>>>>        at 
>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
>>>>>>
>>>>>> orChain.java:220)
>>>>>>        at 
>>>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti 
>>>>>>
>>>>>> ationObserver.java:77)
>>>>>>        at 
>>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque 
>>>>>>
>>>>>> st(JettyHTTPDestination.java:278)
>>>>>>        at 
>>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je 
>>>>>>
>>>>>> ttyHTTPDestination.java:252)
>>>>>>
>>>>>> and the log has:
>>>>>> qtp0-0     | DefaultBroker            | 
>>>>>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>>>>>> ({http://example.com/exampleService}ExampleService) specified for 
>>>>>> routing, but can't find it registered
>>>>>>
>>>>>> I tried changing the targetNamespace  and the name but that 
>>>>>> didn't work either. What could be going wrong?
>>>>>>
>>>>>> Thanks,
>>>>>> Sylvester
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>

Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Freeman,

I was just trying out various alternatives. My class now looks like:

package org.CXF.SE;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;


@WebService(serviceName = "ExampleService", targetNamespace = 
"http://example.com",portName="ExampleServicePort",name="ExampleService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class ExampleService {

    @WebMethod
    public String sayHello(@WebParam (name="name")String name) {
        System.out.println("INVOKED with string" + name);
        return name;
    }
}

and it works great! Thanks for all the help!

Sylvester

Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
try modify your pojo like
> @WebService(serviceName = "ExampleService", targetNamespace = 
> "http://example.com",portName="ExampleServicePort",name="ExampleService",wsdlLocation="http://localhost:9090/ExampleServicePort") 
>
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
> public class ExampleService { public String sayHello(
>       @WebParam(name = "arg0", targetNamespace = "")
>       String name) {
>       System.out.println("INVOKED!");
>       return "Hello "+name;
>   }
>
Freeman,
My class now looks like:


@WebService(serviceName = "ExampleService", targetNamespace = 
"http://example.com",portName="ExampleServicePort",name="ExampleService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public class ExampleService {

    @WebMethod
    public String sayHello(String name) {
        System.out.println("INVOKED!");
        return "Hello "+name;
    }
}

I shut down smx, redeployed, deleted data folder and restarted. No 
improvement. I get the exact same error I was getting earlier.

Thanks,
Sylvester

Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
The error come from the servicemodel build from your pojo isn't the 
expected one
Your request message is wrapped mode but the servicemodel build from 
your pojo seems is bare mode.

try modify your pojo like
@WebService(serviceName = "ExampleService", targetNamespace = 
"http://example.com",portName="ExampleServicePort",name="ExampleService",wsdlLocation="http://localhost:9090/ExampleServicePort") 

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public class ExampleService { 
 public String sayHello(
       @WebParam(name = "arg0", targetNamespace = "")
       String name) {
       System.out.println("INVOKED!");
       return "Hello "+name;
   }

Freeman
Sylvester wrote:
> Hi,
>>
>> Where the "blah" in your message come from?
>> It shouldn't be there according to your pojo and the wsdl generated 
>> from your pojo.
>> I recall you said you didn't set "blah" in your pojo annotation, right?
>> Freeman
>>
>
> Apologies for the blah. It should not be there. I'll post everything 
> again here for the sake of clarity.
>
> my wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="ExampleService"
>    targetNamespace="http://example.com" xmlns:tns="http://example.com"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>    <wsdl:types>
>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>            xmlns:tns="http://example.com" 
> attributeFormDefault="unqualified"
>            elementFormDefault="unqualified"
>            targetNamespace="http://example.com">
>            <xs:element name="sayHello" type="tns:sayHello" />
>            <xs:element name="sayHelloResponse"
>                type="tns:sayHelloResponse" />
>            <xs:complexType name="sayHello">
>                <xs:sequence>
>                    <xs:element minOccurs="0" name="arg0"
>                        type="xs:string" />
>                </xs:sequence>
>            </xs:complexType>
>            <xs:complexType name="sayHelloResponse">
>                <xs:sequence>
>                    <xs:element minOccurs="0" name="return"
>                        type="xs:string" />
>                </xs:sequence>
>            </xs:complexType>
>        </xs:schema>
>    </wsdl:types>
>    <wsdl:message name="sayHello">
>        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
>    </wsdl:message>
>    <wsdl:message name="sayHelloResponse">
>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>        </wsdl:part>
>    </wsdl:message>
>    <wsdl:portType name="ExampleService">
>        <wsdl:operation name="sayHello">
>            <wsdl:input name="sayHello" message="tns:sayHello">
>            </wsdl:input>
>            <wsdl:output name="sayHelloResponse"
>                message="tns:sayHelloResponse">
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="ExampleServiceSoapBinding"
>        type="tns:ExampleService">
>        <soap:binding style="document"
>            transport="http://schemas.xmlsoap.org/soap/http" />
>        <wsdl:operation name="sayHello">
>            <soap:operation soapAction="" style="document" />
>            <wsdl:input name="sayHello">
>                <soap:body use="literal" />
>            </wsdl:input>
>            <wsdl:output name="sayHelloResponse">
>                <soap:body use="literal" />
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="ExampleService">
>        <wsdl:port name="ExampleServicePort"
>            binding="tns:ExampleServiceSoapBinding">
>            <soap:address
>                location="http://localhost:9090/ExampleServicePort" />
>        </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
>
>
> my BC-xbean
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:myservice="http://example.com"
>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>       http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>        targetService="myservice:ExampleService" />
>
> </beans>
>
> my SE xbean
>
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>       http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>    <cxfse:endpoint>
>        <cxfse:pojo>
>          <bean class="org.CXF.SE.ExampleService" />
>        </cxfse:pojo>
>    </cxfse:endpoint>
>
> </beans>
>
> my pojo:
>
>
> package org.CXF.SE;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService;
>
>
> @WebService(serviceName = "ExampleService", targetNamespace = 
> "http://example.com",portName="ExampleServicePort",name="ExampleService",wsdlLocation="http://localhost:9090/ExampleServicePort") 
>
> public class ExampleService {
>
>    @WebMethod
>    public String sayHello(String name) {
>        System.out.println("INVOKED!");
>        return "Hello "+name;
>    }
> }
>
> It builds and deploys fine, but when I send a soap message I get an 
> error.
>
> soap request:
>
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:exam="http://example.com">
>   <soapenv:Header/>
>   <soapenv:Body>
>      <exam:sayHello>
>         <!--Optional:-->
>         <arg0>12</arg0>
>      </exam:sayHello>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> soap response:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>      <soap:Fault>
>         <faultcode>soap:Server</faultcode>
>         <faultstring>Unmarshalling Error: unexpected element 
> (uri:"http://example.com", local:"sayHello"). Expected elements are 
> (none)</faultstring>
>      </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> I get no error in the servicemix.log file, but on the screen I see:
>
> INFO: Could not determine bean name for instance of class 
> org.apache.cxf.transpo
> rt.jbi.JBIDestination.
> Feb 4, 2009 11:57:57 AM org.apache.cxf.endpoint.ServerImpl 
> initDestination
> INFO: Setting the server's publish address to be 
> jbi://ID-192-168-2-79-11f3ff866
> 62-21-1
> Feb 4, 2009 11:59:39 AM 
> org.apache.cxf.transport.jbi.JBITransportFactory setDeli
> veryChannel
> INFO: configuring DeliveryChannel:      
> org.apache.servicemix.common.EndpointDel
> iveryChannel@1f3bb61
> Feb 4, 2009 11:59:39 AM org.apache.cxf.phase.PhaseInterceptorChain 
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
> element (uri:"
> http://example.com", local:"sayHello"). Expected elements are (none)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:593)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:498)
>        at 
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>        at 
> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
> Message(JBIWrapperInInterceptor.java:124)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:221)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
> Util.java:156)
>        at 
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
> 223)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>        at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>        at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>        at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://example.com"
> , local:"sayHello"). Expected elements are (none)]
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
> mException(UnmarshallerImpl.java:400)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:339)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
> nmarshallerImpl.java:309)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:578)
>        ... 17 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com", local:"sayHello"). Expected elements are (none)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
> vent(UnmarshallingContext.java:525)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:199)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:194)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
> Element(Loader.java:71)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
> RootLoader.childElement(UnmarshallingContext.java:922)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
> lement(UnmarshallingContext.java:366)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
> ement(UnmarshallingContext.java:347)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
> ment(InterningXmlVisitor.java:35)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
> artElement(StAXStreamConnector.java:201)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
> tAXStreamConnector.java:135)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:337)
>        ... 19 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com", local:"sayHello"). Expected elements are (none)
>        ... 30 more
> Feb 4, 2009 11:59:39 AM org.apache.cxf.phase.PhaseInterceptorChain 
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
> element (uri:"
> http://example.com", local:"sayHello"). Expected elements are (none)
>        at 
> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
> andleMessage(CxfBcConsumer.java:554)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:221)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorCha
> in.java:198)
>        at 
> org.apache.servicemix.cxfbc.CxfBcConsumer.process(CxfBcConsumer.java:
> 202)
>        at 
> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
> eMessage(CxfBcConsumer.java:530)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:221)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
> st(JettyHTTPDestination.java:278)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
> ttyHTTPDestination.java:252)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
> Handler.java:70)
>        at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
> 22)
>        at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
> lerCollection.java:206)
>        at 
> org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
>        at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
> 39)
>        at org.mortbay.jetty.Server.handle(Server.java:324)
>        at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
> 5)
>        at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
> n.java:842)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>        at 
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>        at 
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>        at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
> va:395)
>        at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
> .java:450)
> Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
> unexpected ele
> ment (uri:"http://example.com", local:"sayHello"). Expected elements 
> are (none)
>
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:593)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:498)
>        at 
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>        at 
> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
> Message(JBIWrapperInInterceptor.java:124)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:221)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
> Util.java:156)
>        at 
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
> 223)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>        at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>        at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
>        at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://example.com"
> , local:"sayHello"). Expected elements are (none)]
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
> mException(UnmarshallerImpl.java:400)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:339)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
> nmarshallerImpl.java:309)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:578)
>        ... 17 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com", local:"sayHello"). Expected elements are (none)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
> vent(UnmarshallingContext.java:525)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:199)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:194)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
> Element(Loader.java:71)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
> RootLoader.childElement(UnmarshallingContext.java:922)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
> lement(UnmarshallingContext.java:366)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
> ement(UnmarshallingContext.java:347)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
> ment(InterningXmlVisitor.java:35)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
> artElement(StAXStreamConnector.java:201)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
> tAXStreamConnector.java:135)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:337)
>        ... 19 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com", local:"sayHello"). Expected elements are (none)
>        ... 30 more
>
>
> NOTE: entries in this post my differ slightly from earlier ones 
> because I've been trying various things to get rid of this error.
> I am using servicemix 3.2.2 and soapui to send the messages.
>
> Hope that clarifies.
>
> Sylvester
>


Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Hi,
>
> Where the "blah" in your message come from?
> It shouldn't be there according to your pojo and the wsdl generated 
> from your pojo.
> I recall you said you didn't set "blah" in your pojo annotation, right?
> Freeman
>

Apologies for the blah. It should not be there. I'll post everything 
again here for the sake of clarity.

my wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="ExampleService"
    targetNamespace="http://example.com" xmlns:tns="http://example.com"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:tns="http://example.com" 
attributeFormDefault="unqualified"
            elementFormDefault="unqualified"
            targetNamespace="http://example.com">
            <xs:element name="sayHello" type="tns:sayHello" />
            <xs:element name="sayHelloResponse"
                type="tns:sayHelloResponse" />
            <xs:complexType name="sayHello">
                <xs:sequence>
                    <xs:element minOccurs="0" name="arg0"
                        type="xs:string" />
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="sayHelloResponse">
                <xs:sequence>
                    <xs:element minOccurs="0" name="return"
                        type="xs:string" />
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHello">
        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="sayHelloResponse">
        <wsdl:part name="parameters" element="tns:sayHelloResponse">
        </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="ExampleService">
        <wsdl:operation name="sayHello">
            <wsdl:input name="sayHello" message="tns:sayHello">
            </wsdl:input>
            <wsdl:output name="sayHelloResponse"
                message="tns:sayHelloResponse">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ExampleServiceSoapBinding"
        type="tns:ExampleService">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="sayHello">
            <soap:operation soapAction="" style="document" />
            <wsdl:input name="sayHello">
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output name="sayHelloResponse">
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="ExampleService">
        <wsdl:port name="ExampleServicePort"
            binding="tns:ExampleServiceSoapBinding">
            <soap:address
                location="http://localhost:9090/ExampleServicePort" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


my BC-xbean


<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
    xmlns:myservice="http://example.com"
    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <cxfbc:consumer wsdl="classpath:service.wsdl"
        targetService="myservice:ExampleService" />

</beans>

my SE xbean

<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <cxfse:endpoint>
        <cxfse:pojo>
          <bean class="org.CXF.SE.ExampleService" />
        </cxfse:pojo>
    </cxfse:endpoint>

</beans>

my pojo:


package org.CXF.SE;

import javax.jws.WebMethod;
import javax.jws.WebService;


@WebService(serviceName = "ExampleService", targetNamespace = 
"http://example.com",portName="ExampleServicePort",name="ExampleService",wsdlLocation="http://localhost:9090/ExampleServicePort")
public class ExampleService {

    @WebMethod
    public String sayHello(String name) {
        System.out.println("INVOKED!");
        return "Hello "+name;
    }
}

It builds and deploys fine, but when I send a soap message I get an error.

soap request:

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:exam="http://example.com">
   <soapenv:Header/>
   <soapenv:Body>
      <exam:sayHello>
         <!--Optional:-->
         <arg0>12</arg0>
      </exam:sayHello>
   </soapenv:Body>
</soapenv:Envelope>

soap response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>Unmarshalling Error: unexpected element 
(uri:"http://example.com", local:"sayHello"). Expected elements are 
(none)</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

I get no error in the servicemix.log file, but on the screen I see:

INFO: Could not determine bean name for instance of class 
org.apache.cxf.transpo
rt.jbi.JBIDestination.
Feb 4, 2009 11:57:57 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be 
jbi://ID-192-168-2-79-11f3ff866
62-21-1
Feb 4, 2009 11:59:39 AM org.apache.cxf.transport.jbi.JBITransportFactory 
setDeli
veryChannel
INFO: configuring DeliveryChannel:      
org.apache.servicemix.common.EndpointDel
iveryChannel@1f3bb61
Feb 4, 2009 11:59:39 AM org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
element (uri:"
http://example.com", local:"sayHello"). Expected elements are (none)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:593)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:498)
        at 
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at 
org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
Message(JBIWrapperInInterceptor.java:124)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:221)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
Util.java:156)
        at 
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
223)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://example.com"
, local:"sayHello"). Expected elements are (none)]
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
mException(UnmarshallerImpl.java:400)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:339)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
nmarshallerImpl.java:309)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:578)
        ... 17 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com", local:"sayHello"). Expected elements are (none)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
vent(UnmarshallingContext.java:525)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:199)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:194)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
Element(Loader.java:71)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
RootLoader.childElement(UnmarshallingContext.java:922)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
lement(UnmarshallingContext.java:366)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
ement(UnmarshallingContext.java:347)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
ment(InterningXmlVisitor.java:35)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
artElement(StAXStreamConnector.java:201)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
tAXStreamConnector.java:135)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:337)
        ... 19 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com", local:"sayHello"). Expected elements are (none)
        ... 30 more
Feb 4, 2009 11:59:39 AM org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
element (uri:"
http://example.com", local:"sayHello"). Expected elements are (none)
        at 
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
andleMessage(CxfBcConsumer.java:554)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:221)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorCha
in.java:198)
        at 
org.apache.servicemix.cxfbc.CxfBcConsumer.process(CxfBcConsumer.java:
202)
        at 
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
eMessage(CxfBcConsumer.java:530)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:221)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
st(JettyHTTPDestination.java:278)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
ttyHTTPDestination.java:252)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
Handler.java:70)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
22)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
        at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:450)
Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
unexpected ele
ment (uri:"http://example.com", local:"sayHello"). Expected elements are 
(none)

        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:593)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:498)
        at 
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at 
org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
Message(JBIWrapperInInterceptor.java:124)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:221)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
Util.java:156)
        at 
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
223)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://example.com"
, local:"sayHello"). Expected elements are (none)]
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
mException(UnmarshallerImpl.java:400)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:339)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
nmarshallerImpl.java:309)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:578)
        ... 17 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com", local:"sayHello"). Expected elements are (none)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
vent(UnmarshallingContext.java:525)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:199)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:194)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
Element(Loader.java:71)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
RootLoader.childElement(UnmarshallingContext.java:922)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
lement(UnmarshallingContext.java:366)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
ement(UnmarshallingContext.java:347)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
ment(InterningXmlVisitor.java:35)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
artElement(StAXStreamConnector.java:201)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
tAXStreamConnector.java:135)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:337)
        ... 19 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com", local:"sayHello"). Expected elements are (none)
        ... 30 more


NOTE: entries in this post my differ slightly from earlier ones because 
I've been trying various things to get rid of this error.
I am using servicemix 3.2.2 and soapui to send the messages.

Hope that clarifies.

Sylvester

Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Where the "blah" in your message come from?
It shouldn't be there according to your pojo and the wsdl generated from 
your pojo.
I recall you said you didn't set "blah" in your pojo annotation, right?
Freeman

Sylvester wrote:
> Hi,
> Any ideas guys? I'm still stuck here.
>
> Sylvester
>
>
>
>


Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Hi,
Any ideas guys? I'm still stuck here.

Sylvester




Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester Steele <sy...@gmail.com>.

You said you set the serviceName as "blah", but here in the annotation 
it's serviceName = "ExampleService", I'm confused, do I miss sometthing?

Oops! Sorry the name is ExampleService itself. I think I changed it in the
email by mistake.

-- 
View this message in context: http://www.nabble.com/CXF--specified-for-routing%2C-but-can%27t-find-it-registered-error-tp21759798p21787129.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Sylvester wrote:
> Nothing in the servicemix.log file, but it shows me this big stacktrace:
>
> Feb 2, 2009 1:26:42 PM 
> org.apache.cxf.transport.jbi.JBITransportFactory setDeliv
> eryChannel
> INFO: configuring DeliveryChannel:      
> org.apache.servicemix.common.EndpointDel
> iveryChannel@f45ec3
> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
> element (uri:"
> http://example.com/exampleService", local:"blah"). Expected elem
> ents are (none)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:631)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:532)
>        at 
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>        at 
> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
> Message(JBIWrapperInInterceptor.java:124)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:220)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
> Util.java:156)
>        at 
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
> 284)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>        at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>        at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:620)
>        at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://example.com/
> exampleService", local:"blah"). Expected elements are (none)]
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
> mException(UnmarshallerImpl.java:400)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:339)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
> nmarshallerImpl.java:309)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:616)
>        ... 17 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com/exampleService", local:"blah"). Expected elements are
> (none)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
> vent(UnmarshallingContext.java:525)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:199)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:194)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
> Element(Loader.java:71)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
> RootLoader.childElement(UnmarshallingContext.java:922)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
> lement(UnmarshallingContext.java:366)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
> ement(UnmarshallingContext.java:347)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
> ment(InterningXmlVisitor.java:35)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
> artElement(StAXStreamConnector.java:201)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
> tAXStreamConnector.java:135)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:337)
>        ... 19 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com/exampleService", local:"blah"). Expected elements are
> (none)
>        ... 30 more
> Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
> element (uri:"
> http://example.com/exampleService", local:"blah"). Expected elem
> ents are (none)
>        at 
> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
> andleMessage(CxfBcConsumer.java:626)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:220)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
> st(JettyHTTPDestination.java:278)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
> ttyHTTPDestination.java:252)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
> Handler.java:70)
>        at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
> 57)
>        at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
> lerCollection.java:206)
>        at 
> org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
>        at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
> 52)
>        at org.mortbay.jetty.Server.handle(Server.java:324)
>        at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
> 2)
>        at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
> n.java:840)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:657)
>        at 
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>        at 
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:377)
>        at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
> va:409)
>        at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
> ava:497)
> Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
> unexpected ele
> ment (uri:"http://example.com/exampleService", local:"blah"). Ex
> pected elements are (none)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:631)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:532)
>        at 
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>        at 
> org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
> Message(JBIWrapperInInterceptor.java:124)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:220)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
> Util.java:156)
>        at 
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
> 284)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:538)
>        at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:490)
>        at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
>        at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:620)
>        at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
>        at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://example.com/
> exampleService", local:"blah"). Expected elements are (none)]
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
> mException(UnmarshallerImpl.java:400)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:339)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
> nmarshallerImpl.java:309)
>        at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
> java:616)
>        ... 17 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com/exampleService", local:"blah"). Expected elements are
> (none)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
> vent(UnmarshallingContext.java:525)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:199)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
> va:194)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
> Element(Loader.java:71)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
> RootLoader.childElement(UnmarshallingContext.java:922)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
> lement(UnmarshallingContext.java:366)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
> ement(UnmarshallingContext.java:347)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
> ment(InterningXmlVisitor.java:35)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
> artElement(StAXStreamConnector.java:201)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
> tAXStreamConnector.java:135)
>        at 
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
> UnmarshallerImpl.java:337)
>        ... 19 more
> Caused by: javax.xml.bind.UnmarshalException: unexpected element 
> (uri:"http://ex
> ample.com/exampleService", local:"blah"). Expected elements are
> (none)
>        ... 30 more
>
>
> Sylvester
>
> Freeman Fang wrote:
>> Any exception you get from the log also?
>> Freeman
>>
>> Sylvester wrote:
>>> Hi,
>>> Well I managed to figure this one out. In the @Webservice tag I was 
>>> using (maven generated this, but it doesn't work) name= "blah" I 
>>> just changed it to serviceName= "blah" and this error went away. 
>>> However I am still stuck. I can deploy the service etc. but when I 
>>> send a message I get:
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>   <soap:Body>
>>>      <soap:Fault>
>>>         <faultcode>soap:Server</faultcode>
>>>         <faultstring>Unmarshalling Error: unexpected element 
>>> (uri:"http://example.com/exampleService", local:"sayHello"). 
>>> Expected elements are (none)</faultstring>
>>>      </soap:Fault>
>>>   </soap:Body>
>>> </soap:Envelope>
>>>
>>> and the class which gets invoked is:
>>>
You said you set the serviceName as "blah", but here in the annotation 
it's serviceName = "ExampleService", I'm confused, do I miss sometthing?
>>>
>>> @WebService(serviceName = "ExampleService", targetNamespace = 
>>> "http://example.com/exampleService")
>>> public class ExampleService {
>>>
>>>    @WebMethod
>>>    public String sayHello(String name) {
>>>        return "Hello "+name;
>>>    }
>>> }
>>>
>>> I generated the wsdl using the java2ws tool that comes with cxf. The 
>>> wsdl is:
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <wsdl:definitions name="ExampleService"
>>>    targetNamespace="http://example.com/exampleService"
>>>    xmlns:tns="http://example.com/exampleService"
>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>>>    <wsdl:types>
>>>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>            xmlns:tns="http://example.com/exampleService"
>>>            attributeFormDefault="unqualified" 
>>> elementFormDefault="unqualified"
>>>            targetNamespace="http://example.com/exampleService">
>>>            <xs:element name="sayHello" type="tns:sayHello" />
>>>            <xs:element name="sayHelloResponse"
>>>                type="tns:sayHelloResponse" />
>>>            <xs:complexType name="sayHello">
>>>                <xs:sequence>
>>>                    <xs:element minOccurs="0" name="arg0"
>>>                        type="xs:string" />
>>>                </xs:sequence>
>>>            </xs:complexType>
>>>            <xs:complexType name="sayHelloResponse">
>>>                <xs:sequence>
>>>                    <xs:element minOccurs="0" name="return"
>>>                        type="xs:string" />
>>>                </xs:sequence>
>>>            </xs:complexType>
>>>        </xs:schema>
>>>    </wsdl:types>
>>>    <wsdl:message name="sayHelloResponse">
>>>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>>>        </wsdl:part>
>>>    </wsdl:message>
>>>    <wsdl:message name="sayHello">
>>>        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
>>>    </wsdl:message>
>>>    <wsdl:portType name="ExampleService">
>>>        <wsdl:operation name="sayHello">
>>>            <wsdl:input name="sayHello" message="tns:sayHello">
>>>            </wsdl:input>
>>>            <wsdl:output name="sayHelloResponse"
>>>                message="tns:sayHelloResponse">
>>>            </wsdl:output>
>>>        </wsdl:operation>
>>>    </wsdl:portType>
>>>    <wsdl:binding name="ExampleServiceSoapBinding"
>>>        type="tns:ExampleService">
>>>        <soap:binding style="document"
>>>            transport="http://schemas.xmlsoap.org/soap/http" />
>>>        <wsdl:operation name="sayHello">
>>>            <soap:operation soapAction="" style="document" />
>>>            <wsdl:input name="sayHello">
>>>                <soap:body use="literal" />
>>>            </wsdl:input>
>>>            <wsdl:output name="sayHelloResponse">
>>>                <soap:body use="literal" />
>>>            </wsdl:output>
>>>        </wsdl:operation>
>>>    </wsdl:binding>
>>>    <wsdl:service name="ExampleService">
>>>        <wsdl:port name="ExampleServicePort"
>>>            binding="tns:ExampleServiceSoapBinding">
>>>            <soap:address
>>>                location="http://localhost:9090/ExampleServicePort" />
>>>        </wsdl:port>
>>>    </wsdl:service>
>>> </wsdl:definitions>
>>>
>>> Adding operation name or web param etc didn't help either.
>>>
>>> Thanks,
>>> Sylvester
>>>
>>>
>>> Freeman Fang wrote:
>>>> Hi,
>>>>
>>>> Would you append your wsdl also?
>>>> Freeman
>>>>
>>>> Sylvester wrote:
>>>>> Hi,
>>>>> I've run into a problem with CXF today. I have a CXF BC 
>>>>> communicating with a CXF SE. No problem building and deploying. I 
>>>>> can see the wsdl in the browser as well. I am using smx 3.2.3 for 
>>>>> this.
>>>>>
>>>>> My cxf bc xbean is:
>>>>>
>>>>> beans xmlns="http://www.springframework.org/schema/beans"
>>>>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>    xmlns:myservice="http://example.com/exampleService"
>>>>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>>>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>>>       http://www.springframework.org/schema/beans 
>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>
>>>>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>>>>        targetService="myservice:ExampleService" />
>>>>>
>>>>> </beans>
>>>>>
>>>>> CXF se xbean:
>>>>>
>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>>       xmlns="http://www.springframework.org/schema/beans"
>>>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>>>>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>>>>       http://www.springframework.org/schema/beans 
>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>>
>>>>>    <cxfse:endpoint>
>>>>>        <cxfse:pojo>
>>>>>          <bean class="com.ExampleService" />
>>>>>        </cxfse:pojo>
>>>>>    </cxfse:endpoint>
>>>>>
>>>>> </beans>
>>>>> and com.ExampleService is annotated as:
>>>>>
>>>>> @WebService(name = "ExampleService", targetNamespace = 
>>>>> "http://example.com/exampleService")
>>>>> public class ExampleService {
>>>>>
>>>>>    @WebMethod
>>>>>    public String getHighLevelBusinessFlow (String CIId, String 
>>>>> StateId){
>>>>> ...
>>>>> }
>>>>>
>>>>> I generated the wsdl using the .class file from the target folder 
>>>>> of my SE with the java2ws utility that came with my CXF 2.1.3.
>>>>>
>>>>> The response to my soap request is like:
>>>>>
>>>>> <soap:Envelope 
>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>>   <soap:Body>
>>>>>      <soap:Fault>
>>>>>         <faultcode>soap:Server</faultcode>
>>>>>         <faultstring><![CDATA[Could not find route for exchange: 
>>>>> InOut[
>>>>>  id: ID:blah-blah-
>>>>>  status: Active
>>>>>  role: provider
>>>>>  service: {http://example.com/exampleService}ExampleService
>>>>>  operation: 
>>>>> {http://example.com/exampleService}getHighLevelBusinessFlow
>>>>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>>>>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>>>>> xmlns:msg="http://example.com/exampleService" 
>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>>>> name="getHighLevelBusinessFlow" 
>>>>> type="msg:getHighLevelBusinessFlow" 
>>>>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>>>>> xmlns:exam="http://example.com/exampleService">
>>>>>         <!--Optional:-->
>>>>>         <arg0 xmlns="">1</arg0>
>>>>>         <!--Optional:-->
>>>>>         <arg1 xmlns="">2</arg1>
>>>>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>> and interface: null]]></faultstring>
>>>>>      </soap:Fault>
>>>>>   </soap:Body>
>>>>> </soap:Envelope>
>>>>>
>>>>> I see:
>>>>>
>>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>>> and interface:
>>>>> null
>>>>>        at 
>>>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
>>>>> eMessage(CxfBcConsumer.java:608)
>>>>>        at 
>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>>>> orChain.java:220)
>>>>>        at 
>>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>>>> ationObserver.java:77)
>>>>>        at 
>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>>>>> st(JettyHTTPDestination.java:278)
>>>>>        at 
>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>>>>> ttyHTTPDestination.java:252)
>>>>>
>>>>> and the log has:
>>>>> qtp0-0     | DefaultBroker            | 
>>>>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>>>>> ({http://example.com/exampleService}ExampleService) specified for 
>>>>> routing, but can't find it registered
>>>>>
>>>>> I tried changing the targetNamespace  and the name but that didn't 
>>>>> work either. What could be going wrong?
>>>>>
>>>>> Thanks,
>>>>> Sylvester
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Nothing in the servicemix.log file, but it shows me this big stacktrace:

Feb 2, 2009 1:26:42 PM org.apache.cxf.transport.jbi.JBITransportFactory 
setDeliv
eryChannel
INFO: configuring DeliveryChannel:      
org.apache.servicemix.common.EndpointDel
iveryChannel@f45ec3
Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
element (uri:"
http://example.com/exampleService", local:"blah"). Expected elem
ents are (none)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:631)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:532)
        at 
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at 
org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
Message(JBIWrapperInInterceptor.java:124)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:220)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
Util.java:156)
        at 
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
284)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:620)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://example.com/
exampleService", local:"blah"). Expected elements are (none)]
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
mException(UnmarshallerImpl.java:400)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:339)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
nmarshallerImpl.java:309)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:616)
        ... 17 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com/exampleService", local:"blah"). Expected elements are
(none)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
vent(UnmarshallingContext.java:525)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:199)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:194)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
Element(Loader.java:71)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
RootLoader.childElement(UnmarshallingContext.java:922)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
lement(UnmarshallingContext.java:366)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
ement(UnmarshallingContext.java:347)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
ment(InterningXmlVisitor.java:35)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
artElement(StAXStreamConnector.java:201)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
tAXStreamConnector.java:135)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:337)
        ... 19 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com/exampleService", local:"blah"). Expected elements are
(none)
        ... 30 more
Feb 2, 2009 1:26:42 PM org.apache.cxf.phase.PhaseInterceptorChain 
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected 
element (uri:"
http://example.com/exampleService", local:"blah"). Expected elem
ents are (none)
        at 
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.h
andleMessage(CxfBcConsumer.java:626)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:220)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
st(JettyHTTPDestination.java:278)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
ttyHTTPDestination.java:252)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTP
Handler.java:70)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
57)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
2)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:840)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:657)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:377)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:409)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:497)
Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: 
unexpected ele
ment (uri:"http://example.com/exampleService", local:"blah"). Ex
pected elements are (none)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:631)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:532)
        at 
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at 
org.apache.cxf.binding.jbi.interceptor.JBIWrapperInInterceptor.handle
Message(JBIWrapperInInterceptor.java:124)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:220)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:77)
        at 
org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcher
Util.java:156)
        at 
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:
284)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
        at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:620)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://example.com/
exampleService", local:"blah"). Expected elements are (none)]
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
mException(UnmarshallerImpl.java:400)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:339)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
nmarshallerImpl.java:309)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.
java:616)
        ... 17 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com/exampleService", local:"blah"). Expected elements are
(none)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
vent(UnmarshallingContext.java:525)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:199)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
va:194)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
Element(Loader.java:71)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$Default
RootLoader.childElement(UnmarshallingContext.java:922)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
lement(UnmarshallingContext.java:366)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
ement(UnmarshallingContext.java:347)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
ment(InterningXmlVisitor.java:35)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleSt
artElement(StAXStreamConnector.java:201)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(S
tAXStreamConnector.java:135)
        at 
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
UnmarshallerImpl.java:337)
        ... 19 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ex
ample.com/exampleService", local:"blah"). Expected elements are
(none)
        ... 30 more


Sylvester

Freeman Fang wrote:
> Any exception you get from the log also?
> Freeman
>
> Sylvester wrote:
>> Hi,
>> Well I managed to figure this one out. In the @Webservice tag I was 
>> using (maven generated this, but it doesn't work) name= "blah" I just 
>> changed it to serviceName= "blah" and this error went away. However I 
>> am still stuck. I can deploy the service etc. but when I send a 
>> message I get:
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>   <soap:Body>
>>      <soap:Fault>
>>         <faultcode>soap:Server</faultcode>
>>         <faultstring>Unmarshalling Error: unexpected element 
>> (uri:"http://example.com/exampleService", local:"sayHello"). Expected 
>> elements are (none)</faultstring>
>>      </soap:Fault>
>>   </soap:Body>
>> </soap:Envelope>
>>
>> and the class which gets invoked is:
>>
>>
>> @WebService(serviceName = "ExampleService", targetNamespace = 
>> "http://example.com/exampleService")
>> public class ExampleService {
>>
>>    @WebMethod
>>    public String sayHello(String name) {
>>        return "Hello "+name;
>>    }
>> }
>>
>> I generated the wsdl using the java2ws tool that comes with cxf. The 
>> wsdl is:
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions name="ExampleService"
>>    targetNamespace="http://example.com/exampleService"
>>    xmlns:tns="http://example.com/exampleService"
>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>>    <wsdl:types>
>>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>            xmlns:tns="http://example.com/exampleService"
>>            attributeFormDefault="unqualified" 
>> elementFormDefault="unqualified"
>>            targetNamespace="http://example.com/exampleService">
>>            <xs:element name="sayHello" type="tns:sayHello" />
>>            <xs:element name="sayHelloResponse"
>>                type="tns:sayHelloResponse" />
>>            <xs:complexType name="sayHello">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="arg0"
>>                        type="xs:string" />
>>                </xs:sequence>
>>            </xs:complexType>
>>            <xs:complexType name="sayHelloResponse">
>>                <xs:sequence>
>>                    <xs:element minOccurs="0" name="return"
>>                        type="xs:string" />
>>                </xs:sequence>
>>            </xs:complexType>
>>        </xs:schema>
>>    </wsdl:types>
>>    <wsdl:message name="sayHelloResponse">
>>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>>        </wsdl:part>
>>    </wsdl:message>
>>    <wsdl:message name="sayHello">
>>        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
>>    </wsdl:message>
>>    <wsdl:portType name="ExampleService">
>>        <wsdl:operation name="sayHello">
>>            <wsdl:input name="sayHello" message="tns:sayHello">
>>            </wsdl:input>
>>            <wsdl:output name="sayHelloResponse"
>>                message="tns:sayHelloResponse">
>>            </wsdl:output>
>>        </wsdl:operation>
>>    </wsdl:portType>
>>    <wsdl:binding name="ExampleServiceSoapBinding"
>>        type="tns:ExampleService">
>>        <soap:binding style="document"
>>            transport="http://schemas.xmlsoap.org/soap/http" />
>>        <wsdl:operation name="sayHello">
>>            <soap:operation soapAction="" style="document" />
>>            <wsdl:input name="sayHello">
>>                <soap:body use="literal" />
>>            </wsdl:input>
>>            <wsdl:output name="sayHelloResponse">
>>                <soap:body use="literal" />
>>            </wsdl:output>
>>        </wsdl:operation>
>>    </wsdl:binding>
>>    <wsdl:service name="ExampleService">
>>        <wsdl:port name="ExampleServicePort"
>>            binding="tns:ExampleServiceSoapBinding">
>>            <soap:address
>>                location="http://localhost:9090/ExampleServicePort" />
>>        </wsdl:port>
>>    </wsdl:service>
>> </wsdl:definitions>
>>
>> Adding operation name or web param etc didn't help either.
>>
>> Thanks,
>> Sylvester
>>
>>
>> Freeman Fang wrote:
>>> Hi,
>>>
>>> Would you append your wsdl also?
>>> Freeman
>>>
>>> Sylvester wrote:
>>>> Hi,
>>>> I've run into a problem with CXF today. I have a CXF BC 
>>>> communicating with a CXF SE. No problem building and deploying. I 
>>>> can see the wsdl in the browser as well. I am using smx 3.2.3 for 
>>>> this.
>>>>
>>>> My cxf bc xbean is:
>>>>
>>>> beans xmlns="http://www.springframework.org/schema/beans"
>>>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>    xmlns:myservice="http://example.com/exampleService"
>>>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>>       http://www.springframework.org/schema/beans 
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>
>>>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>>>        targetService="myservice:ExampleService" />
>>>>
>>>> </beans>
>>>>
>>>> CXF se xbean:
>>>>
>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>>       xmlns="http://www.springframework.org/schema/beans"
>>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>>>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>>>       http://www.springframework.org/schema/beans 
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>
>>>>    <cxfse:endpoint>
>>>>        <cxfse:pojo>
>>>>          <bean class="com.ExampleService" />
>>>>        </cxfse:pojo>
>>>>    </cxfse:endpoint>
>>>>
>>>> </beans>
>>>> and com.ExampleService is annotated as:
>>>>
>>>> @WebService(name = "ExampleService", targetNamespace = 
>>>> "http://example.com/exampleService")
>>>> public class ExampleService {
>>>>
>>>>    @WebMethod
>>>>    public String getHighLevelBusinessFlow (String CIId, String 
>>>> StateId){
>>>> ...
>>>> }
>>>>
>>>> I generated the wsdl using the .class file from the target folder 
>>>> of my SE with the java2ws utility that came with my CXF 2.1.3.
>>>>
>>>> The response to my soap request is like:
>>>>
>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>   <soap:Body>
>>>>      <soap:Fault>
>>>>         <faultcode>soap:Server</faultcode>
>>>>         <faultstring><![CDATA[Could not find route for exchange: 
>>>> InOut[
>>>>  id: ID:blah-blah-
>>>>  status: Active
>>>>  role: provider
>>>>  service: {http://example.com/exampleService}ExampleService
>>>>  operation: 
>>>> {http://example.com/exampleService}getHighLevelBusinessFlow
>>>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>>>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>>>> xmlns:msg="http://example.com/exampleService" 
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>>> name="getHighLevelBusinessFlow" type="msg:getHighLevelBusinessFlow" 
>>>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>>>> xmlns:exam="http://example.com/exampleService">
>>>>         <!--Optional:-->
>>>>         <arg0 xmlns="">1</arg0>
>>>>         <!--Optional:-->
>>>>         <arg1 xmlns="">2</arg1>
>>>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>> and interface: null]]></faultstring>
>>>>      </soap:Fault>
>>>>   </soap:Body>
>>>> </soap:Envelope>
>>>>
>>>> I see:
>>>>
>>>> ] for service: {http://example.com/exampleService}ExampleService 
>>>> and interface:
>>>> null
>>>>        at 
>>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
>>>> eMessage(CxfBcConsumer.java:608)
>>>>        at 
>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>>> orChain.java:220)
>>>>        at 
>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>>> ationObserver.java:77)
>>>>        at 
>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>>>> st(JettyHTTPDestination.java:278)
>>>>        at 
>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>>>> ttyHTTPDestination.java:252)
>>>>
>>>> and the log has:
>>>> qtp0-0     | DefaultBroker            | 
>>>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>>>> ({http://example.com/exampleService}ExampleService) specified for 
>>>> routing, but can't find it registered
>>>>
>>>> I tried changing the targetNamespace  and the name but that didn't 
>>>> work either. What could be going wrong?
>>>>
>>>> Thanks,
>>>> Sylvester
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>

Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Any exception you get from the log also?
Freeman

Sylvester wrote:
> Hi,
> Well I managed to figure this one out. In the @Webservice tag I was 
> using (maven generated this, but it doesn't work) name= "blah" I just 
> changed it to serviceName= "blah" and this error went away. However I 
> am still stuck. I can deploy the service etc. but when I send a 
> message I get:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>      <soap:Fault>
>         <faultcode>soap:Server</faultcode>
>         <faultstring>Unmarshalling Error: unexpected element 
> (uri:"http://example.com/exampleService", local:"sayHello"). Expected 
> elements are (none)</faultstring>
>      </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> and the class which gets invoked is:
>
>
> @WebService(serviceName = "ExampleService", targetNamespace = 
> "http://example.com/exampleService")
> public class ExampleService {
>
>    @WebMethod
>    public String sayHello(String name) {
>        return "Hello "+name;
>    }
> }
>
> I generated the wsdl using the java2ws tool that comes with cxf. The 
> wsdl is:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="ExampleService"
>    targetNamespace="http://example.com/exampleService"
>    xmlns:tns="http://example.com/exampleService"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>    <wsdl:types>
>        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>            xmlns:tns="http://example.com/exampleService"
>            attributeFormDefault="unqualified" 
> elementFormDefault="unqualified"
>            targetNamespace="http://example.com/exampleService">
>            <xs:element name="sayHello" type="tns:sayHello" />
>            <xs:element name="sayHelloResponse"
>                type="tns:sayHelloResponse" />
>            <xs:complexType name="sayHello">
>                <xs:sequence>
>                    <xs:element minOccurs="0" name="arg0"
>                        type="xs:string" />
>                </xs:sequence>
>            </xs:complexType>
>            <xs:complexType name="sayHelloResponse">
>                <xs:sequence>
>                    <xs:element minOccurs="0" name="return"
>                        type="xs:string" />
>                </xs:sequence>
>            </xs:complexType>
>        </xs:schema>
>    </wsdl:types>
>    <wsdl:message name="sayHelloResponse">
>        <wsdl:part name="parameters" element="tns:sayHelloResponse">
>        </wsdl:part>
>    </wsdl:message>
>    <wsdl:message name="sayHello">
>        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
>    </wsdl:message>
>    <wsdl:portType name="ExampleService">
>        <wsdl:operation name="sayHello">
>            <wsdl:input name="sayHello" message="tns:sayHello">
>            </wsdl:input>
>            <wsdl:output name="sayHelloResponse"
>                message="tns:sayHelloResponse">
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="ExampleServiceSoapBinding"
>        type="tns:ExampleService">
>        <soap:binding style="document"
>            transport="http://schemas.xmlsoap.org/soap/http" />
>        <wsdl:operation name="sayHello">
>            <soap:operation soapAction="" style="document" />
>            <wsdl:input name="sayHello">
>                <soap:body use="literal" />
>            </wsdl:input>
>            <wsdl:output name="sayHelloResponse">
>                <soap:body use="literal" />
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="ExampleService">
>        <wsdl:port name="ExampleServicePort"
>            binding="tns:ExampleServiceSoapBinding">
>            <soap:address
>                location="http://localhost:9090/ExampleServicePort" />
>        </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
>
> Adding operation name or web param etc didn't help either.
>
> Thanks,
> Sylvester
>
>
> Freeman Fang wrote:
>> Hi,
>>
>> Would you append your wsdl also?
>> Freeman
>>
>> Sylvester wrote:
>>> Hi,
>>> I've run into a problem with CXF today. I have a CXF BC 
>>> communicating with a CXF SE. No problem building and deploying. I 
>>> can see the wsdl in the browser as well. I am using smx 3.2.3 for this.
>>>
>>> My cxf bc xbean is:
>>>
>>> beans xmlns="http://www.springframework.org/schema/beans"
>>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>    xmlns:myservice="http://example.com/exampleService"
>>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>>       http://www.springframework.org/schema/beans 
>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>
>>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>>        targetService="myservice:ExampleService" />
>>>
>>> </beans>
>>>
>>> CXF se xbean:
>>>
>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>>       xmlns="http://www.springframework.org/schema/beans"
>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>>       http://www.springframework.org/schema/beans 
>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>
>>>    <cxfse:endpoint>
>>>        <cxfse:pojo>
>>>          <bean class="com.ExampleService" />
>>>        </cxfse:pojo>
>>>    </cxfse:endpoint>
>>>
>>> </beans>
>>> and com.ExampleService is annotated as:
>>>
>>> @WebService(name = "ExampleService", targetNamespace = 
>>> "http://example.com/exampleService")
>>> public class ExampleService {
>>>
>>>    @WebMethod
>>>    public String getHighLevelBusinessFlow (String CIId, String 
>>> StateId){
>>> ...
>>> }
>>>
>>> I generated the wsdl using the .class file from the target folder of 
>>> my SE with the java2ws utility that came with my CXF 2.1.3.
>>>
>>> The response to my soap request is like:
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>   <soap:Body>
>>>      <soap:Fault>
>>>         <faultcode>soap:Server</faultcode>
>>>         <faultstring><![CDATA[Could not find route for exchange: InOut[
>>>  id: ID:blah-blah-
>>>  status: Active
>>>  role: provider
>>>  service: {http://example.com/exampleService}ExampleService
>>>  operation: {http://example.com/exampleService}getHighLevelBusinessFlow
>>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>>> xmlns:msg="http://example.com/exampleService" 
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>> name="getHighLevelBusinessFlow" type="msg:getHighLevelBusinessFlow" 
>>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>>> xmlns:exam="http://example.com/exampleService">
>>>         <!--Optional:-->
>>>         <arg0 xmlns="">1</arg0>
>>>         <!--Optional:-->
>>>         <arg1 xmlns="">2</arg1>
>>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>>> ] for service: {http://example.com/exampleService}ExampleService and 
>>> interface: null]]></faultstring>
>>>      </soap:Fault>
>>>   </soap:Body>
>>> </soap:Envelope>
>>>
>>> I see:
>>>
>>> ] for service: {http://example.com/exampleService}ExampleService and 
>>> interface:
>>> null
>>>        at 
>>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
>>> eMessage(CxfBcConsumer.java:608)
>>>        at 
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>>> orChain.java:220)
>>>        at 
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>>> ationObserver.java:77)
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>>> st(JettyHTTPDestination.java:278)
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>>> ttyHTTPDestination.java:252)
>>>
>>> and the log has:
>>> qtp0-0     | DefaultBroker            | 
>>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>>> ({http://example.com/exampleService}ExampleService) specified for 
>>> routing, but can't find it registered
>>>
>>> I tried changing the targetNamespace  and the name but that didn't 
>>> work either. What could be going wrong?
>>>
>>> Thanks,
>>> Sylvester
>>>
>>>
>>>
>>
>>
>


Re: CXF- specified for routing, but can't find it registered error

Posted by Sylvester <sy...@gmail.com>.
Hi,
Well I managed to figure this one out. In the @Webservice tag I was 
using (maven generated this, but it doesn't work) name= "blah" I just 
changed it to serviceName= "blah" and this error went away. However I am 
still stuck. I can deploy the service etc. but when I send a message I get:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>Unmarshalling Error: unexpected element 
(uri:"http://example.com/exampleService", local:"sayHello"). Expected 
elements are (none)</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

and the class which gets invoked is:


@WebService(serviceName = "ExampleService", targetNamespace = 
"http://example.com/exampleService")
public class ExampleService {

    @WebMethod
    public String sayHello(String name) {
        return "Hello "+name;
    }
}

I generated the wsdl using the java2ws tool that comes with cxf. The 
wsdl is:


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="ExampleService"
    targetNamespace="http://example.com/exampleService"
    xmlns:tns="http://example.com/exampleService"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:tns="http://example.com/exampleService"
            attributeFormDefault="unqualified" 
elementFormDefault="unqualified"
            targetNamespace="http://example.com/exampleService">
            <xs:element name="sayHello" type="tns:sayHello" />
            <xs:element name="sayHelloResponse"
                type="tns:sayHelloResponse" />
            <xs:complexType name="sayHello">
                <xs:sequence>
                    <xs:element minOccurs="0" name="arg0"
                        type="xs:string" />
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="sayHelloResponse">
                <xs:sequence>
                    <xs:element minOccurs="0" name="return"
                        type="xs:string" />
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloResponse">
        <wsdl:part name="parameters" element="tns:sayHelloResponse">
        </wsdl:part>
    </wsdl:message>
    <wsdl:message name="sayHello">
        <wsdl:part name="parameters" element="tns:sayHello"></wsdl:part>
    </wsdl:message>
    <wsdl:portType name="ExampleService">
        <wsdl:operation name="sayHello">
            <wsdl:input name="sayHello" message="tns:sayHello">
            </wsdl:input>
            <wsdl:output name="sayHelloResponse"
                message="tns:sayHelloResponse">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ExampleServiceSoapBinding"
        type="tns:ExampleService">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="sayHello">
            <soap:operation soapAction="" style="document" />
            <wsdl:input name="sayHello">
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output name="sayHelloResponse">
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="ExampleService">
        <wsdl:port name="ExampleServicePort"
            binding="tns:ExampleServiceSoapBinding">
            <soap:address
                location="http://localhost:9090/ExampleServicePort" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Adding operation name or web param etc didn't help either.

Thanks,
Sylvester


Freeman Fang wrote:
> Hi,
>
> Would you append your wsdl also?
> Freeman
>
> Sylvester wrote:
>> Hi,
>> I've run into a problem with CXF today. I have a CXF BC communicating 
>> with a CXF SE. No problem building and deploying. I can see the wsdl 
>> in the browser as well. I am using smx 3.2.3 for this.
>>
>> My cxf bc xbean is:
>>
>> beans xmlns="http://www.springframework.org/schema/beans"
>>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>    xmlns:myservice="http://example.com/exampleService"
>>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
>> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>>       http://www.springframework.org/schema/beans 
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>>        targetService="myservice:ExampleService" />
>>
>> </beans>
>>
>> CXF se xbean:
>>
>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>>       xmlns="http://www.springframework.org/schema/beans"
>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
>> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>>       http://www.springframework.org/schema/beans 
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>>    <cxfse:endpoint>
>>        <cxfse:pojo>
>>          <bean class="com.ExampleService" />
>>        </cxfse:pojo>
>>    </cxfse:endpoint>
>>
>> </beans>
>> and com.ExampleService is annotated as:
>>
>> @WebService(name = "ExampleService", targetNamespace = 
>> "http://example.com/exampleService")
>> public class ExampleService {
>>
>>    @WebMethod
>>    public String getHighLevelBusinessFlow (String CIId, String StateId){
>> ...
>> }
>>
>> I generated the wsdl using the .class file from the target folder of 
>> my SE with the java2ws utility that came with my CXF 2.1.3.
>>
>> The response to my soap request is like:
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>   <soap:Body>
>>      <soap:Fault>
>>         <faultcode>soap:Server</faultcode>
>>         <faultstring><![CDATA[Could not find route for exchange: InOut[
>>  id: ID:blah-blah-
>>  status: Active
>>  role: provider
>>  service: {http://example.com/exampleService}ExampleService
>>  operation: {http://example.com/exampleService}getHighLevelBusinessFlow
>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
>> xmlns:msg="http://example.com/exampleService" 
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> name="getHighLevelBusinessFlow" type="msg:getHighLevelBusinessFlow" 
>> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
>> xmlns:exam="http://example.com/exampleService">
>>         <!--Optional:-->
>>         <arg0 xmlns="">1</arg0>
>>         <!--Optional:-->
>>         <arg1 xmlns="">2</arg1>
>>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
>> ] for service: {http://example.com/exampleService}ExampleService and 
>> interface: null]]></faultstring>
>>      </soap:Fault>
>>   </soap:Body>
>> </soap:Envelope>
>>
>> I see:
>>
>> ] for service: {http://example.com/exampleService}ExampleService and 
>> interface:
>> null
>>        at 
>> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
>> eMessage(CxfBcConsumer.java:608)
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
>> orChain.java:220)
>>        at 
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
>> ationObserver.java:77)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
>> st(JettyHTTPDestination.java:278)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
>> ttyHTTPDestination.java:252)
>>
>> and the log has:
>> qtp0-0     | DefaultBroker            | 
>> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
>> ({http://example.com/exampleService}ExampleService) specified for 
>> routing, but can't find it registered
>>
>> I tried changing the targetNamespace  and the name but that didn't 
>> work either. What could be going wrong?
>>
>> Thanks,
>> Sylvester
>>
>>
>>
>
>

Re: CXF- specified for routing, but can't find it registered error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Would you append your wsdl also?
Freeman

Sylvester wrote:
> Hi,
> I've run into a problem with CXF today. I have a CXF BC communicating 
> with a CXF SE. No problem building and deploying. I can see the wsdl 
> in the browser as well. I am using smx 3.2.3 for this.
>
> My cxf bc xbean is:
>
> beans xmlns="http://www.springframework.org/schema/beans"
>    xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>    xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:myservice="http://example.com/exampleService"
>    xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0 
> http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.3.xsd
>       http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>    <cxfbc:consumer wsdl="classpath:service.wsdl"
>        targetService="myservice:ExampleService" />
>
> </beans>
>
> CXF se xbean:
>
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/cxfse/1.0 
> http://servicemix.apache.org/schema/servicemix-cxfse-3.2.3.xsd
>       http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>    <cxfse:endpoint>
>        <cxfse:pojo>
>          <bean class="com.ExampleService" />
>        </cxfse:pojo>
>    </cxfse:endpoint>
>
> </beans>
> and com.ExampleService is annotated as:
>
> @WebService(name = "ExampleService", targetNamespace = 
> "http://example.com/exampleService")
> public class ExampleService {
>
>    @WebMethod
>    public String getHighLevelBusinessFlow (String CIId, String StateId){
> ...
> }
>
> I generated the wsdl using the .class file from the target folder of 
> my SE with the java2ws utility that came with my CXF 2.1.3.
>
> The response to my soap request is like:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>      <soap:Fault>
>         <faultcode>soap:Server</faultcode>
>         <faultstring><![CDATA[Could not find route for exchange: InOut[
>  id: ID:blah-blah-
>  status: Active
>  role: provider
>  service: {http://example.com/exampleService}ExampleService
>  operation: {http://example.com/exampleService}getHighLevelBusinessFlow
>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message 
> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" 
> xmlns:msg="http://example.com/exampleService" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> name="getHighLevelBusinessFlow" type="msg:getHighLevelBusinessFlow" 
> version="1.0"><jbi:part><exam:getHighLevelBusinessFlow 
> xmlns:exam="http://example.com/exampleService">
>         <!--Optional:-->
>         <arg0 xmlns="">1</arg0>
>         <!--Optional:-->
>         <arg1 xmlns="">2</arg1>
>      </exam:getHighLevelBusinessFlow></jbi:part></jbi:message>
> ] for service: {http://example.com/exampleService}ExampleService and 
> interface: null]]></faultstring>
>      </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> I see:
>
> ] for service: {http://example.com/exampleService}ExampleService and 
> interface:
> null
>        at 
> org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handl
> eMessage(CxfBcConsumer.java:608)
>        at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:220)
>        at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:77)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReque
> st(JettyHTTPDestination.java:278)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Je
> ttyHTTPDestination.java:252)
>
> and the log has:
> qtp0-0     | DefaultBroker            | 
> rvicemix.jbi.nmr.DefaultBroker  344 | ServiceName 
> ({http://example.com/exampleService}ExampleService) specified for 
> routing, but can't find it registered
>
> I tried changing the targetNamespace  and the name but that didn't 
> work either. What could be going wrong?
>
> Thanks,
> Sylvester
>
>
>