You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jayasreeb <ja...@infosys.com> on 2008/07/01 06:30:57 UTC

Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Hi,

I have created http web service "Hello" by following "cxf-wsdl-first"
example.I have created a service engine,binding component and service
assembly.I deployed webservice successfully in Servicemix.

When I am giving "http://localhost:9090/hello/?wsdl" in browser
I am successfully getting following wsdl.

 <?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
targetNamespace="http://swebservice.samples.servicemix.apache.org/">
- <wsdl:types>
- <xsd:schema attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://swebservice.samples.servicemix.apache.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="sayHello" type="tns:sayHello" /> 
- <xsd:complexType name="sayHello">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
- <xsd:complexType name="sayHelloResponse">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="sayHello">
  <wsdl:part element="tns:sayHello" name="parameters" /> 
  </wsdl:message>
- <wsdl:message name="sayHelloResponse">
  <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
  </wsdl:message>
- <wsdl:portType name="HelloTest">
- <wsdl:operation name="sayHello">
  <wsdl:input message="tns:sayHello" name="sayHello" /> 
  <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
  <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="HelloTestService">
- <wsdl:port binding="tns:HelloTestServiceSoapBinding" name="HelloTestPort">
  <soap:address location="http://localhost:9090/hello/" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>


My requirement is to invoke this deployed web service from Axis 1.4.So I
have created Axis client stubs by mentioning the above url and got the
following classes.I used following command to get the client stubs.

java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
esri.aws.v2006 -v

Following classes got generated :

HelloTest.java
HelloTestService.java
HelloTestServiceLocator.java
HelloTestServiceSoapBindingStub.java

I created a client test class to access the java method sayHello() which is
defined in Webservice deployed in Sevicemix.

