You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by hgkrt <hg...@yahoo.co.jp> on 2007/06/18 07:32:38 UTC

servicemix-http with wsdl deployment ...

i have made a SA use serivcemix-http(consumer) and jsr181(wsdl-first), worked
fine(servicemix debug mode).

here is the xbean files...

http-su's xbean.xml


>   <http:endpoint service="ns1:Service"
>                  endpoint="endpoint1"
>                  role="consumer" 
>                  locationURI="http://0.0.0.0:8192/Service/"
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                  soap="true" />
> 

jsr181's xbean.xml


>     <jsr181:endpoint pojoClass="samples.ServiceImpl"
>                      wsdlResource="classpath:service.wsdl"
>                      style="document" />
> 

then I want to change it to use servicemix-http with wsdl deployment..

so I change the http-bc's xbean.xml file to this:


>   <http:endpoint service="ns1:Service"
>                  endpoint="endpoint1"
>                  role="consumer" 
>                  locationURI="http://0.0.0.0:8192/Service/"
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                  wsdlResource="classpath:service.wsdl"
>                  soap="true" />
> 

and put the service.wsdl file to the same directory with xbean.xml, and
delete jsr181-su..

but when i run it on SoapUI , i get this error:


> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 </title>
> </head>
> <body><h2>HTTP ERROR: 500</h2><pre>Could not find route for exchange:
> InOut[
>   id: ID:ngofcl0256-2217-1182142887015-2:17
>   status: Active
>   role: provider
>   service: {http://www.ntts.co.jp/crm/samples}Service1
>   operation: {http://www.ntts.co.jp/crm/samples}echoMethod
>   in: &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;sam:echoMethod
> xmlns:sam="http://www.ntts.co.jp/crm/samples"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
>          &lt;sam:value&gt;Hello James Smith&lt;/sam:value&gt;
>       &lt;/sam:echoMethod&gt;
> ] for service: {http://www.ntts.co.jp/crm/samples}Service1 and interface:
> null</pre>
> <p>RequestURI=/Service1/</p><h3>Caused
> by:</h3><pre>javax.jbi.messaging.MessagingException: Could not find route
> for exchange: InOut[
>   id: ID:ngofcl0256-2217-1182142887015-2:17
>   status: Active
>   role: provider
>   service: {http://www.ntts.co.jp/crm/samples}Service1
>   operation: {http://www.ntts.co.jp/crm/samples}echoMethod
>   in: <?xml version="1.0" encoding="UTF-8"?><sam:echoMethod
> xmlns:sam="http://www.ntts.co.jp/crm/samples"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>          <sam:value>Hello James Smith</sam:value>
>       </sam:echoMethod>
> ] for service: {http://www.ntts.co.jp/crm/samples}Service1 and interface:
> null
> 	at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:295)
> 	at
> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> 	at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> 	at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:381)
> 	at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:417)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.sendConsumerExchange(AsyncBaseLifeCycle.java:546)
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:183)
> 	at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
> 	at org.mortbay.jetty.Server.handle(Server.java:265)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:701)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:617)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
> 	at
> org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> </pre>
> <p><small> http://jetty.mortbay.org/ Powered by Jetty:// </small></p><br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> <br/>                                                
> 
> </body>
> </html>
> 

what do i need to make the servicemix-http wsdl deployment work ?

thanks,
hgkrt
-- 
View this message in context: http://www.nabble.com/servicemix-http-with-wsdl-deployment-...-tf3938368s12049.html#a11170187
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-http with wsdl deployment ...

Posted by hgkrt <hg...@yahoo.co.jp>.
Thanks, Gert.