public class SuccessHelloClient {
	
public static void main(String args[]){
	System.out.println("inside main of client test");
	HelloTestService hts = new HelloTestServiceLocator();
	//HelloTest ht = hts.getHelloTestPort();
	try{
		String output = hts.getHelloTestPort().sayHello("sree");
		System.out.println("output---"+output);
	}catch(Exception e){
		System.out.println("inside exception---"+e);
	}
	
}

I got the following error message..


Could not find route for exchange: InOut[
  id: ID:10.66.177.114-11adcc83874-2:0
  status: Active
  role: provider
  interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
  service:
{http://swebservice.samples.servicemix.apache.org/}HelloTestService
  operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
] for service:
{http://swebservice.samples.servicemix.apache.org/}HelloTestService and
interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest



Please help me in resolving this as this is on high priority....

I would like to know whether we can invoke Fuse webservice from AXIS?If so
what are the steps required to do it?If not what do I need to do to invoke
Web service deployed in Service mix from stand alone Java Program?

Jayasree.B


-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18208994.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi Freeman thank you for your timely help.Its working now :)



Freeman Fang wrote:
> 
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebResult;
> import javax.jws.WebService;
> import javax.xml.bind.annotation.XmlSeeAlso;
> import javax.xml.ws.RequestWrapper;
> import javax.xml.ws.ResponseWrapper;
> 
> 
> jayasreeb wrote:
>> Hi,
>>
>> I am getting following compilation error after adding entries..What do I
>> need to import in my java class in order to avoid it.
>>
>> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
>> st.java:[21,9] cannot find symbol
>> symbol  : class WebParam
>> location: interface org.apache.servicemix.samples.hello.HelloTest
>>
>> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
>> st.java:[9,1] cannot find symbol
>> symbol  : class ResponseWrapper
>> location: interface org.apache.servicemix.samples.hello.HelloTest
>>
>> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
>> st.java:[13,1] cannot find symbol
>> symbol  : class RequestWrapper
>> location: interface org.apache.servicemix.samples.hello.HelloTest
>>
>> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
>> st.java:[17,1] cannot find symbol
>> symbol  : class WebResult
>> location: interface org.apache.servicemix.samples.hello.HelloTest
>>
>> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
>> st.java:[19,1] cannot find symbol
>> symbol  : class WebMethod
>> location: interface org.apache.servicemix.samples.hello.HelloTest
>>
>> Do I need to mention targetNamespace
>> ="http://swebservice.samples.servicemix.apache.org/" in  @WebResult(name
>> =
>> "return", targetNamespace = "") as it is currently empty..
>>
>>
>> Jayasree.B
>>
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>>
>>> Annotation missing cause the error.
>>> The sayHello method in your HelloTest should be
>>> @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = 
>>> "http://swebservice.samples.servicemix.apache.org/", className = 
>>> "org.apache.servicemix.samples.swebservice.SayHelloResponse")
>>>     @RequestWrapper(localName = "sayHello", targetNamespace = 
>>> "http://swebservice.samples.servicemix.apache.org/", className = 
>>> "org.apache.servicemix.samples.swebservice.SayHello")
>>>     @WebResult(name = "return", targetNamespace = "")
>>>     @WebMethod
>>>     public java.lang.String sayHello(
>>>         @WebParam(name = "arg0", targetNamespace = "")
>>>         java.lang.String arg0
>>>     );
>>>
>>> Freeman
>>>
>>> jayasreeb wrote:
>>>     
>>>> Hi
>>>>
>>>> I made the annotation changes in HelloTest and HellotestImpl.java as
>>>> per
>>>> your suggesstion.But I am getting following error.
>>>>
>>>> Unmarshalling Error : unexpected element
>>>> (uri:"http://swebservice.samples.servicemix.apache.org/",
>>>> local:"sayHello").
>>>> Expected elements are (none) 
>>>>
>>>> Actually I am using Java as first way.I have created following
>>>> HelloTest.java and HelloImpl.Java first and then using Javatowsdl I am
>>>> generating wsdl.
>>>>
>>>> In the pom.xml of Service Unit (Service engine) I have added following
>>>> entry
>>>> to generate wsdl from java..
>>>>
>>>>
>>>>  <plugin>
>>>>  <groupId>org.apache.cxf</groupId>
>>>>  <artifactId>cxf-codegen-plugin</artifactId>
>>>>  <version>${cxf-version}</version>
>>>>
>>>>  <dependencies>
>>>>  <dependency>
>>>>  <groupId>org.apache.cxf</groupId>
>>>>  <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>>>  <version>${cxf-version}</version>
>>>>
>>>>  </dependency>
>>>>  </dependencies>
>>>>  <executions>
>>>>  <execution>
>>>>  <id>generate-wsdl</id>
>>>>  <phase>process-classes</phase>
>>>>  <configuration>	
>>>>  <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>>>  <verbose>true</verbose>				
>>>>
>>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>>>  <verbose>true</verbose>
>>>>  <argline>-classdir ${project.build.directory}/classes</argline>
>>>>  </configuration>
>>>>  <goals>	
>>>>  <goal>java2wsdl</goal>
>>>>  </goals>
>>>>  </execution>
>>>>  </executions>
>>>>  </plugin>
>>>>
>>>> Is the entry in pom file is correct?Am I missing something? Do I need
>>>> to
>>>> do
>>>> any entry in xbean file??
>>>>
>>>> Thanks in advance
>>>> Jayasree.B
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>   
>>>>       
>>>>> jayasreeb wrote:
>>>>>     
>>>>>         
>>>>>> Hi
>>>>>>
>>>>>> I created interface HelloTest and and implemenation class
>>>>>> HelloTestImpl.java
>>>>>>
>>>>>>
>>>>>> HelloTest.java
>>>>>>
>>>>>> package org.apache.servicemix.samples.hello;
>>>>>> import javax.jws.WebService;
>>>>>>
>>>>>> @WebService(targetNamespace =
>>>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> the annotation here should be
>>>>> @WebService(targetNamespace 
>>>>> ="http://swebservice.samples.servicemix.apache.org/",
>>>>> name="HelloTest")
>>>>>
>>>>>     
>>>>>         
>>>>>> public interface HelloTest{  
>>>>>>
>>>>>>   public abstract String sayHello(String name);
>>>>>> } 
>>>>>>
>>>>>> HelloTestImpl.java
>>>>>>
>>>>>> package org.apache.servicemix.samples.webservice;
>>>>>> import org.apache.servicemix.samples.hello.*;
>>>>>> import javax.jws.WebService;
>>>>>> @WebService(targetNamespace =
>>>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> the annotation here should be
>>>>> @WebService(targetNamespace 
>>>>> ="http://swebservice.samples.servicemix.apache.org/", 
>>>>> serviceName="HelloTestService",
>>>>>     endpointInterface="org.apache.servicemix.samples.hello.HelloTest"
>>>>> )
>>>>>
>>>>> Also, since you are using wsdl first way, you should generate code
>>>>> from 
>>>>> wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
>>>>>     
>>>>>         
>>>>>> public class HelloTestImpl implements HelloTest{
>>>>>>   private String message = "HELLO!!!!!";
>>>>>>
>>>>>>   public String sayHello(String name) {
>>>>>>     return message + name + ".";
>>>>>>   }
>>>>>> } 
>>>>>>
>>>>>>
>>>>>> Then by giving following entry in pom file of service unit i
>>>>>> generated
>>>>>> wsdl
>>>>>> file from java...
>>>>>>
>>>>>>
>>>>>> <plugin>
>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>> <artifactId>cxf-codegen-plugin</artifactId>
>>>>>> <version>${cxf-version}</version>
>>>>>>
>>>>>> <dependencies>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>> <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>>>>> <version>${cxf-version}</version>
>>>>>>
>>>>>> </dependency>
>>>>>> </dependencies>
>>>>>> <executions>
>>>>>> <execution>
>>>>>> <id>generate-wsdl</id>
>>>>>> <phase>process-classes</phase>
>>>>>> <configuration>	
>>>>>> <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>>>>> <verbose>true</verbose>				
>>>>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>>>>> <verbose>true</verbose>
>>>>>> <argline>-classdir ${project.build.directory}/classes</argline>
>>>>>> </configuration>
>>>>>> <goals>	
>>>>>> <goal>java2wsdl</goal>
>>>>>> </goals>
>>>>>> </execution>
>>>>>> </executions>
>>>>>> </plugin>
>>>>>>
>>>>>> Jayasree.B
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Hi,
>>>>>>> I suspect your HelloTestImpl is not annotated correctly, what it
>>>>>>> looks
>>>>>>> like?
>>>>>>> Is it inherit from the interface HelloTest.java which you generate
>>>>>>> using 
>>>>>>> cxf wsdl2java tool?
>>>>>>>
>>>>>>> Freeman
>>>>>>>
>>>>>>>
>>>>>>> jayasreeb wrote:
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Please find my cxf se xbean entry.
>>>>>>>>
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>>>>>>
>>>>>>>>     <cxfse:endpoint>
>>>>>>>>         <cxfse:pojo>
>>>>>>>>           <bean
>>>>>>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>>>>>>         </cxfse:pojo>
>>>>>>>>     </cxfse:endpoint>
>>>>>>>>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Please find my cxf bc entry
>>>>>>>>
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>>>       
>>>>>>>> xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>>>>>>
>>>>>>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>>>>>>                       targetService="hello:HelloTestService"
>>>>>>>>                       targetInterface="hello:HelloTest"/>
>>>>>>>>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>> Thanks for your help
>>>>>>>> Jayasree.B
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Freeman Fang wrote:
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>>>>>>
>>>>>>>>> Freeman
>>>>>>>>>
>>>>>>>>> jayasreeb wrote:
>>>>>>>>>     
>>>>>>>>>         
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I have created http web service "Hello" by following
>>>>>>>>>> "cxf-wsdl-first"
>>>>>>>>>> example.I have created a service engine,binding component and
>>>>>>>>>> service
>>>>>>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>>>>>>
>>>>>>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>>>>>>> I am successfully getting following wsdl.
>>>>>>>>>>
>>>>>>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>>>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>>>>>> name="HelloTestService"
>>>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>>>>>>> - <wsdl:types>
>>>>>>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>>>>>>> elementFormDefault="unqualified"
>>>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>>>>>>> - <xsd:complexType name="sayHello">
>>>>>>>>>> - <xsd:sequence>
>>>>>>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>>>>>>   </xsd:sequence>
>>>>>>>>>>   </xsd:complexType>
>>>>>>>>>>   <xsd:element name="sayHelloResponse"
>>>>>>>>>> type="tns:sayHelloResponse"
>>>>>>>>>> /> 
>>>>>>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>>>>>>> - <xsd:sequence>
>>>>>>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>>>>>>   </xsd:sequence>
>>>>>>>>>>   </xsd:complexType>
>>>>>>>>>>   </xsd:schema>
>>>>>>>>>>   </wsdl:types>
>>>>>>>>>> - <wsdl:message name="sayHello">
>>>>>>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>>>>>>   </wsdl:message>
>>>>>>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>>>>>>   </wsdl:message>
>>>>>>>>>> - <wsdl:portType name="HelloTest">
>>>>>>>>>> - <wsdl:operation name="sayHello">
>>>>>>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>>>>>>   <wsdl:output message="tns:sayHelloResponse"
>>>>>>>>>> name="sayHelloResponse"
>>>>>>>>>> /> 
>>>>>>>>>>   </wsdl:operation>
>>>>>>>>>>   </wsdl:portType>
>>>>>>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>>>>>>> type="tns:HelloTest">
>>>>>>>>>>   <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="HelloTestService">
>>>>>>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>>>>>>> name="HelloTestPort">
>>>>>>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>>>>>>   </wsdl:port>
>>>>>>>>>>   </wsdl:service>
>>>>>>>>>>   </wsdl:definitions>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> My requirement is to invoke this deployed web service from Axis
>>>>>>>>>> 1.4.So
>>>>>>>>>> I
>>>>>>>>>> have created Axis client stubs by mentioning the above url and
>>>>>>>>>> got
>>>>>>>>>> the
>>>>>>>>>> following classes.I used following command to get the client
>>>>>>>>>> stubs.
>>>>>>>>>>
>>>>>>>>>> java org.apache.axis.wsdl.WSDL2Java
>>>>>>>>>> http://localhost:9090/hello/?wsdl
>>>>>>>>>> -p
>>>>>>>>>> esri.aws.v2006 -v
>>>>>>>>>>
>>>>>>>>>> Following classes got generated :
>>>>>>>>>>
>>>>>>>>>> HelloTest.java
>>>>>>>>>> HelloTestService.java
>>>>>>>>>> HelloTestServiceLocator.java
>>>>>>>>>> HelloTestServiceSoapBindingStub.java
>>>>>>>>>>
>>>>>>>>>> I created a client test class to access the java method
>>>>>>>>>> sayHello()
>>>>>>>>>> which
>>>>>>>>>> is
>>>>>>>>>> defined in Webservice deployed in Sevicemix.
>>>>>>>>>>
>>>>>>>>>> public class SuccessHelloClient {
>>>>>>>>>> 	
>>>>>>>>>> public static void main(String args[]){
>>>>>>>>>> 	System.out.println("inside main of client test");
>>>>>>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>>>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>>>>>>> 	try{
>>>>>>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>>>>>>> 		System.out.println("output---"+output);
>>>>>>>>>> 	}catch(Exception e){
>>>>>>>>>> 		System.out.println("inside exception---"+e);
>>>>>>>>>> 	}
>>>>>>>>>> 	
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> I got the following error message..
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Could not find route for exchange: InOut[
>>>>>>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>>>>>>   status: Active
>>>>>>>>>>   role: provider
>>>>>>>>>>   interface:
>>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>>>   service:
>>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>>>>   operation:
>>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>>>>>>> name="sayHello" type="msg:sayHello"
>>>>>>>>>> version="1.0"><jbi:part><sayHello
>>>>>>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>>>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>>>>>>> ] for service:
>>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>>>> and
>>>>>>>>>> interface:
>>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Please help me in resolving this as this is on high priority....
>>>>>>>>>>
>>>>>>>>>> I would like to know whether we can invoke Fuse webservice from
>>>>>>>>>> AXIS?If
>>>>>>>>>> so
>>>>>>>>>> what are the steps required to do it?If not what do I need to do
>>>>>>>>>> to
>>>>>>>>>> invoke
>>>>>>>>>> Web service deployed in Service mix from stand alone Java
>>>>>>>>>> Program?
>>>>>>>>>>
>>>>>>>>>> Jayasree.B
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>   
>>>>>>>>>>       
>>>>>>>>>>           
>>>>>>>>>>               
>>>>>>>>>>                   
>>>>>>>>>     
>>>>>>>>>         
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18211106.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by Freeman Fang <fr...@gmail.com>.
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;


jayasreeb wrote:
> Hi,
>
> I am getting following compilation error after adding entries..What do I
> need to import in my java class in order to avoid it.
>
> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
> st.java:[21,9] cannot find symbol
> symbol  : class WebParam
> location: interface org.apache.servicemix.samples.hello.HelloTest
>
> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
> st.java:[9,1] cannot find symbol
> symbol  : class ResponseWrapper
> location: interface org.apache.servicemix.samples.hello.HelloTest
>
> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
> st.java:[13,1] cannot find symbol
> symbol  : class RequestWrapper
> location: interface org.apache.servicemix.samples.hello.HelloTest
>
> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
> st.java:[17,1] cannot find symbol
> symbol  : class WebResult
> location: interface org.apache.servicemix.samples.hello.HelloTest
>
> C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
> st.java:[19,1] cannot find symbol
> symbol  : class WebMethod
> location: interface org.apache.servicemix.samples.hello.HelloTest
>
> Do I need to mention targetNamespace
> ="http://swebservice.samples.servicemix.apache.org/" in  @WebResult(name =
> "return", targetNamespace = "") as it is currently empty..
>
>
> Jayasree.B
>
>
>
> Freeman Fang wrote:
>   
>> Hi,
>>
>> Annotation missing cause the error.
>> The sayHello method in your HelloTest should be
>> @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = 
>> "http://swebservice.samples.servicemix.apache.org/", className = 
>> "org.apache.servicemix.samples.swebservice.SayHelloResponse")
>>     @RequestWrapper(localName = "sayHello", targetNamespace = 
>> "http://swebservice.samples.servicemix.apache.org/", className = 
>> "org.apache.servicemix.samples.swebservice.SayHello")
>>     @WebResult(name = "return", targetNamespace = "")
>>     @WebMethod
>>     public java.lang.String sayHello(
>>         @WebParam(name = "arg0", targetNamespace = "")
>>         java.lang.String arg0
>>     );
>>
>> Freeman
>>
>> jayasreeb wrote:
>>     
>>> Hi
>>>
>>> I made the annotation changes in HelloTest and HellotestImpl.java as per
>>> your suggesstion.But I am getting following error.
>>>
>>> Unmarshalling Error : unexpected element
>>> (uri:"http://swebservice.samples.servicemix.apache.org/",
>>> local:"sayHello").
>>> Expected elements are (none) 
>>>
>>> Actually I am using Java as first way.I have created following
>>> HelloTest.java and HelloImpl.Java first and then using Javatowsdl I am
>>> generating wsdl.
>>>
>>> In the pom.xml of Service Unit (Service engine) I have added following
>>> entry
>>> to generate wsdl from java..
>>>
>>>
>>>  <plugin>
>>>  <groupId>org.apache.cxf</groupId>
>>>  <artifactId>cxf-codegen-plugin</artifactId>
>>>  <version>${cxf-version}</version>
>>>
>>>  <dependencies>
>>>  <dependency>
>>>  <groupId>org.apache.cxf</groupId>
>>>  <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>>  <version>${cxf-version}</version>
>>>
>>>  </dependency>
>>>  </dependencies>
>>>  <executions>
>>>  <execution>
>>>  <id>generate-wsdl</id>
>>>  <phase>process-classes</phase>
>>>  <configuration>	
>>>  <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>>  <verbose>true</verbose>				
>>>
>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>>  <verbose>true</verbose>
>>>  <argline>-classdir ${project.build.directory}/classes</argline>
>>>  </configuration>
>>>  <goals>	
>>>  <goal>java2wsdl</goal>
>>>  </goals>
>>>  </execution>
>>>  </executions>
>>>  </plugin>
>>>
>>> Is the entry in pom file is correct?Am I missing something? Do I need to
>>> do
>>> any entry in xbean file??
>>>
>>> Thanks in advance
>>> Jayasree.B
>>>
>>>
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> jayasreeb wrote:
>>>>     
>>>>         
>>>>> Hi
>>>>>
>>>>> I created interface HelloTest and and implemenation class
>>>>> HelloTestImpl.java
>>>>>
>>>>>
>>>>> HelloTest.java
>>>>>
>>>>> package org.apache.servicemix.samples.hello;
>>>>> import javax.jws.WebService;
>>>>>
>>>>> @WebService(targetNamespace =
>>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> the annotation here should be
>>>> @WebService(targetNamespace 
>>>> ="http://swebservice.samples.servicemix.apache.org/", name="HelloTest")
>>>>
>>>>     
>>>>         
>>>>> public interface HelloTest{  
>>>>>
>>>>>   public abstract String sayHello(String name);
>>>>> } 
>>>>>
>>>>> HelloTestImpl.java
>>>>>
>>>>> package org.apache.servicemix.samples.webservice;
>>>>> import org.apache.servicemix.samples.hello.*;
>>>>> import javax.jws.WebService;
>>>>> @WebService(targetNamespace =
>>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>>   
>>>>>       
>>>>>           
>>>> the annotation here should be
>>>> @WebService(targetNamespace 
>>>> ="http://swebservice.samples.servicemix.apache.org/", 
>>>> serviceName="HelloTestService",
>>>>     endpointInterface="org.apache.servicemix.samples.hello.HelloTest" )
>>>>
>>>> Also, since you are using wsdl first way, you should generate code from 
>>>> wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
>>>>     
>>>>         
>>>>> public class HelloTestImpl implements HelloTest{
>>>>>   private String message = "HELLO!!!!!";
>>>>>
>>>>>   public String sayHello(String name) {
>>>>>     return message + name + ".";
>>>>>   }
>>>>> } 
>>>>>
>>>>>
>>>>> Then by giving following entry in pom file of service unit i generated
>>>>> wsdl
>>>>> file from java...
>>>>>
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.apache.cxf</groupId>
>>>>> <artifactId>cxf-codegen-plugin</artifactId>
>>>>> <version>${cxf-version}</version>
>>>>>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>org.apache.cxf</groupId>
>>>>> <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>>>> <version>${cxf-version}</version>
>>>>>
>>>>> </dependency>
>>>>> </dependencies>
>>>>> <executions>
>>>>> <execution>
>>>>> <id>generate-wsdl</id>
>>>>> <phase>process-classes</phase>
>>>>> <configuration>	
>>>>> <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>>>> <verbose>true</verbose>				
>>>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>>>> <verbose>true</verbose>
>>>>> <argline>-classdir ${project.build.directory}/classes</argline>
>>>>> </configuration>
>>>>> <goals>	
>>>>> <goal>java2wsdl</goal>
>>>>> </goals>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> Jayasree.B
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Hi,
>>>>>> I suspect your HelloTestImpl is not annotated correctly, what it looks
>>>>>> like?
>>>>>> Is it inherit from the interface HelloTest.java which you generate
>>>>>> using 
>>>>>> cxf wsdl2java tool?
>>>>>>
>>>>>> Freeman
>>>>>>
>>>>>>
>>>>>> jayasreeb wrote:
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>>> Hi,
>>>>>>>
>>>>>>> Please find my cxf se xbean entry.
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>>>>>
>>>>>>>     <cxfse:endpoint>
>>>>>>>         <cxfse:pojo>
>>>>>>>           <bean
>>>>>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>>>>>         </cxfse:pojo>
>>>>>>>     </cxfse:endpoint>
>>>>>>>
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>> Please find my cxf bc entry
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>>       
>>>>>>> xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>>>>>
>>>>>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>>>>>                       targetService="hello:HelloTestService"
>>>>>>>                       targetInterface="hello:HelloTest"/>
>>>>>>>
>>>>>>> </beans>
>>>>>>>
>>>>>>> Thanks for your help
>>>>>>> Jayasree.B
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Freeman Fang wrote:
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>>>>>
>>>>>>>> Freeman
>>>>>>>>
>>>>>>>> jayasreeb wrote:
>>>>>>>>     
>>>>>>>>         
>>>>>>>>             
>>>>>>>>                 
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have created http web service "Hello" by following
>>>>>>>>> "cxf-wsdl-first"
>>>>>>>>> example.I have created a service engine,binding component and
>>>>>>>>> service
>>>>>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>>>>>
>>>>>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>>>>>> I am successfully getting following wsdl.
>>>>>>>>>
>>>>>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>>>>> name="HelloTestService"
>>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>>>>>> - <wsdl:types>
>>>>>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>>>>>> elementFormDefault="unqualified"
>>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>>>>>> - <xsd:complexType name="sayHello">
>>>>>>>>> - <xsd:sequence>
>>>>>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>>>>>   </xsd:sequence>
>>>>>>>>>   </xsd:complexType>
>>>>>>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse"
>>>>>>>>> /> 
>>>>>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>>>>>> - <xsd:sequence>
>>>>>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>>>>>   </xsd:sequence>
>>>>>>>>>   </xsd:complexType>
>>>>>>>>>   </xsd:schema>
>>>>>>>>>   </wsdl:types>
>>>>>>>>> - <wsdl:message name="sayHello">
>>>>>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>>>>>   </wsdl:message>
>>>>>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>>>>>   </wsdl:message>
>>>>>>>>> - <wsdl:portType name="HelloTest">
>>>>>>>>> - <wsdl:operation name="sayHello">
>>>>>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>>>>>   <wsdl:output message="tns:sayHelloResponse"
>>>>>>>>> name="sayHelloResponse"
>>>>>>>>> /> 
>>>>>>>>>   </wsdl:operation>
>>>>>>>>>   </wsdl:portType>
>>>>>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>>>>>> type="tns:HelloTest">
>>>>>>>>>   <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="HelloTestService">
>>>>>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>>>>>> name="HelloTestPort">
>>>>>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>>>>>   </wsdl:port>
>>>>>>>>>   </wsdl:service>
>>>>>>>>>   </wsdl:definitions>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> My requirement is to invoke this deployed web service from Axis
>>>>>>>>> 1.4.So
>>>>>>>>> I
>>>>>>>>> have created Axis client stubs by mentioning the above url and got
>>>>>>>>> the
>>>>>>>>> following classes.I used following command to get the client stubs.
>>>>>>>>>
>>>>>>>>> java org.apache.axis.wsdl.WSDL2Java
>>>>>>>>> http://localhost:9090/hello/?wsdl
>>>>>>>>> -p
>>>>>>>>> esri.aws.v2006 -v
>>>>>>>>>
>>>>>>>>> Following classes got generated :
>>>>>>>>>
>>>>>>>>> HelloTest.java
>>>>>>>>> HelloTestService.java
>>>>>>>>> HelloTestServiceLocator.java
>>>>>>>>> HelloTestServiceSoapBindingStub.java
>>>>>>>>>
>>>>>>>>> I created a client test class to access the java method sayHello()
>>>>>>>>> which
>>>>>>>>> is
>>>>>>>>> defined in Webservice deployed in Sevicemix.
>>>>>>>>>
>>>>>>>>> public class SuccessHelloClient {
>>>>>>>>> 	
>>>>>>>>> public static void main(String args[]){
>>>>>>>>> 	System.out.println("inside main of client test");
>>>>>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>>>>>> 	try{
>>>>>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>>>>>> 		System.out.println("output---"+output);
>>>>>>>>> 	}catch(Exception e){
>>>>>>>>> 		System.out.println("inside exception---"+e);
>>>>>>>>> 	}
>>>>>>>>> 	
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> I got the following error message..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Could not find route for exchange: InOut[
>>>>>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>>>>>   status: Active
>>>>>>>>>   role: provider
>>>>>>>>>   interface:
>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>>   service:
>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>>>   operation:
>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>>>>>> name="sayHello" type="msg:sayHello"
>>>>>>>>> version="1.0"><jbi:part><sayHello
>>>>>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>>>>>> ] for service:
>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>>> and
>>>>>>>>> interface:
>>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Please help me in resolving this as this is on high priority....
>>>>>>>>>
>>>>>>>>> I would like to know whether we can invoke Fuse webservice from
>>>>>>>>> AXIS?If
>>>>>>>>> so
>>>>>>>>> what are the steps required to do it?If not what do I need to do to
>>>>>>>>> invoke
>>>>>>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>>>>>>
>>>>>>>>> Jayasree.B
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>   
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>>>               
>>>>>>>>>                   
>>>>>>>>     
>>>>>>>>         
>>>>>>>>             
>>>>>>>>                 
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi,

I am getting following compilation error after adding entries..What do I
need to import in my java class in order to avoid it.

C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
st.java:[21,9] cannot find symbol
symbol  : class WebParam
location: interface org.apache.servicemix.samples.hello.HelloTest

C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
st.java:[9,1] cannot find symbol
symbol  : class ResponseWrapper
location: interface org.apache.servicemix.samples.hello.HelloTest

C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
st.java:[13,1] cannot find symbol
symbol  : class RequestWrapper
location: interface org.apache.servicemix.samples.hello.HelloTest

C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
st.java:[17,1] cannot find symbol
symbol  : class WebResult
location: interface org.apache.servicemix.samples.hello.HelloTest

C:\mavenProject\SuccessHttp\success-webservice-first-su\src\main\java\org\apache\servicemix\samples\hello\HelloTe
st.java:[19,1] cannot find symbol
symbol  : class WebMethod
location: interface org.apache.servicemix.samples.hello.HelloTest

Do I need to mention targetNamespace
="http://swebservice.samples.servicemix.apache.org/" in  @WebResult(name =
"return", targetNamespace = "") as it is currently empty..


Jayasree.B



Freeman Fang wrote:
> 
> Hi,
> 
> Annotation missing cause the error.
> The sayHello method in your HelloTest should be
> @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = 
> "http://swebservice.samples.servicemix.apache.org/", className = 
> "org.apache.servicemix.samples.swebservice.SayHelloResponse")
>     @RequestWrapper(localName = "sayHello", targetNamespace = 
> "http://swebservice.samples.servicemix.apache.org/", className = 
> "org.apache.servicemix.samples.swebservice.SayHello")
>     @WebResult(name = "return", targetNamespace = "")
>     @WebMethod
>     public java.lang.String sayHello(
>         @WebParam(name = "arg0", targetNamespace = "")
>         java.lang.String arg0
>     );
> 
> Freeman
> 
> jayasreeb wrote:
>> Hi
>>
>> I made the annotation changes in HelloTest and HellotestImpl.java as per
>> your suggesstion.But I am getting following error.
>>
>> Unmarshalling Error : unexpected element
>> (uri:"http://swebservice.samples.servicemix.apache.org/",
>> local:"sayHello").
>> Expected elements are (none) 
>>
>> Actually I am using Java as first way.I have created following
>> HelloTest.java and HelloImpl.Java first and then using Javatowsdl I am
>> generating wsdl.
>>
>> In the pom.xml of Service Unit (Service engine) I have added following
>> entry
>> to generate wsdl from java..
>>
>>
>>  <plugin>
>>  <groupId>org.apache.cxf</groupId>
>>  <artifactId>cxf-codegen-plugin</artifactId>
>>  <version>${cxf-version}</version>
>>
>>  <dependencies>
>>  <dependency>
>>  <groupId>org.apache.cxf</groupId>
>>  <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>  <version>${cxf-version}</version>
>>
>>  </dependency>
>>  </dependencies>
>>  <executions>
>>  <execution>
>>  <id>generate-wsdl</id>
>>  <phase>process-classes</phase>
>>  <configuration>	
>>  <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>  <verbose>true</verbose>				
>>
>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>  <verbose>true</verbose>
>>  <argline>-classdir ${project.build.directory}/classes</argline>
>>  </configuration>
>>  <goals>	
>>  <goal>java2wsdl</goal>
>>  </goals>
>>  </execution>
>>  </executions>
>>  </plugin>
>>
>> Is the entry in pom file is correct?Am I missing something? Do I need to
>> do
>> any entry in xbean file??
>>
>> Thanks in advance
>> Jayasree.B
>>
>>
>>
>>
>>
>>
>> Freeman Fang wrote:
>>   
>>> jayasreeb wrote:
>>>     
>>>> Hi
>>>>
>>>> I created interface HelloTest and and implemenation class
>>>> HelloTestImpl.java
>>>>
>>>>
>>>> HelloTest.java
>>>>
>>>> package org.apache.servicemix.samples.hello;
>>>> import javax.jws.WebService;
>>>>
>>>> @WebService(targetNamespace =
>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>
>>>>   
>>>>       
>>> the annotation here should be
>>> @WebService(targetNamespace 
>>> ="http://swebservice.samples.servicemix.apache.org/", name="HelloTest")
>>>
>>>     
>>>> public interface HelloTest{  
>>>>
>>>>   public abstract String sayHello(String name);
>>>> } 
>>>>
>>>> HelloTestImpl.java
>>>>
>>>> package org.apache.servicemix.samples.webservice;
>>>> import org.apache.servicemix.samples.hello.*;
>>>> import javax.jws.WebService;
>>>> @WebService(targetNamespace =
>>>> "http://swebservice.samples.servicemix.apache.org/")
>>>>   
>>>>       
>>> the annotation here should be
>>> @WebService(targetNamespace 
>>> ="http://swebservice.samples.servicemix.apache.org/", 
>>> serviceName="HelloTestService",
>>>     endpointInterface="org.apache.servicemix.samples.hello.HelloTest" )
>>>
>>> Also, since you are using wsdl first way, you should generate code from 
>>> wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
>>>     
>>>> public class HelloTestImpl implements HelloTest{
>>>>   private String message = "HELLO!!!!!";
>>>>
>>>>   public String sayHello(String name) {
>>>>     return message + name + ".";
>>>>   }
>>>> } 
>>>>
>>>>
>>>> Then by giving following entry in pom file of service unit i generated
>>>> wsdl
>>>> file from java...
>>>>
>>>>
>>>> <plugin>
>>>> <groupId>org.apache.cxf</groupId>
>>>> <artifactId>cxf-codegen-plugin</artifactId>
>>>> <version>${cxf-version}</version>
>>>>
>>>> <dependencies>
>>>> <dependency>
>>>> <groupId>org.apache.cxf</groupId>
>>>> <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>>> <version>${cxf-version}</version>
>>>>
>>>> </dependency>
>>>> </dependencies>
>>>> <executions>
>>>> <execution>
>>>> <id>generate-wsdl</id>
>>>> <phase>process-classes</phase>
>>>> <configuration>	
>>>> <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>>> <verbose>true</verbose>				
>>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>>> <verbose>true</verbose>
>>>> <argline>-classdir ${project.build.directory}/classes</argline>
>>>> </configuration>
>>>> <goals>	
>>>> <goal>java2wsdl</goal>
>>>> </goals>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>>
>>>> Jayasree.B
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>   
>>>>       
>>>>> Hi,
>>>>> I suspect your HelloTestImpl is not annotated correctly, what it looks
>>>>> like?
>>>>> Is it inherit from the interface HelloTest.java which you generate
>>>>> using 
>>>>> cxf wsdl2java tool?
>>>>>
>>>>> Freeman
>>>>>
>>>>>
>>>>> jayasreeb wrote:
>>>>>     
>>>>>         
>>>>>> Hi,
>>>>>>
>>>>>> Please find my cxf se xbean entry.
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>>>>
>>>>>>     <cxfse:endpoint>
>>>>>>         <cxfse:pojo>
>>>>>>           <bean
>>>>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>>>>         </cxfse:pojo>
>>>>>>     </cxfse:endpoint>
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> Please find my cxf bc entry
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>>       
>>>>>> xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>>>>
>>>>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>>>>                       targetService="hello:HelloTestService"
>>>>>>                       targetInterface="hello:HelloTest"/>
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>> Thanks for your help
>>>>>> Jayasree.B
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Hi,
>>>>>>>
>>>>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>>>>
>>>>>>> Freeman
>>>>>>>
>>>>>>> jayasreeb wrote:
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I have created http web service "Hello" by following
>>>>>>>> "cxf-wsdl-first"
>>>>>>>> example.I have created a service engine,binding component and
>>>>>>>> service
>>>>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>>>>
>>>>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>>>>> I am successfully getting following wsdl.
>>>>>>>>
>>>>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>>>> name="HelloTestService"
>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>>>>> - <wsdl:types>
>>>>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>>>>> elementFormDefault="unqualified"
>>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>>>>> - <xsd:complexType name="sayHello">
>>>>>>>> - <xsd:sequence>
>>>>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>>>>   </xsd:sequence>
>>>>>>>>   </xsd:complexType>
>>>>>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse"
>>>>>>>> /> 
>>>>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>>>>> - <xsd:sequence>
>>>>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>>>>   </xsd:sequence>
>>>>>>>>   </xsd:complexType>
>>>>>>>>   </xsd:schema>
>>>>>>>>   </wsdl:types>
>>>>>>>> - <wsdl:message name="sayHello">
>>>>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>>>>   </wsdl:message>
>>>>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>>>>   </wsdl:message>
>>>>>>>> - <wsdl:portType name="HelloTest">
>>>>>>>> - <wsdl:operation name="sayHello">
>>>>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>>>>   <wsdl:output message="tns:sayHelloResponse"
>>>>>>>> name="sayHelloResponse"
>>>>>>>> /> 
>>>>>>>>   </wsdl:operation>
>>>>>>>>   </wsdl:portType>
>>>>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>>>>> type="tns:HelloTest">
>>>>>>>>   <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="HelloTestService">
>>>>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>>>>> name="HelloTestPort">
>>>>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>>>>   </wsdl:port>
>>>>>>>>   </wsdl:service>
>>>>>>>>   </wsdl:definitions>
>>>>>>>>
>>>>>>>>
>>>>>>>> My requirement is to invoke this deployed web service from Axis
>>>>>>>> 1.4.So
>>>>>>>> I
>>>>>>>> have created Axis client stubs by mentioning the above url and got
>>>>>>>> the
>>>>>>>> following classes.I used following command to get the client stubs.
>>>>>>>>
>>>>>>>> java org.apache.axis.wsdl.WSDL2Java
>>>>>>>> http://localhost:9090/hello/?wsdl
>>>>>>>> -p
>>>>>>>> esri.aws.v2006 -v
>>>>>>>>
>>>>>>>> Following classes got generated :
>>>>>>>>
>>>>>>>> HelloTest.java
>>>>>>>> HelloTestService.java
>>>>>>>> HelloTestServiceLocator.java
>>>>>>>> HelloTestServiceSoapBindingStub.java
>>>>>>>>
>>>>>>>> I created a client test class to access the java method sayHello()
>>>>>>>> which
>>>>>>>> is
>>>>>>>> defined in Webservice deployed in Sevicemix.
>>>>>>>>
>>>>>>>> public class SuccessHelloClient {
>>>>>>>> 	
>>>>>>>> public static void main(String args[]){
>>>>>>>> 	System.out.println("inside main of client test");
>>>>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>>>>> 	try{
>>>>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>>>>> 		System.out.println("output---"+output);
>>>>>>>> 	}catch(Exception e){
>>>>>>>> 		System.out.println("inside exception---"+e);
>>>>>>>> 	}
>>>>>>>> 	
>>>>>>>> }
>>>>>>>>
>>>>>>>> I got the following error message..
>>>>>>>>
>>>>>>>>
>>>>>>>> Could not find route for exchange: InOut[
>>>>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>>>>   status: Active
>>>>>>>>   role: provider
>>>>>>>>   interface:
>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>   service:
>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>>   operation:
>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>>>>> name="sayHello" type="msg:sayHello"
>>>>>>>> version="1.0"><jbi:part><sayHello
>>>>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>>>>> ] for service:
>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>> and
>>>>>>>> interface:
>>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Please help me in resolving this as this is on high priority....
>>>>>>>>
>>>>>>>> I would like to know whether we can invoke Fuse webservice from
>>>>>>>> AXIS?If
>>>>>>>> so
>>>>>>>> what are the steps required to do it?If not what do I need to do to
>>>>>>>> invoke
>>>>>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>>>>>
>>>>>>>> Jayasree.B
>>>>>>>>
>>>>>>>>
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18210490.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

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

Annotation missing cause the error.
The sayHello method in your HelloTest should be
@ResponseWrapper(localName = "sayHelloResponse", targetNamespace = 
"http://swebservice.samples.servicemix.apache.org/", className = 
"org.apache.servicemix.samples.swebservice.SayHelloResponse")
    @RequestWrapper(localName = "sayHello", targetNamespace = 
"http://swebservice.samples.servicemix.apache.org/", className = 
"org.apache.servicemix.samples.swebservice.SayHello")
    @WebResult(name = "return", targetNamespace = "")
    @WebMethod
    public java.lang.String sayHello(
        @WebParam(name = "arg0", targetNamespace = "")
        java.lang.String arg0
    );

Freeman

jayasreeb wrote:
> Hi
>
> I made the annotation changes in HelloTest and HellotestImpl.java as per
> your suggesstion.But I am getting following error.
>
> Unmarshalling Error : unexpected element
> (uri:"http://swebservice.samples.servicemix.apache.org/", local:"sayHello").
> Expected elements are (none) 
>
> Actually I am using Java as first way.I have created following
> HelloTest.java and HelloImpl.Java first and then using Javatowsdl I am
> generating wsdl.
>
> In the pom.xml of Service Unit (Service engine) I have added following entry
> to generate wsdl from java..
>
>
>  <plugin>
>  <groupId>org.apache.cxf</groupId>
>  <artifactId>cxf-codegen-plugin</artifactId>
>  <version>${cxf-version}</version>
>
>  <dependencies>
>  <dependency>
>  <groupId>org.apache.cxf</groupId>
>  <artifactId>cxf-rt-frontend-jaxws</artifactId>
>  <version>${cxf-version}</version>
>
>  </dependency>
>  </dependencies>
>  <executions>
>  <execution>
>  <id>generate-wsdl</id>
>  <phase>process-classes</phase>
>  <configuration>	
>  <className>org.apache.servicemix.samples.hello.HelloTest</className>
>  <verbose>true</verbose>				
>
> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>  <verbose>true</verbose>
>  <argline>-classdir ${project.build.directory}/classes</argline>
>  </configuration>
>  <goals>	
>  <goal>java2wsdl</goal>
>  </goals>
>  </execution>
>  </executions>
>  </plugin>
>
> Is the entry in pom file is correct?Am I missing something? Do I need to do
> any entry in xbean file??
>
> Thanks in advance
> Jayasree.B
>
>
>
>
>
>
> Freeman Fang wrote:
>   
>> jayasreeb wrote:
>>     
>>> Hi
>>>
>>> I created interface HelloTest and and implemenation class
>>> HelloTestImpl.java
>>>
>>>
>>> HelloTest.java
>>>
>>> package org.apache.servicemix.samples.hello;
>>> import javax.jws.WebService;
>>>
>>> @WebService(targetNamespace =
>>> "http://swebservice.samples.servicemix.apache.org/")
>>>
>>>   
>>>       
>> the annotation here should be
>> @WebService(targetNamespace 
>> ="http://swebservice.samples.servicemix.apache.org/", name="HelloTest")
>>
>>     
>>> public interface HelloTest{  
>>>
>>>   public abstract String sayHello(String name);
>>> } 
>>>
>>> HelloTestImpl.java
>>>
>>> package org.apache.servicemix.samples.webservice;
>>> import org.apache.servicemix.samples.hello.*;
>>> import javax.jws.WebService;
>>> @WebService(targetNamespace =
>>> "http://swebservice.samples.servicemix.apache.org/")
>>>   
>>>       
>> the annotation here should be
>> @WebService(targetNamespace 
>> ="http://swebservice.samples.servicemix.apache.org/", 
>> serviceName="HelloTestService",
>>     endpointInterface="org.apache.servicemix.samples.hello.HelloTest" )
>>
>> Also, since you are using wsdl first way, you should generate code from 
>> wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
>>     
>>> public class HelloTestImpl implements HelloTest{
>>>   private String message = "HELLO!!!!!";
>>>
>>>   public String sayHello(String name) {
>>>     return message + name + ".";
>>>   }
>>> } 
>>>
>>>
>>> Then by giving following entry in pom file of service unit i generated
>>> wsdl
>>> file from java...
>>>
>>>
>>> <plugin>
>>> <groupId>org.apache.cxf</groupId>
>>> <artifactId>cxf-codegen-plugin</artifactId>
>>> <version>${cxf-version}</version>
>>>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.apache.cxf</groupId>
>>> <artifactId>cxf-rt-frontend-jaxws</artifactId>
>>> <version>${cxf-version}</version>
>>>
>>> </dependency>
>>> </dependencies>
>>> <executions>
>>> <execution>
>>> <id>generate-wsdl</id>
>>> <phase>process-classes</phase>
>>> <configuration>	
>>> <className>org.apache.servicemix.samples.hello.HelloTest</className>
>>> <verbose>true</verbose>				
>>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>>> <verbose>true</verbose>
>>> <argline>-classdir ${project.build.directory}/classes</argline>
>>> </configuration>
>>> <goals>	
>>> <goal>java2wsdl</goal>
>>> </goals>
>>> </execution>
>>> </executions>
>>> </plugin>
>>>
>>> Jayasree.B
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> Hi,
>>>> I suspect your HelloTestImpl is not annotated correctly, what it looks
>>>> like?
>>>> Is it inherit from the interface HelloTest.java which you generate using 
>>>> cxf wsdl2java tool?
>>>>
>>>> Freeman
>>>>
>>>>
>>>> jayasreeb wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> Please find my cxf se xbean entry.
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>>>
>>>>>     <cxfse:endpoint>
>>>>>         <cxfse:pojo>
>>>>>           <bean
>>>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>>>         </cxfse:pojo>
>>>>>     </cxfse:endpoint>
>>>>>
>>>>> </beans>
>>>>>
>>>>>
>>>>> Please find my cxf bc entry
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>>        xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>>>
>>>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>>>                       targetService="hello:HelloTestService"
>>>>>                       targetInterface="hello:HelloTest"/>
>>>>>
>>>>> </beans>
>>>>>
>>>>> Thanks for your help
>>>>> Jayasree.B
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>>>
>>>>>> Freeman
>>>>>>
>>>>>> jayasreeb wrote:
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have created http web service "Hello" by following "cxf-wsdl-first"
>>>>>>> example.I have created a service engine,binding component and service
>>>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>>>
>>>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>>>> I am successfully getting following wsdl.
>>>>>>>
>>>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>>>> - <wsdl:types>
>>>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>>>> elementFormDefault="unqualified"
>>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>>>> - <xsd:complexType name="sayHello">
>>>>>>> - <xsd:sequence>
>>>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>>>   </xsd:sequence>
>>>>>>>   </xsd:complexType>
>>>>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>>>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>>>> - <xsd:sequence>
>>>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>>>   </xsd:sequence>
>>>>>>>   </xsd:complexType>
>>>>>>>   </xsd:schema>
>>>>>>>   </wsdl:types>
>>>>>>> - <wsdl:message name="sayHello">
>>>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>>>   </wsdl:message>
>>>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>>>   </wsdl:message>
>>>>>>> - <wsdl:portType name="HelloTest">
>>>>>>> - <wsdl:operation name="sayHello">
>>>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"
>>>>>>> /> 
>>>>>>>   </wsdl:operation>
>>>>>>>   </wsdl:portType>
>>>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>>>> type="tns:HelloTest">
>>>>>>>   <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="HelloTestService">
>>>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>>>> name="HelloTestPort">
>>>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>>>   </wsdl:port>
>>>>>>>   </wsdl:service>
>>>>>>>   </wsdl:definitions>
>>>>>>>
>>>>>>>
>>>>>>> My requirement is to invoke this deployed web service from Axis
>>>>>>> 1.4.So
>>>>>>> I
>>>>>>> have created Axis client stubs by mentioning the above url and got
>>>>>>> the
>>>>>>> following classes.I used following command to get the client stubs.
>>>>>>>
>>>>>>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl
>>>>>>> -p
>>>>>>> esri.aws.v2006 -v
>>>>>>>
>>>>>>> Following classes got generated :
>>>>>>>
>>>>>>> HelloTest.java
>>>>>>> HelloTestService.java
>>>>>>> HelloTestServiceLocator.java
>>>>>>> HelloTestServiceSoapBindingStub.java
>>>>>>>
>>>>>>> I created a client test class to access the java method sayHello()
>>>>>>> which
>>>>>>> is
>>>>>>> defined in Webservice deployed in Sevicemix.
>>>>>>>
>>>>>>> public class SuccessHelloClient {
>>>>>>> 	
>>>>>>> public static void main(String args[]){
>>>>>>> 	System.out.println("inside main of client test");
>>>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>>>> 	try{
>>>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>>>> 		System.out.println("output---"+output);
>>>>>>> 	}catch(Exception e){
>>>>>>> 		System.out.println("inside exception---"+e);
>>>>>>> 	}
>>>>>>> 	
>>>>>>> }
>>>>>>>
>>>>>>> I got the following error message..
>>>>>>>
>>>>>>>
>>>>>>> Could not find route for exchange: InOut[
>>>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>>>   status: Active
>>>>>>>   role: provider
>>>>>>>   interface:
>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>   service:
>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>>   operation:
>>>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>>>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>>>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>>>> ] for service:
>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>> and
>>>>>>> interface:
>>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Please help me in resolving this as this is on high priority....
>>>>>>>
>>>>>>> I would like to know whether we can invoke Fuse webservice from
>>>>>>> AXIS?If
>>>>>>> so
>>>>>>> what are the steps required to do it?If not what do I need to do to
>>>>>>> invoke
>>>>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>>>>
>>>>>>> Jayasree.B
>>>>>>>
>>>>>>>
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi

I made the annotation changes in HelloTest and HellotestImpl.java as per
your suggesstion.But I am getting following error.

Unmarshalling Error : unexpected element
(uri:"http://swebservice.samples.servicemix.apache.org/", local:"sayHello").
Expected elements are (none) 

Actually I am using Java as first way.I have created following
HelloTest.java and HelloImpl.Java first and then using Javatowsdl I am
generating wsdl.

In the pom.xml of Service Unit (Service engine) I have added following entry
to generate wsdl from java..


 <plugin>
 <groupId>org.apache.cxf</groupId>
 <artifactId>cxf-codegen-plugin</artifactId>
 <version>${cxf-version}</version>

 <dependencies>
 <dependency>
 <groupId>org.apache.cxf</groupId>
 <artifactId>cxf-rt-frontend-jaxws</artifactId>
 <version>${cxf-version}</version>

 </dependency>
 </dependencies>
 <executions>
 <execution>
 <id>generate-wsdl</id>
 <phase>process-classes</phase>
 <configuration>	
 <className>org.apache.servicemix.samples.hello.HelloTest</className>
 <verbose>true</verbose>				

<outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
 <verbose>true</verbose>
 <argline>-classdir ${project.build.directory}/classes</argline>
 </configuration>
 <goals>	
 <goal>java2wsdl</goal>
 </goals>
 </execution>
 </executions>
 </plugin>

Is the entry in pom file is correct?Am I missing something? Do I need to do
any entry in xbean file??

Thanks in advance
Jayasree.B






Freeman Fang wrote:
> 
> jayasreeb wrote:
>> Hi
>>
>> I created interface HelloTest and and implemenation class
>> HelloTestImpl.java
>>
>>
>> HelloTest.java
>>
>> package org.apache.servicemix.samples.hello;
>> import javax.jws.WebService;
>>
>> @WebService(targetNamespace =
>> "http://swebservice.samples.servicemix.apache.org/")
>>
>>   
> the annotation here should be
> @WebService(targetNamespace 
> ="http://swebservice.samples.servicemix.apache.org/", name="HelloTest")
> 
>> public interface HelloTest{  
>>
>>   public abstract String sayHello(String name);
>> } 
>>
>> HelloTestImpl.java
>>
>> package org.apache.servicemix.samples.webservice;
>> import org.apache.servicemix.samples.hello.*;
>> import javax.jws.WebService;
>> @WebService(targetNamespace =
>> "http://swebservice.samples.servicemix.apache.org/")
>>   
> the annotation here should be
> @WebService(targetNamespace 
> ="http://swebservice.samples.servicemix.apache.org/", 
> serviceName="HelloTestService",
>     endpointInterface="org.apache.servicemix.samples.hello.HelloTest" )
> 
> Also, since you are using wsdl first way, you should generate code from 
> wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
>> public class HelloTestImpl implements HelloTest{
>>   private String message = "HELLO!!!!!";
>>
>>   public String sayHello(String name) {
>>     return message + name + ".";
>>   }
>> } 
>>
>>
>> Then by giving following entry in pom file of service unit i generated
>> wsdl
>> file from java...
>>
>>
>> <plugin>
>> <groupId>org.apache.cxf</groupId>
>> <artifactId>cxf-codegen-plugin</artifactId>
>> <version>${cxf-version}</version>
>>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.cxf</groupId>
>> <artifactId>cxf-rt-frontend-jaxws</artifactId>
>> <version>${cxf-version}</version>
>>
>> </dependency>
>> </dependencies>
>> <executions>
>> <execution>
>> <id>generate-wsdl</id>
>> <phase>process-classes</phase>
>> <configuration>	
>> <className>org.apache.servicemix.samples.hello.HelloTest</className>
>> <verbose>true</verbose>				
>> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
>> <verbose>true</verbose>
>> <argline>-classdir ${project.build.directory}/classes</argline>
>> </configuration>
>> <goals>	
>> <goal>java2wsdl</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>>
>> Jayasree.B
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>> I suspect your HelloTestImpl is not annotated correctly, what it looks
>>> like?
>>> Is it inherit from the interface HelloTest.java which you generate using 
>>> cxf wsdl2java tool?
>>>
>>> Freeman
>>>
>>>
>>> jayasreeb wrote:
>>>     
>>>> Hi,
>>>>
>>>> Please find my cxf se xbean entry.
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>>
>>>>     <cxfse:endpoint>
>>>>         <cxfse:pojo>
>>>>           <bean
>>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>>         </cxfse:pojo>
>>>>     </cxfse:endpoint>
>>>>
>>>> </beans>
>>>>
>>>>
>>>> Please find my cxf bc entry
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>        xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>>
>>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>>                       targetService="hello:HelloTestService"
>>>>                       targetInterface="hello:HelloTest"/>
>>>>
>>>> </beans>
>>>>
>>>> Thanks for your help
>>>> Jayasree.B
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>   
>>>>       
>>>>> Hi,
>>>>>
>>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>>
>>>>> Freeman
>>>>>
>>>>> jayasreeb wrote:
>>>>>     
>>>>>         
>>>>>> Hi,
>>>>>>
>>>>>> I have created http web service "Hello" by following "cxf-wsdl-first"
>>>>>> example.I have created a service engine,binding component and service
>>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>>
>>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>>> I am successfully getting following wsdl.
>>>>>>
>>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>>> - <wsdl:types>
>>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>>> elementFormDefault="unqualified"
>>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>>> - <xsd:complexType name="sayHello">
>>>>>> - <xsd:sequence>
>>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>>   </xsd:sequence>
>>>>>>   </xsd:complexType>
>>>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>>> - <xsd:sequence>
>>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>>   </xsd:sequence>
>>>>>>   </xsd:complexType>
>>>>>>   </xsd:schema>
>>>>>>   </wsdl:types>
>>>>>> - <wsdl:message name="sayHello">
>>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>>   </wsdl:message>
>>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>>   </wsdl:message>
>>>>>> - <wsdl:portType name="HelloTest">
>>>>>> - <wsdl:operation name="sayHello">
>>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"
>>>>>> /> 
>>>>>>   </wsdl:operation>
>>>>>>   </wsdl:portType>
>>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>>> type="tns:HelloTest">
>>>>>>   <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="HelloTestService">
>>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>>> name="HelloTestPort">
>>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>>   </wsdl:port>
>>>>>>   </wsdl:service>
>>>>>>   </wsdl:definitions>
>>>>>>
>>>>>>
>>>>>> My requirement is to invoke this deployed web service from Axis
>>>>>> 1.4.So
>>>>>> I
>>>>>> have created Axis client stubs by mentioning the above url and got
>>>>>> the
>>>>>> following classes.I used following command to get the client stubs.
>>>>>>
>>>>>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl
>>>>>> -p
>>>>>> esri.aws.v2006 -v
>>>>>>
>>>>>> Following classes got generated :
>>>>>>
>>>>>> HelloTest.java
>>>>>> HelloTestService.java
>>>>>> HelloTestServiceLocator.java
>>>>>> HelloTestServiceSoapBindingStub.java
>>>>>>
>>>>>> I created a client test class to access the java method sayHello()
>>>>>> which
>>>>>> is
>>>>>> defined in Webservice deployed in Sevicemix.
>>>>>>
>>>>>> public class SuccessHelloClient {
>>>>>> 	
>>>>>> public static void main(String args[]){
>>>>>> 	System.out.println("inside main of client test");
>>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>>> 	try{
>>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>>> 		System.out.println("output---"+output);
>>>>>> 	}catch(Exception e){
>>>>>> 		System.out.println("inside exception---"+e);
>>>>>> 	}
>>>>>> 	
>>>>>> }
>>>>>>
>>>>>> I got the following error message..
>>>>>>
>>>>>>
>>>>>> Could not find route for exchange: InOut[
>>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>>   status: Active
>>>>>>   role: provider
>>>>>>   interface:
>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>   service:
>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>>   operation:
>>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>>> ] for service:
>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>> and
>>>>>> interface:
>>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>>
>>>>>>
>>>>>>
>>>>>> Please help me in resolving this as this is on high priority....
>>>>>>
>>>>>> I would like to know whether we can invoke Fuse webservice from
>>>>>> AXIS?If
>>>>>> so
>>>>>> what are the steps required to do it?If not what do I need to do to
>>>>>> invoke
>>>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>>>
>>>>>> Jayasree.B
>>>>>>
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18210031.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by Freeman Fang <fr...@gmail.com>.
jayasreeb wrote:
> Hi
>
> I created interface HelloTest and and implemenation class HelloTestImpl.java
>
>
> HelloTest.java
>
> package org.apache.servicemix.samples.hello;
> import javax.jws.WebService;
>
> @WebService(targetNamespace =
> "http://swebservice.samples.servicemix.apache.org/")
>
>   
the annotation here should be
@WebService(targetNamespace 
="http://swebservice.samples.servicemix.apache.org/", name="HelloTest")

> public interface HelloTest{  
>
>   public abstract String sayHello(String name);
> } 
>
> HelloTestImpl.java
>
> package org.apache.servicemix.samples.webservice;
> import org.apache.servicemix.samples.hello.*;
> import javax.jws.WebService;
> @WebService(targetNamespace =
> "http://swebservice.samples.servicemix.apache.org/")
>   
the annotation here should be
@WebService(targetNamespace 
="http://swebservice.samples.servicemix.apache.org/", 
serviceName="HelloTestService",
    endpointInterface="org.apache.servicemix.samples.hello.HelloTest" )

Also, since you are using wsdl first way, you should generate code from 
wsdl by cxf wsdl2java, cxf tool will take care of annotation for you.
> public class HelloTestImpl implements HelloTest{
>   private String message = "HELLO!!!!!";
>
>   public String sayHello(String name) {
>     return message + name + ".";
>   }
> } 
>
>
> Then by giving following entry in pom file of service unit i generated wsdl
> file from java...
>
>
> <plugin>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-codegen-plugin</artifactId>
> <version>${cxf-version}</version>
>
> <dependencies>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxws</artifactId>
> <version>${cxf-version}</version>
>
> </dependency>
> </dependencies>
> <executions>
> <execution>
> <id>generate-wsdl</id>
> <phase>process-classes</phase>
> <configuration>	
> <className>org.apache.servicemix.samples.hello.HelloTest</className>
> <verbose>true</verbose>				
> <outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
> <verbose>true</verbose>
> <argline>-classdir ${project.build.directory}/classes</argline>
> </configuration>
> <goals>	
> <goal>java2wsdl</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> Jayasree.B
>
>
> Freeman Fang wrote:
>   
>> Hi,
>> I suspect your HelloTestImpl is not annotated correctly, what it looks
>> like?
>> Is it inherit from the interface HelloTest.java which you generate using 
>> cxf wsdl2java tool?
>>
>> Freeman
>>
>>
>> jayasreeb wrote:
>>     
>>> Hi,
>>>
>>> Please find my cxf se xbean entry.
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>>
>>>     <cxfse:endpoint>
>>>         <cxfse:pojo>
>>>           <bean
>>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>>         </cxfse:pojo>
>>>     </cxfse:endpoint>
>>>
>>> </beans>
>>>
>>>
>>> Please find my cxf bc entry
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>        xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>>
>>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>>                       targetService="hello:HelloTestService"
>>>                       targetInterface="hello:HelloTest"/>
>>>
>>> </beans>
>>>
>>> Thanks for your help
>>> Jayasree.B
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>>
>>>> Freeman
>>>>
>>>> jayasreeb wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> I have created http web service "Hello" by following "cxf-wsdl-first"
>>>>> example.I have created a service engine,binding component and service
>>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>>
>>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>>> I am successfully getting following wsdl.
>>>>>
>>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>>> - <wsdl:types>
>>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>>> elementFormDefault="unqualified"
>>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>>> - <xsd:complexType name="sayHello">
>>>>> - <xsd:sequence>
>>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>>   </xsd:sequence>
>>>>>   </xsd:complexType>
>>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>>>>> - <xsd:complexType name="sayHelloResponse">
>>>>> - <xsd:sequence>
>>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>>   </xsd:sequence>
>>>>>   </xsd:complexType>
>>>>>   </xsd:schema>
>>>>>   </wsdl:types>
>>>>> - <wsdl:message name="sayHello">
>>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>>   </wsdl:message>
>>>>> - <wsdl:message name="sayHelloResponse">
>>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>>   </wsdl:message>
>>>>> - <wsdl:portType name="HelloTest">
>>>>> - <wsdl:operation name="sayHello">
>>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"
>>>>> /> 
>>>>>   </wsdl:operation>
>>>>>   </wsdl:portType>
>>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>>> type="tns:HelloTest">
>>>>>   <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="HelloTestService">
>>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>>> name="HelloTestPort">
>>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>>   </wsdl:port>
>>>>>   </wsdl:service>
>>>>>   </wsdl:definitions>
>>>>>
>>>>>
>>>>> My requirement is to invoke this deployed web service from Axis 1.4.So
>>>>> I
>>>>> have created Axis client stubs by mentioning the above url and got the
>>>>> following classes.I used following command to get the client stubs.
>>>>>
>>>>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl
>>>>> -p
>>>>> esri.aws.v2006 -v
>>>>>
>>>>> Following classes got generated :
>>>>>
>>>>> HelloTest.java
>>>>> HelloTestService.java
>>>>> HelloTestServiceLocator.java
>>>>> HelloTestServiceSoapBindingStub.java
>>>>>
>>>>> I created a client test class to access the java method sayHello()
>>>>> which
>>>>> is
>>>>> defined in Webservice deployed in Sevicemix.
>>>>>
>>>>> public class SuccessHelloClient {
>>>>> 	
>>>>> public static void main(String args[]){
>>>>> 	System.out.println("inside main of client test");
>>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>>> 	try{
>>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>>> 		System.out.println("output---"+output);
>>>>> 	}catch(Exception e){
>>>>> 		System.out.println("inside exception---"+e);
>>>>> 	}
>>>>> 	
>>>>> }
>>>>>
>>>>> I got the following error message..
>>>>>
>>>>>
>>>>> Could not find route for exchange: InOut[
>>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>>   status: Active
>>>>>   role: provider
>>>>>   interface:
>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>   service:
>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>>   operation:
>>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>>> ] for service:
>>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
>>>>> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>>
>>>>>
>>>>>
>>>>> Please help me in resolving this as this is on high priority....
>>>>>
>>>>> I would like to know whether we can invoke Fuse webservice from AXIS?If
>>>>> so
>>>>> what are the steps required to do it?If not what do I need to do to
>>>>> invoke
>>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>>
>>>>> Jayasree.B
>>>>>
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi

I created interface HelloTest and and implemenation class HelloTestImpl.java


HelloTest.java

package org.apache.servicemix.samples.hello;
import javax.jws.WebService;

@WebService(targetNamespace =
"http://swebservice.samples.servicemix.apache.org/")

public interface HelloTest{  

  public abstract String sayHello(String name);
} 

HelloTestImpl.java

package org.apache.servicemix.samples.webservice;
import org.apache.servicemix.samples.hello.*;
import javax.jws.WebService;
@WebService(targetNamespace =
"http://swebservice.samples.servicemix.apache.org/")

public class HelloTestImpl implements HelloTest{
  private String message = "HELLO!!!!!";

  public String sayHello(String name) {
    return message + name + ".";
  }
} 


Then by giving following entry in pom file of service unit i generated wsdl
file from java...


<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf-version}</version>

<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf-version}</version>

</dependency>
</dependencies>
<executions>
<execution>
<id>generate-wsdl</id>
<phase>process-classes</phase>
<configuration>	
<className>org.apache.servicemix.samples.hello.HelloTest</className>
<verbose>true</verbose>				
<outputFile>${project.build.directory}/generated-sources/jaxws/Hello.wsdl</outputFile>
<verbose>true</verbose>
<argline>-classdir ${project.build.directory}/classes</argline>
</configuration>
<goals>	
<goal>java2wsdl</goal>
</goals>
</execution>
</executions>
</plugin>

Jayasree.B


Freeman Fang wrote:
> 
> Hi,
> I suspect your HelloTestImpl is not annotated correctly, what it looks
> like?
> Is it inherit from the interface HelloTest.java which you generate using 
> cxf wsdl2java tool?
> 
> Freeman
> 
> 
> jayasreeb wrote:
>> Hi,
>>
>> Please find my cxf se xbean entry.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>>
>>     <cxfse:endpoint>
>>         <cxfse:pojo>
>>           <bean
>> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>>         </cxfse:pojo>
>>     </cxfse:endpoint>
>>
>> </beans>
>>
>>
>> Please find my cxf bc entry
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>        xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>>
>>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>>                       targetService="hello:HelloTestService"
>>                       targetInterface="hello:HelloTest"/>
>>
>> </beans>
>>
>> Thanks for your help
>> Jayasree.B
>>
>>
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>>
>>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>>
>>> Freeman
>>>
>>> jayasreeb wrote:
>>>     
>>>> Hi,
>>>>
>>>> I have created http web service "Hello" by following "cxf-wsdl-first"
>>>> example.I have created a service engine,binding component and service
>>>> assembly.I deployed webservice successfully in Servicemix.
>>>>
>>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>>> I am successfully getting following wsdl.
>>>>
>>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>>> - <wsdl:types>
>>>> - <xsd:schema attributeFormDefault="unqualified"
>>>> elementFormDefault="unqualified"
>>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>>> - <xsd:complexType name="sayHello">
>>>> - <xsd:sequence>
>>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>>   </xsd:sequence>
>>>>   </xsd:complexType>
>>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>>>> - <xsd:complexType name="sayHelloResponse">
>>>> - <xsd:sequence>
>>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>>   </xsd:sequence>
>>>>   </xsd:complexType>
>>>>   </xsd:schema>
>>>>   </wsdl:types>
>>>> - <wsdl:message name="sayHello">
>>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>>   </wsdl:message>
>>>> - <wsdl:message name="sayHelloResponse">
>>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>>   </wsdl:message>
>>>> - <wsdl:portType name="HelloTest">
>>>> - <wsdl:operation name="sayHello">
>>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"
>>>> /> 
>>>>   </wsdl:operation>
>>>>   </wsdl:portType>
>>>> - <wsdl:binding name="HelloTestServiceSoapBinding"
>>>> type="tns:HelloTest">
>>>>   <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="HelloTestService">
>>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>>> name="HelloTestPort">
>>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>>   </wsdl:port>
>>>>   </wsdl:service>
>>>>   </wsdl:definitions>
>>>>
>>>>
>>>> My requirement is to invoke this deployed web service from Axis 1.4.So
>>>> I
>>>> have created Axis client stubs by mentioning the above url and got the
>>>> following classes.I used following command to get the client stubs.
>>>>
>>>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl
>>>> -p
>>>> esri.aws.v2006 -v
>>>>
>>>> Following classes got generated :
>>>>
>>>> HelloTest.java
>>>> HelloTestService.java
>>>> HelloTestServiceLocator.java
>>>> HelloTestServiceSoapBindingStub.java
>>>>
>>>> I created a client test class to access the java method sayHello()
>>>> which
>>>> is
>>>> defined in Webservice deployed in Sevicemix.
>>>>
>>>> public class SuccessHelloClient {
>>>> 	
>>>> public static void main(String args[]){
>>>> 	System.out.println("inside main of client test");
>>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>>> 	//HelloTest ht = hts.getHelloTestPort();
>>>> 	try{
>>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>>> 		System.out.println("output---"+output);
>>>> 	}catch(Exception e){
>>>> 		System.out.println("inside exception---"+e);
>>>> 	}
>>>> 	
>>>> }
>>>>
>>>> I got the following error message..
>>>>
>>>>
>>>> Could not find route for exchange: InOut[
>>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>>   status: Active
>>>>   role: provider
>>>>   interface:
>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>   service:
>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>>   operation:
>>>> {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>>> ] for service:
>>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
>>>> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>>
>>>>
>>>>
>>>> Please help me in resolving this as this is on high priority....
>>>>
>>>> I would like to know whether we can invoke Fuse webservice from AXIS?If
>>>> so
>>>> what are the steps required to do it?If not what do I need to do to
>>>> invoke
>>>> Web service deployed in Service mix from stand alone Java Program?
>>>>
>>>> Jayasree.B
>>>>
>>>>
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18209700.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
I suspect your HelloTestImpl is not annotated correctly, what it looks like?
Is it inherit from the interface HelloTest.java which you generate using 
cxf wsdl2java tool?

Freeman


jayasreeb wrote:
> Hi,
>
> Please find my cxf se xbean entry.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
>
>     <cxfse:endpoint>
>         <cxfse:pojo>
>           <bean
> class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
>         </cxfse:pojo>
>     </cxfse:endpoint>
>
> </beans>
>
>
> Please find my cxf bc entry
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>        xmlns:hello="http://swebservice.samples.servicemix.apache.org/">
>
>   <cxfbc:consumer wsdl="classpath:Hello.wsdl"
>                       targetService="hello:HelloTestService"
>                       targetInterface="hello:HelloTest"/>
>
> </beans>
>
> Thanks for your help
> Jayasree.B
>
>
>
>
> Freeman Fang wrote:
>   
>> Hi,
>>
>> Please append the xbean.xml for your cxf se and cxf bc endpoint.
>>
>> Freeman
>>
>> jayasreeb wrote:
>>     
>>> Hi,
>>>
>>> I have created http web service "Hello" by following "cxf-wsdl-first"
>>> example.I have created a service engine,binding component and service
>>> assembly.I deployed webservice successfully in Servicemix.
>>>
>>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>>> I am successfully getting following wsdl.
>>>
>>>  <?xml version="1.0" encoding="utf-8" ?> 
>>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>>> - <wsdl:types>
>>> - <xsd:schema attributeFormDefault="unqualified"
>>> elementFormDefault="unqualified"
>>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>>> - <xsd:complexType name="sayHello">
>>> - <xsd:sequence>
>>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>>   </xsd:sequence>
>>>   </xsd:complexType>
>>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>>> - <xsd:complexType name="sayHelloResponse">
>>> - <xsd:sequence>
>>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>>   </xsd:sequence>
>>>   </xsd:complexType>
>>>   </xsd:schema>
>>>   </wsdl:types>
>>> - <wsdl:message name="sayHello">
>>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>>   </wsdl:message>
>>> - <wsdl:message name="sayHelloResponse">
>>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>>   </wsdl:message>
>>> - <wsdl:portType name="HelloTest">
>>> - <wsdl:operation name="sayHello">
>>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
>>>   </wsdl:operation>
>>>   </wsdl:portType>
>>> - <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
>>>   <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="HelloTestService">
>>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>>> name="HelloTestPort">
>>>   <soap:address location="http://localhost:9090/hello/" /> 
>>>   </wsdl:port>
>>>   </wsdl:service>
>>>   </wsdl:definitions>
>>>
>>>
>>> My requirement is to invoke this deployed web service from Axis 1.4.So I
>>> have created Axis client stubs by mentioning the above url and got the
>>> following classes.I used following command to get the client stubs.
>>>
>>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
>>> esri.aws.v2006 -v
>>>
>>> Following classes got generated :
>>>
>>> HelloTest.java
>>> HelloTestService.java
>>> HelloTestServiceLocator.java
>>> HelloTestServiceSoapBindingStub.java
>>>
>>> I created a client test class to access the java method sayHello() which
>>> is
>>> defined in Webservice deployed in Sevicemix.
>>>
>>> public class SuccessHelloClient {
>>> 	
>>> public static void main(String args[]){
>>> 	System.out.println("inside main of client test");
>>> 	HelloTestService hts = new HelloTestServiceLocator();
>>> 	//HelloTest ht = hts.getHelloTestPort();
>>> 	try{
>>> 		String output = hts.getHelloTestPort().sayHello("sree");
>>> 		System.out.println("output---"+output);
>>> 	}catch(Exception e){
>>> 		System.out.println("inside exception---"+e);
>>> 	}
>>> 	
>>> }
>>>
>>> I got the following error message..
>>>
>>>
>>> Could not find route for exchange: InOut[
>>>   id: ID:10.66.177.114-11adcc83874-2:0
>>>   status: Active
>>>   role: provider
>>>   interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>   service:
>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>>   operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>>> ] for service:
>>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
>>> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>>
>>>
>>>
>>> Please help me in resolving this as this is on high priority....
>>>
>>> I would like to know whether we can invoke Fuse webservice from AXIS?If
>>> so
>>> what are the steps required to do it?If not what do I need to do to
>>> invoke
>>> Web service deployed in Service mix from stand alone Java Program?
>>>
>>> Jayasree.B
>>>
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi,

Please find my cxf se xbean entry.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">

    <cxfse:endpoint>
        <cxfse:pojo>
          <bean
class="org.apache.servicemix.samples.webservice.HelloTestImpl" />
        </cxfse:pojo>
    </cxfse:endpoint>

</beans>


Please find my cxf bc entry

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
       xmlns:hello="http://swebservice.samples.servicemix.apache.org/">

  <cxfbc:consumer wsdl="classpath:Hello.wsdl"
                      targetService="hello:HelloTestService"
                      targetInterface="hello:HelloTest"/>

</beans>

Thanks for your help
Jayasree.B




Freeman Fang wrote:
> 
> Hi,
> 
> Please append the xbean.xml for your cxf se and cxf bc endpoint.
> 
> Freeman
> 
> jayasreeb wrote:
>> Hi,
>>
>> I have created http web service "Hello" by following "cxf-wsdl-first"
>> example.I have created a service engine,binding component and service
>> assembly.I deployed webservice successfully in Servicemix.
>>
>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>> I am successfully getting following wsdl.
>>
>>  <?xml version="1.0" encoding="utf-8" ?> 
>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>> - <wsdl:types>
>> - <xsd:schema attributeFormDefault="unqualified"
>> elementFormDefault="unqualified"
>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>> - <xsd:complexType name="sayHello">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>> - <xsd:complexType name="sayHelloResponse">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   </xsd:schema>
>>   </wsdl:types>
>> - <wsdl:message name="sayHello">
>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>   </wsdl:message>
>> - <wsdl:message name="sayHelloResponse">
>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>   </wsdl:message>
>> - <wsdl:portType name="HelloTest">
>> - <wsdl:operation name="sayHello">
>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
>>   </wsdl:operation>
>>   </wsdl:portType>
>> - <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
>>   <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="HelloTestService">
>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>> name="HelloTestPort">
>>   <soap:address location="http://localhost:9090/hello/" /> 
>>   </wsdl:port>
>>   </wsdl:service>
>>   </wsdl:definitions>
>>
>>
>> My requirement is to invoke this deployed web service from Axis 1.4.So I
>> have created Axis client stubs by mentioning the above url and got the
>> following classes.I used following command to get the client stubs.
>>
>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
>> esri.aws.v2006 -v
>>
>> Following classes got generated :
>>
>> HelloTest.java
>> HelloTestService.java
>> HelloTestServiceLocator.java
>> HelloTestServiceSoapBindingStub.java
>>
>> I created a client test class to access the java method sayHello() which
>> is
>> defined in Webservice deployed in Sevicemix.
>>
>> public class SuccessHelloClient {
>> 	
>> public static void main(String args[]){
>> 	System.out.println("inside main of client test");
>> 	HelloTestService hts = new HelloTestServiceLocator();
>> 	//HelloTest ht = hts.getHelloTestPort();
>> 	try{
>> 		String output = hts.getHelloTestPort().sayHello("sree");
>> 		System.out.println("output---"+output);
>> 	}catch(Exception e){
>> 		System.out.println("inside exception---"+e);
>> 	}
>> 	
>> }
>>
>> I got the following error message..
>>
>>
>> Could not find route for exchange: InOut[
>>   id: ID:10.66.177.114-11adcc83874-2:0
>>   status: Active
>>   role: provider
>>   interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>   service:
>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>   operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>> ] for service:
>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
>> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>
>>
>>
>> Please help me in resolving this as this is on high priority....
>>
>> I would like to know whether we can invoke Fuse webservice from AXIS?If
>> so
>> what are the steps required to do it?If not what do I need to do to
>> invoke
>> Web service deployed in Service mix from stand alone Java Program?
>>
>> Jayasree.B
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18209372.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

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

Please append the xbean.xml for your cxf se and cxf bc endpoint.

Freeman

jayasreeb wrote:
> Hi,
>
> I have created http web service "Hello" by following "cxf-wsdl-first"
> example.I have created a service engine,binding component and service
> assembly.I deployed webservice successfully in Servicemix.
>
> When I am giving "http://localhost:9090/hello/?wsdl" in browser
> I am successfully getting following wsdl.
>
>  <?xml version="1.0" encoding="utf-8" ?> 
> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
> - <wsdl:types>
> - <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="unqualified"
> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <xsd:element name="sayHello" type="tns:sayHello" /> 
> - <xsd:complexType name="sayHello">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
> - <xsd:complexType name="sayHelloResponse">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   </xsd:schema>
>   </wsdl:types>
> - <wsdl:message name="sayHello">
>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>   </wsdl:message>
> - <wsdl:message name="sayHelloResponse">
>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>   </wsdl:message>
> - <wsdl:portType name="HelloTest">
> - <wsdl:operation name="sayHello">
>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
>   </wsdl:operation>
>   </wsdl:portType>
> - <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
>   <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="HelloTestService">
> - <wsdl:port binding="tns:HelloTestServiceSoapBinding" name="HelloTestPort">
>   <soap:address location="http://localhost:9090/hello/" /> 
>   </wsdl:port>
>   </wsdl:service>
>   </wsdl:definitions>
>
>
> My requirement is to invoke this deployed web service from Axis 1.4.So I
> have created Axis client stubs by mentioning the above url and got the
> following classes.I used following command to get the client stubs.
>
> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
> esri.aws.v2006 -v
>
> Following classes got generated :
>
> HelloTest.java
> HelloTestService.java
> HelloTestServiceLocator.java
> HelloTestServiceSoapBindingStub.java
>
> I created a client test class to access the java method sayHello() which is
> defined in Webservice deployed in Sevicemix.
>
> public class SuccessHelloClient {
> 	
> public static void main(String args[]){
> 	System.out.println("inside main of client test");
> 	HelloTestService hts = new HelloTestServiceLocator();
> 	//HelloTest ht = hts.getHelloTestPort();
> 	try{
> 		String output = hts.getHelloTestPort().sayHello("sree");
> 		System.out.println("output---"+output);
> 	}catch(Exception e){
> 		System.out.println("inside exception---"+e);
> 	}
> 	
> }
>
> I got the following error message..
>
>
> Could not find route for exchange: InOut[
>   id: ID:10.66.177.114-11adcc83874-2:0
>   status: Active
>   role: provider
>   interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>   service:
> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>   operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
> ] for service:
> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>
>
>
> Please help me in resolving this as this is on high priority....
>
> I would like to know whether we can invoke Fuse webservice from AXIS?If so
> what are the steps required to do it?If not what do I need to do to invoke
> Web service deployed in Service mix from stand alone Java Program?
>
> Jayasree.B
>
>
>   


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by jayasreeb <ja...@infosys.com>.
Hi,

Problem got resolved as per suggestion given by freeman.Its was due to
improper annotation mentioned in Java file.

Faycel wrote:
> 
> Hi,
> 
> I think that you have a bad configuration, try to verify your Xbean
> configuration file and your wsdl file.
> 
> to invoke your web service from a java stansalone program you must first
> verify that your web service run correctly by for example lanching a
> browser and going to the
> http://localhost:Numerodeport/WebServiceName?nomMethode&param1=xx&param2=yy
> 
> If that return an xml file (soap format)with response, it's Ok that means
> your web service works correctly.
> 
> 
> 
> 
> 
> jayasreeb wrote:
>> 
>> Hi,
>> 
>> I have created http web service "Hello" by following "cxf-wsdl-first"
>> example.I have created a service engine,binding component and service
>> assembly.I deployed webservice successfully in Servicemix.
>> 
>> When I am giving "http://localhost:9090/hello/?wsdl" in browser
>> I am successfully getting following wsdl.
>> 
>>  <?xml version="1.0" encoding="utf-8" ?> 
>> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
>> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
>> - <wsdl:types>
>> - <xsd:schema attributeFormDefault="unqualified"
>> elementFormDefault="unqualified"
>> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>   <xsd:element name="sayHello" type="tns:sayHello" /> 
>> - <xsd:complexType name="sayHello">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
>> - <xsd:complexType name="sayHelloResponse">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   </xsd:schema>
>>   </wsdl:types>
>> - <wsdl:message name="sayHello">
>>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>>   </wsdl:message>
>> - <wsdl:message name="sayHelloResponse">
>>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>>   </wsdl:message>
>> - <wsdl:portType name="HelloTest">
>> - <wsdl:operation name="sayHello">
>>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
>>   </wsdl:operation>
>>   </wsdl:portType>
>> - <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
>>   <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="HelloTestService">
>> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
>> name="HelloTestPort">
>>   <soap:address location="http://localhost:9090/hello/" /> 
>>   </wsdl:port>
>>   </wsdl:service>
>>   </wsdl:definitions>
>> 
>> 
>> My requirement is to invoke this deployed web service from Axis 1.4.So I
>> have created Axis client stubs by mentioning the above url and got the
>> following classes.I used following command to get the client stubs.
>> 
>> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
>> esri.aws.v2006 -v
>> 
>> Following classes got generated :
>> 
>> HelloTest.java
>> HelloTestService.java
>> HelloTestServiceLocator.java
>> HelloTestServiceSoapBindingStub.java
>> 
>> I created a client test class to access the java method sayHello() which
>> is defined in Webservice deployed in Sevicemix.
>> 
>> public class SuccessHelloClient {
>> 	
>> public static void main(String args[]){
>> 	System.out.println("inside main of client test");
>> 	HelloTestService hts = new HelloTestServiceLocator();
>> 	//HelloTest ht = hts.getHelloTestPort();
>> 	try{
>> 		String output = hts.getHelloTestPort().sayHello("sree");
>> 		System.out.println("output---"+output);
>> 	}catch(Exception e){
>> 		System.out.println("inside exception---"+e);
>> 	}
>> 	
>> }
>> 
>> I got the following error message..
>> 
>> 
>> Could not find route for exchange: InOut[
>>   id: ID:10.66.177.114-11adcc83874-2:0
>>   status: Active
>>   role: provider
>>   interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>>   service:
>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>>   operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
>> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
>> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
>> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
>> ] for service:
>> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
>> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>> 
>> 
>> 
>> Please help me in resolving this as this is on high priority....
>> 
>> I would like to know whether we can invoke Fuse webservice from AXIS?If
>> so what are the steps required to do it?If not what do I need to do to
>> invoke Web service deployed in Service mix from stand alone Java Program?
>> 
>> Jayasree.B
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18211704.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Urgent ::jbi.messaging.MessagingException:Could not find route for exchange:Inout

Posted by Faycel <fa...@gmail.com>.
Hi,

I think that you have a bad configuration, try to verify your Xbean
configuration file and your wsdl file.

to invoke your web service from a java stansalone program you must first
verify that your web service run correctly by for example lanching a browser
and going to the
http://localhost:Numerodeport/WebServiceName?nomMethode&param1=xx&param2=yy

If that return an xml file (soap format)with response, it's Ok that means
your web service works correctly.





jayasreeb wrote:
> 
> Hi,
> 
> I have created http web service "Hello" by following "cxf-wsdl-first"
> example.I have created a service engine,binding component and service
> assembly.I deployed webservice successfully in Servicemix.
> 
> When I am giving "http://localhost:9090/hello/?wsdl" in browser
> I am successfully getting following wsdl.
> 
>  <?xml version="1.0" encoding="utf-8" ?> 
> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloTestService"
> targetNamespace="http://swebservice.samples.servicemix.apache.org/">
> - <wsdl:types>
> - <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="unqualified"
> targetNamespace="http://swebservice.samples.servicemix.apache.org/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://swebservice.samples.servicemix.apache.org/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <xsd:element name="sayHello" type="tns:sayHello" /> 
> - <xsd:complexType name="sayHello">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="arg0" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse" /> 
> - <xsd:complexType name="sayHelloResponse">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="return" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   </xsd:schema>
>   </wsdl:types>
> - <wsdl:message name="sayHello">
>   <wsdl:part element="tns:sayHello" name="parameters" /> 
>   </wsdl:message>
> - <wsdl:message name="sayHelloResponse">
>   <wsdl:part element="tns:sayHelloResponse" name="parameters" /> 
>   </wsdl:message>
> - <wsdl:portType name="HelloTest">
> - <wsdl:operation name="sayHello">
>   <wsdl:input message="tns:sayHello" name="sayHello" /> 
>   <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse" /> 
>   </wsdl:operation>
>   </wsdl:portType>
> - <wsdl:binding name="HelloTestServiceSoapBinding" type="tns:HelloTest">
>   <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="HelloTestService">
> - <wsdl:port binding="tns:HelloTestServiceSoapBinding"
> name="HelloTestPort">
>   <soap:address location="http://localhost:9090/hello/" /> 
>   </wsdl:port>
>   </wsdl:service>
>   </wsdl:definitions>
> 
> 
> My requirement is to invoke this deployed web service from Axis 1.4.So I
> have created Axis client stubs by mentioning the above url and got the
> following classes.I used following command to get the client stubs.
> 
> java org.apache.axis.wsdl.WSDL2Java http://localhost:9090/hello/?wsdl -p
> esri.aws.v2006 -v
> 
> Following classes got generated :
> 
> HelloTest.java
> HelloTestService.java
> HelloTestServiceLocator.java
> HelloTestServiceSoapBindingStub.java
> 
> I created a client test class to access the java method sayHello() which
> is defined in Webservice deployed in Sevicemix.
> 
> public class SuccessHelloClient {
> 	
> public static void main(String args[]){
> 	System.out.println("inside main of client test");
> 	HelloTestService hts = new HelloTestServiceLocator();
> 	//HelloTest ht = hts.getHelloTestPort();
> 	try{
> 		String output = hts.getHelloTestPort().sayHello("sree");
> 		System.out.println("output---"+output);
> 	}catch(Exception e){
> 		System.out.println("inside exception---"+e);
> 	}
> 	
> }
> 
> I got the following error message..
> 
> 
> Could not find route for exchange: InOut[
>   id: ID:10.66.177.114-11adcc83874-2:0
>   status: Active
>   role: provider
>   interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
>   service:
> {http://swebservice.samples.servicemix.apache.org/}HelloTestService
>   operation: {http://swebservice.samples.servicemix.apache.org/}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://swebservice.samples.servicemix.apache.org/"
> name="sayHello" type="msg:sayHello" version="1.0"><jbi:part><sayHello
> xmlns="http://swebservice.samples.servicemix.apache.org/"><arg0
> xmlns="">sree</arg0></sayHello></jbi:part></jbi:message>
> ] for service:
> {http://swebservice.samples.servicemix.apache.org/}HelloTestService and
> interface: {http://swebservice.samples.servicemix.apache.org/}HelloTest
> 
> 
> 
> Please help me in resolving this as this is on high priority....
> 
> I would like to know whether we can invoke Fuse webservice from AXIS?If so
> what are the steps required to do it?If not what do I need to do to invoke
> Web service deployed in Service mix from stand alone Java Program?
> 
> Jayasree.B
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-%3A%3Ajbi.messaging.MessagingException%3ACould-not-find-route-for-exchange%3AInout-tp18208994p18211608.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.