I want to try http wsdl deployment, so it still need a service(just like
jsr181-su(without wsdl file but have the java class(logic)) to run.

I will try it later.

Now i have a new question.

I use servicemix-jsr181-annotated-service-unit to make a su ,and i can
generate a wsdl file on
runtime(access http://localhost:8192/Service/?wsdl, i can see the wsdl
file), can i generate wsdl file on compile ? (like: mvn generate-wsdl)

I tried sometimes, still can't make it work.


Gert Vanthienen wrote:
> 
> L.S.,
> 
> 
> An HTTP consumer endpoint configuration creates an external endpoint.  It
> can be used to expose another endpoint to the outside world using
> HTTP/SOAP.  When you removed the JSR-181 SU, you removed the internal
> endpoint that was being made available.  If you now send an HTTP request
> to the consumer endpoint, there no longer is a service on the ESB that is
> able to do anything with the request.
> 
> What exactly are you trying to achieve? 
> 
> 
> Gert
> 
> 
> 
> hgkrt wrote:
>> 
>> here is my service.wsdl file for more information..
>> i just add the jbi endpoint as described on the servicemix-http page.
>> 
>> 
>> 
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <wsdl:definitions targetNamespace="http://www.ntts.co.jp/crm/samples" 
>>> xmlns:tns="http://www.ntts.co.jp/crm/samples" 
>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="service"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>>> xmlns:jbi="http://servicemix.org/wsdl/jbi/">
>>> 
>>> <wsdl:types>
>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>> attributeFormDefault="qualified" 
>>> elementFormDefault="qualified" 
>>> targetNamespace="http://www.ntts.co.jp/crm/samples">
>>> <xsd:element name="echoMethod">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element maxOccurs="1" minOccurs="1" name="value" nillable="true"
>>> type="xsd:string"/>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> <xsd:element name="echoMethodResponse">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true"
>>> type="xsd:string"/>
>>> </xsd:sequence>
>>> 
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:schema>
>>>   </wsdl:types>
>>>   <wsdl:message name="echoMethodResponse">
>>>     <wsdl:part name="parameters" element="tns:echoMethodResponse">
>>>     </wsdl:part>
>>>   </wsdl:message>
>>>   <wsdl:message name="echoMethodRequest">
>>>     <wsdl:part name="parameters" element="tns:echoMethod">
>>>     </wsdl:part>
>>>   </wsdl:message>
>>>   <wsdl:portType name="servicePortType">
>>>     <wsdl:operation name="echoMethod">
>>>       <wsdl:input name="echoMethodRequest"
>>> message="tns:echoMethodRequest">
>>>     </wsdl:input>
>>>       <wsdl:output name="echoMethodResponse"
>>> message="tns:echoMethodResponse">
>>>     </wsdl:output>
>>>     </wsdl:operation>
>>> 
>>>   </wsdl:portType>
>>>   <wsdl:binding name="serviceHttpBinding" type="tns:servicePortType">
>>>     <wsdlsoap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>     <wsdl:operation name="echoMethod">
>>>       <wsdlsoap:operation soapAction=""/>
>>>       <wsdl:input name="echoMethodRequest">
>>>         <wsdlsoap:body use="literal"/>
>>>       </wsdl:input>
>>>       <wsdl:output name="echoMethodResponse">
>>>         <wsdlsoap:body use="literal"/>
>>>       </wsdl:output>
>>>     </wsdl:operation>
>>>   </wsdl:binding>
>>>   <wsdl:service name="Service">
>>>     <wsdl:port name="endpoint1" binding="tns:serviceHttpBinding">
>>>       <wsdlsoap:address location="http://localhost:8192/Service"/>
>>>       <jbi:endpoint role="consumer" defaultMep="in-out"/>
>>>     </wsdl:port>
>>>   </wsdl:service>
>>> 
>>> </wsdl:definitions>
>>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-http-with-wsdl-deployment-...-tf3938368s12049.html#a11188885
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-http with wsdl deployment ...

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,


An HTTP consumer endpoint configuration creates an external endpoint.  It
can be used to expose another endpoint to the outside world using HTTP/SOAP. 
When you removed the JSR-181 SU, you removed the internal endpoint that was
being made available.  If you now send an HTTP request to the consumer
endpoint, there no longer is a service on the ESB that is able to do
anything with the request.

What exactly are you trying to achieve? 


Gert



hgkrt wrote:
> 
> here is my service.wsdl file for more information..
> i just add the jbi endpoint as described on the servicemix-http page.
> 
> 
> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions targetNamespace="http://www.ntts.co.jp/crm/samples" 
>> xmlns:tns="http://www.ntts.co.jp/crm/samples" 
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="service"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>> xmlns:jbi="http://servicemix.org/wsdl/jbi/">
>> 
>> <wsdl:types>
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>> attributeFormDefault="qualified" 
>> elementFormDefault="qualified" 
>> targetNamespace="http://www.ntts.co.jp/crm/samples">
>> <xsd:element name="echoMethod">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element maxOccurs="1" minOccurs="1" name="value" nillable="true"
>> type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> <xsd:element name="echoMethodResponse">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true"
>> type="xsd:string"/>
>> </xsd:sequence>
>> 
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:schema>
>>   </wsdl:types>
>>   <wsdl:message name="echoMethodResponse">
>>     <wsdl:part name="parameters" element="tns:echoMethodResponse">
>>     </wsdl:part>
>>   </wsdl:message>
>>   <wsdl:message name="echoMethodRequest">
>>     <wsdl:part name="parameters" element="tns:echoMethod">
>>     </wsdl:part>
>>   </wsdl:message>
>>   <wsdl:portType name="servicePortType">
>>     <wsdl:operation name="echoMethod">
>>       <wsdl:input name="echoMethodRequest"
>> message="tns:echoMethodRequest">
>>     </wsdl:input>
>>       <wsdl:output name="echoMethodResponse"
>> message="tns:echoMethodResponse">
>>     </wsdl:output>
>>     </wsdl:operation>
>> 
>>   </wsdl:portType>
>>   <wsdl:binding name="serviceHttpBinding" type="tns:servicePortType">
>>     <wsdlsoap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>     <wsdl:operation name="echoMethod">
>>       <wsdlsoap:operation soapAction=""/>
>>       <wsdl:input name="echoMethodRequest">
>>         <wsdlsoap:body use="literal"/>
>>       </wsdl:input>
>>       <wsdl:output name="echoMethodResponse">
>>         <wsdlsoap:body use="literal"/>
>>       </wsdl:output>
>>     </wsdl:operation>
>>   </wsdl:binding>
>>   <wsdl:service name="Service">
>>     <wsdl:port name="endpoint1" binding="tns:serviceHttpBinding">
>>       <wsdlsoap:address location="http://localhost:8192/Service"/>
>>       <jbi:endpoint role="consumer" defaultMep="in-out"/>
>>     </wsdl:port>
>>   </wsdl:service>
>> 
>> </wsdl:definitions>
>> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-http-with-wsdl-deployment-...-tf3938368s12049.html#a11173376
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-http with wsdl deployment ...

Posted by hgkrt <hg...@yahoo.co.jp>.
here is my service.wsdl file for more information..
i just add the jbi endpoint as described on the servicemix-http page.



> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://www.ntts.co.jp/crm/samples" 
> xmlns:tns="http://www.ntts.co.jp/crm/samples" 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="service"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
> xmlns:jbi="http://servicemix.org/wsdl/jbi/">
> 
> <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> attributeFormDefault="qualified" 
> elementFormDefault="qualified" 
> targetNamespace="http://www.ntts.co.jp/crm/samples">
> <xsd:element name="echoMethod">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="value" nillable="true"
> type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="echoMethodResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true"
> type="xsd:string"/>
> </xsd:sequence>
> 
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="echoMethodResponse">
>     <wsdl:part name="parameters" element="tns:echoMethodResponse">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="echoMethodRequest">
>     <wsdl:part name="parameters" element="tns:echoMethod">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:portType name="servicePortType">
>     <wsdl:operation name="echoMethod">
>       <wsdl:input name="echoMethodRequest"
> message="tns:echoMethodRequest">
>     </wsdl:input>
>       <wsdl:output name="echoMethodResponse"
> message="tns:echoMethodResponse">
>     </wsdl:output>
>     </wsdl:operation>
> 
>   </wsdl:portType>
>   <wsdl:binding name="serviceHttpBinding" type="tns:servicePortType">
>     <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="echoMethod">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="echoMethodRequest">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output name="echoMethodResponse">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="Service">
>     <wsdl:port name="endpoint1" binding="tns:serviceHttpBinding">
>       <wsdlsoap:address location="http://localhost:8192/Service"/>
>       <jbi:endpoint role="consumer" defaultMep="in-out"/>
>     </wsdl:port>
>   </wsdl:service>
> 
> </wsdl:definitions>
> 
-- 
View this message in context: http://www.nabble.com/servicemix-http-with-wsdl-deployment-...-tf3938368s12049.html#a11170824
Sent from the ServiceMix - User mailing list archive at Nabble.com.