You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Guillaume Nodet <gn...@gmail.com> on 2008/04/25 09:05:15 UTC

Re: Why every http request goes to main.wsdl?

If you check the link, it goes straight to the wsdl.
Just remove the ?wsdl from the url if you want to hit the service instead.

On Fri, Apr 25, 2008 at 9:04 AM, pratibhaG <pr...@in2m.com> wrote:
>
>
>  Hi,
>  I am using smx 3.2.1
>  I have tried many examples where I am using serviceMix-http as consumer.
>  Here is my Xbean.xml file
>  <?xml version="1.0" encoding="UTF-8"?>
>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:test="http://test">
>         <http:endpoint service="test:MyHttpTest"
>                  endpoint="http-binding"
>                  targetService="test:MyStaticRoutingSlipServiceforhttp"
>                  targetEndpoint="myStaticRoutingSlipSuforhttp"
>                  role="consumer"
>                                  defaultOperation="test:processThis"
>                  locationURI="http://localhost:8192/mylistenHttp/"
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                  soap="true"/>
>  </beans>
>  When I hit URL http://localhost:8192
>  It gives me following response
>
>  Error 404 - Not Found.
>  No service matched or handled this request.
>  Known services are:
>  http://localhost:8192/mylistenHttp/
>
>  When I hit URL http://localhost:8192/mylistenHttp/  from this page, it gives
>  me following response:
>
>  HTTP ERROR: 404
>  Unable to find requested resource
>  RequestURI=/mylistenHttp/main.wsdl
>  Powered by Jetty://
>
>  Please help me to understand  why so?
>
>
>
>  Thanks,
>  Pratibha
>  --
>  View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16891783.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Why every http request goes to main.wsdl?

Posted by kapilsharma <ka...@thejavaworld.com>.
I'm using http post and don't want to write marshaler for normal HTTP post
request. My full code and flow are given below. Please let me know if you
could find the possible reason of error.

http://www.nabble.com/file/p17098335/SMX-Test-Flow.jpg 

HTTP service1(test.html) is nothing but simple http page with following
code:
----------------------------------------------------------------------------------------------------------------------------------
<html>
	<head>
		<title>Test</title>
	</head>
	<body>
		<form action="http://localhost:8192/PortalCommExample/" method="post">
			<input name="testKey" type="text"/>
			<input type="submit"/>
		</form>
	</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------

xbean.xml for first BC is as follow
----------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
		xmlns:test="http://www.mysite.com/abcde">
	<http:endpoint service="test:MyHttpReceiver"
                endpoint="receiverConsumer"
				targetService="test:MyProviderService"
                role="consumer"
				soap="false"
				defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                locationURI="http://localhost:8192/PortalCommExample/"/>
</beans>
----------------------------------------------------------------------------------------------------------------------------------

xbean.xml for second BC is as follow

----------------------------------------------------------------------------------------------------------------------------------
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
		xmlns:test="http://www.mysite.com/abcd">
	<http:endpoint service="test:MyProviderService"
                endpoint="senderProvider"
                role="provider" 
                locationURI="http://0.0.0.0/esbtest/testService1.php" 
				defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
</beans>
----------------------------------------------------------------------------------------------------------------------------------

HTTP service 2 (testService1.php) is as follow
----------------------------------------------------------------------------------------------------------------------------------
<?PHP
$testKey = $_REQUEST("testKey");
echo "<html><body>testKey=".$testKey."</body></html>";
?>
----------------------------------------------------------------------------------------------------------------------------------

The error I'm getting on Service Mix console is as follow
----------------------------------------------------------------------------------------------------------------------------------
DEBUG - JettyContextManager            - Dispatching job:
SCEP@32596007[d=true,io=0,w=true,b=false|false]
DEBUG - jetty                          - REQUEST /PortalCommExample/ on
org.mortbay.jetty.HttpConnection@1dfba0e
DEBUG - jetty                          - servlet=jbiServlet
DEBUG - jetty                          - chain=null
DEBUG - jetty                          - servlet holder=jbiServlet
DEBUG - ConsumerProcessor              - Receiving HTTP request: POST
/PortalCommExample/ HTTP/1.1
Host: localhost:8192
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.12)
Gecko/20080201 Firefox/2.0.0.12
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost/esbtest/test.html
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 15


DEBUG - HttpComponent                  - Created correlation id:
ID:192.168.2.71-119c1f8b0b1-17:3
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.71-119c1f8b0b1-17:3 in DeliveryChannel{servicemix-http}
WARN  - DefaultBroker                  - ServiceName
({http://www.mysite.com/abcde}MyProviderService) specified for routing, but
can't find it registered
WARN  - DefaultBroker                  - ServiceName
({http://www.mysite.com/abcde}MyProviderService) specified for routing, but
can't find it registered
[Fatal Error] :1:1: Content is not allowed in prolog.
DEBUG - DeliveryChannelImpl            - Exception processing:
ID:192.168.2.71-119c1f8b0b1-17:3 in DeliveryChannel{servicemix-http}
WARN  - jetty                          - /PortalCommExample/
java.lang.IllegalStateException: Cannot write non xml faults for non soap
messages
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
        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:487)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:309)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
DEBUG - jetty                          - POST /PortalCommExample/ HTTP/1.1
Host: localhost:8192
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.12)
Gecko/20080201 Firefox/2.0.0.12
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost/esbtest/test.html
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 15


DEBUG - jetty                          - RESPONSE /PortalCommExample/  500
DEBUG - jetty                          - continuation still pending null
DEBUG - jetty                          - continuation
RetryContinuation@6378979,new

----------------------------------------------------------------------------------------------------------------------------------

On browser, I'm getting following message
----------------------------------------------------------------------------------------------------------------------------------
HTTP ERROR: 500

Cannot write non xml faults for non soap messages

RequestURI=/PortalCommExample/
Caused by:

java.lang.IllegalStateException: Cannot write non xml faults for non soap
messages
	at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
	at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
	at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
	at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
	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:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
	at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:309)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
	at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Powered by Jetty://
----------------------------------------------------------------------------------------------------------------------------------

The error says, "Cannot write non xml faults for non soap messages". I'm
wondering why xml and soap are coming in picture?
-- 
View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17098335.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Why every http request goes to main.wsdl?

Posted by Guillaume Nodet <gn...@gmail.com>.
Sorry, I misread you as i thought you said your were using servicemix
to mock a service exposed on the uri.
So i don't see why it would not work, but unless you plan to use http
post, you'd have to write your own custom http marshaler.

On Tue, May 6, 2008 at 4:18 PM, kapilsharma
<ka...@thejavaworld.com> wrote:
>
>  Hi gnodet,
>
>  Thanks for the reply.
>
>  You told that I should not append testService1.php
>
>  Just to clear, testService1.php is a completely separate URL outside JBI
>  environment and running on apache server. Right now I'm having apache
>  server(PHP), tomcat(J2EE) and SMX on same machine but in future, it might be
>  running on different physical server (Machines). In that example, I just
>  wanted to hit it a PHP (or JSP) page through Servicemix (SMX->HTTP
>  Protocol-> PHP Service).
>
>  An ESB is used as a common communication gateway between different
>  technology (J2EE, ASP, PHP etc). If I could not hit a php page through
>  servicemix, is it mean Service mix is developed for web-services based on
>  Java technologies only. Is it correct?
>
>  My flow is very normal
>  Browser->SMX->PHPWebPage.
>
>  I can easily do Browser->PHPWebPage but I want to do it through SMX for
>  testing purpose. I think it is one of the most simple example.
>
>  Are you sure Service mix can not hit a PHP page?
>
>
>
>
>  gnodet wrote:
>  >
>  > I don't think you can expose a service on the following uri :
>  >    http://localhost/esbtest/testService1.php
>  >
>  > You should be able to use:
>  >    http://localhost/esbtest/
>  > instead.
>  >
>  >
>  > On Tue, May 6, 2008 at 8:20 AM, kapilsharma
>  > <ka...@thejavaworld.com> wrote:
>  >>
>  >>  Gnodet, Pratibha,
>  >>
>  >>  Did you solved the problem?
>  >>
>  >>  My problem is a bit similar. I'll be a lot thankful if anyone of you let
>  >> me
>  >>  know the problems with my or have could provide any hint. My problem is
>  >>  given below:
>  >>
>  >>  Diagram below shows the flow I'm trying to achieve with Service Mix
>  >> 3.2.1
>  >>
>  >>  http://www.nabble.com/file/p17073134/SMX-Test-Flow.jpg
>  >>
>  >>  When I hit "http://localhost:8192/PortalCommExample/" (Above BC in
>  >> diagram)
>  >>  from browser, I'm expecting to get response from
>  >>  "http://localhost/esbtest/testService1.php" (HTTP Service 2) but I'm
>  >> getting
>  >>  error "resource not found".
>  >>
>  >>  Although it doesn't make any sense, but for testing purpose, I'm trying
>  >> to
>  >>  hit HTTP Service 2 from HTTP Service 1 (Ideally Web browser) using SMX
>  >>  (Service Mix). At that moment, I don't want SMX, to implement any logic
>  >> thus
>  >>  I'm not having any Service Engine. Again I'm not using SOAP request, its
>  >>  just simple HTTP request-response.
>  >>
>  >>  For this I have 2 Service Unit (for 2 BC) and a SA. xbean.xml of 2 SU
>  >> are as
>  >>  follow.
>  >>
>  >>
>  >>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>  >>                 xmlns:test="http://www.abc.com/abcde">
>  >>         <http:endpoint service="test:MyHttpReceiver"
>  >>                 endpoint="receiverConsumer"
>  >>                 targetService="test:MyProviderService"
>  >>                 role="consumer"
>  >>                 soap="false"
>  >>                 locationURI="http://localhost:8192/PortalCommExample/"/>
>  >>  </beans>
>  >>
>  >>  and
>  >>
>  >>
>  >>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>  >>                 xmlns:test="http://www.abc.com/abcde">
>  >>         <http:endpoint service="test:MyProviderService"
>  >>                 endpoint="senderProvider"
>  >>                 role="provider"
>  >>                 soap="false"
>  >>                 locationURI="http://localhost/esbtest/testService1.php"
>  >> />
>  >>  </beans>
>  >>
>  >>  It would be helpful if someone let me know if I'm trying it in wrong
>  >> manner.
>  >>  (I know this example doesn't make a lot of sense). I don't want to
>  >> define
>  >>  WSDL or any routing as I'm sure which end-point i need to hit. Now this
>  >>  failure raises few questions for me.
>  >>  1. Do I always need to define WSDL. I think its standard format for NMR
>  >> but
>  >>  shouldn't SMX-HTTP BC converts it in NMR specific format?
>  >>  2. Can two BC communicate with each other without SE or SE is must?
>  >>  3. Don't SMX provide way for simple HTTP request? All examples that I
>  >> saw
>  >>  are using SOAP request and WSDL.
>  >>  4. How can I achieve required flow?
>  >>
>  >>
>  >>
>  >>
>  >>  gnodet wrote:
>  >>  >
>  >>  > You can't.  This page listing the services is generated and is
>  >>  > provided for convenience only.
>  >>  > If you go to http://localhost:8192/mylistenHttp/, you won't see the
>  >>  > wsdl, this only happens if you click on the link, because the link
>  >>  > shows the address of the service but points to the wsdl.  Makes sense
>  >>  > ?
>  >>  >
>  >>  > On Fri, Apr 25, 2008 at 2:55 PM, pratibhaG <pr...@in2m.com>
>  >>  > wrote:
>  >>  >>
>  >>  >>  Thanks a lot for your reply,
>  >>  >>  I guess this is some default or welcome file. May be there is some
>  >>  >>  configuration which tells that if I hit URL
>  >>  >>  "http://localhost:8192/mylistenHttp/", then main.wsdl will be
>  >> invoked?
>  >>  >>  where does this file reside? If I want to invoke some custom file
>  >> say
>  >>  >>  mywsdl.wsdl how would I do that?
>  >>  >>  Please reply
>  >>  >>  Thanks once again
>  >>  >>  -Pratibha
>  >>  >>
>  >>  >>  --
>  >>  >>  View this message in context:
>  >>  >>
>  >> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
>  >>  >>
>  >>  >>
>  >>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>  >>  >>
>  >>  >>
>  >>  >
>  >>  >
>  >>  >
>  >>  > --
>  >>  > Cheers,
>  >>  > Guillaume Nodet
>  >>  > ------------------------
>  >>  > Blog: http://gnodet.blogspot.com/
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17073134.html
>  >>
>  >>
>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > Cheers,
>  > Guillaume Nodet
>  > ------------------------
>  > Blog: http://gnodet.blogspot.com/
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17083524.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Why every http request goes to main.wsdl?

Posted by kapilsharma <ka...@thejavaworld.com>.
Hi gnodet,

Thanks for the reply.

You told that I should not append testService1.php

Just to clear, testService1.php is a completely separate URL outside JBI
environment and running on apache server. Right now I'm having apache
server(PHP), tomcat(J2EE) and SMX on same machine but in future, it might be
running on different physical server (Machines). In that example, I just
wanted to hit it a PHP (or JSP) page through Servicemix (SMX->HTTP
Protocol-> PHP Service).

An ESB is used as a common communication gateway between different
technology (J2EE, ASP, PHP etc). If I could not hit a php page through
servicemix, is it mean Service mix is developed for web-services based on
Java technologies only. Is it correct?

My flow is very normal
Browser->SMX->PHPWebPage.

I can easily do Browser->PHPWebPage but I want to do it through SMX for
testing purpose. I think it is one of the most simple example.

Are you sure Service mix can not hit a PHP page?


gnodet wrote:
> 
> I don't think you can expose a service on the following uri :
>    http://localhost/esbtest/testService1.php
> 
> You should be able to use:
>    http://localhost/esbtest/
> instead.
> 
> 
> On Tue, May 6, 2008 at 8:20 AM, kapilsharma
> <ka...@thejavaworld.com> wrote:
>>
>>  Gnodet, Pratibha,
>>
>>  Did you solved the problem?
>>
>>  My problem is a bit similar. I'll be a lot thankful if anyone of you let
>> me
>>  know the problems with my or have could provide any hint. My problem is
>>  given below:
>>
>>  Diagram below shows the flow I'm trying to achieve with Service Mix
>> 3.2.1
>>
>>  http://www.nabble.com/file/p17073134/SMX-Test-Flow.jpg
>>
>>  When I hit "http://localhost:8192/PortalCommExample/" (Above BC in
>> diagram)
>>  from browser, I'm expecting to get response from
>>  "http://localhost/esbtest/testService1.php" (HTTP Service 2) but I'm
>> getting
>>  error "resource not found".
>>
>>  Although it doesn't make any sense, but for testing purpose, I'm trying
>> to
>>  hit HTTP Service 2 from HTTP Service 1 (Ideally Web browser) using SMX
>>  (Service Mix). At that moment, I don't want SMX, to implement any logic
>> thus
>>  I'm not having any Service Engine. Again I'm not using SOAP request, its
>>  just simple HTTP request-response.
>>
>>  For this I have 2 Service Unit (for 2 BC) and a SA. xbean.xml of 2 SU
>> are as
>>  follow.
>>
>>
>>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>                 xmlns:test="http://www.abc.com/abcde">
>>         <http:endpoint service="test:MyHttpReceiver"
>>                 endpoint="receiverConsumer"
>>                 targetService="test:MyProviderService"
>>                 role="consumer"
>>                 soap="false"
>>                 locationURI="http://localhost:8192/PortalCommExample/"/>
>>  </beans>
>>
>>  and
>>
>>
>>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>                 xmlns:test="http://www.abc.com/abcde">
>>         <http:endpoint service="test:MyProviderService"
>>                 endpoint="senderProvider"
>>                 role="provider"
>>                 soap="false"
>>                 locationURI="http://localhost/esbtest/testService1.php"
>> />
>>  </beans>
>>
>>  It would be helpful if someone let me know if I'm trying it in wrong
>> manner.
>>  (I know this example doesn't make a lot of sense). I don't want to
>> define
>>  WSDL or any routing as I'm sure which end-point i need to hit. Now this
>>  failure raises few questions for me.
>>  1. Do I always need to define WSDL. I think its standard format for NMR
>> but
>>  shouldn't SMX-HTTP BC converts it in NMR specific format?
>>  2. Can two BC communicate with each other without SE or SE is must?
>>  3. Don't SMX provide way for simple HTTP request? All examples that I
>> saw
>>  are using SOAP request and WSDL.
>>  4. How can I achieve required flow?
>>
>>
>>
>>
>>  gnodet wrote:
>>  >
>>  > You can't.  This page listing the services is generated and is
>>  > provided for convenience only.
>>  > If you go to http://localhost:8192/mylistenHttp/, you won't see the
>>  > wsdl, this only happens if you click on the link, because the link
>>  > shows the address of the service but points to the wsdl.  Makes sense
>>  > ?
>>  >
>>  > On Fri, Apr 25, 2008 at 2:55 PM, pratibhaG <pr...@in2m.com>
>>  > wrote:
>>  >>
>>  >>  Thanks a lot for your reply,
>>  >>  I guess this is some default or welcome file. May be there is some
>>  >>  configuration which tells that if I hit URL
>>  >>  "http://localhost:8192/mylistenHttp/", then main.wsdl will be
>> invoked?
>>  >>  where does this file reside? If I want to invoke some custom file
>> say
>>  >>  mywsdl.wsdl how would I do that?
>>  >>  Please reply
>>  >>  Thanks once again
>>  >>  -Pratibha
>>  >>
>>  >>  --
>>  >>  View this message in context:
>>  >>
>> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
>>  >>
>>  >>
>>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > Cheers,
>>  > Guillaume Nodet
>>  > ------------------------
>>  > Blog: http://gnodet.blogspot.com/
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17073134.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17083524.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Why every http request goes to main.wsdl?

Posted by Guillaume Nodet <gn...@gmail.com>.
I don't think you can expose a service on the following uri :
   http://localhost/esbtest/testService1.php

You should be able to use:
   http://localhost/esbtest/
instead.


On Tue, May 6, 2008 at 8:20 AM, kapilsharma
<ka...@thejavaworld.com> wrote:
>
>  Gnodet, Pratibha,
>
>  Did you solved the problem?
>
>  My problem is a bit similar. I'll be a lot thankful if anyone of you let me
>  know the problems with my or have could provide any hint. My problem is
>  given below:
>
>  Diagram below shows the flow I'm trying to achieve with Service Mix 3.2.1
>
>  http://www.nabble.com/file/p17073134/SMX-Test-Flow.jpg
>
>  When I hit "http://localhost:8192/PortalCommExample/" (Above BC in diagram)
>  from browser, I'm expecting to get response from
>  "http://localhost/esbtest/testService1.php" (HTTP Service 2) but I'm getting
>  error "resource not found".
>
>  Although it doesn't make any sense, but for testing purpose, I'm trying to
>  hit HTTP Service 2 from HTTP Service 1 (Ideally Web browser) using SMX
>  (Service Mix). At that moment, I don't want SMX, to implement any logic thus
>  I'm not having any Service Engine. Again I'm not using SOAP request, its
>  just simple HTTP request-response.
>
>  For this I have 2 Service Unit (for 2 BC) and a SA. xbean.xml of 2 SU are as
>  follow.
>
>
>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>                 xmlns:test="http://www.abc.com/abcde">
>         <http:endpoint service="test:MyHttpReceiver"
>                 endpoint="receiverConsumer"
>                 targetService="test:MyProviderService"
>                 role="consumer"
>                 soap="false"
>                 locationURI="http://localhost:8192/PortalCommExample/"/>
>  </beans>
>
>  and
>
>
>  <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>                 xmlns:test="http://www.abc.com/abcde">
>         <http:endpoint service="test:MyProviderService"
>                 endpoint="senderProvider"
>                 role="provider"
>                 soap="false"
>                 locationURI="http://localhost/esbtest/testService1.php" />
>  </beans>
>
>  It would be helpful if someone let me know if I'm trying it in wrong manner.
>  (I know this example doesn't make a lot of sense). I don't want to define
>  WSDL or any routing as I'm sure which end-point i need to hit. Now this
>  failure raises few questions for me.
>  1. Do I always need to define WSDL. I think its standard format for NMR but
>  shouldn't SMX-HTTP BC converts it in NMR specific format?
>  2. Can two BC communicate with each other without SE or SE is must?
>  3. Don't SMX provide way for simple HTTP request? All examples that I saw
>  are using SOAP request and WSDL.
>  4. How can I achieve required flow?
>
>
>
>
>  gnodet wrote:
>  >
>  > You can't.  This page listing the services is generated and is
>  > provided for convenience only.
>  > If you go to http://localhost:8192/mylistenHttp/, you won't see the
>  > wsdl, this only happens if you click on the link, because the link
>  > shows the address of the service but points to the wsdl.  Makes sense
>  > ?
>  >
>  > On Fri, Apr 25, 2008 at 2:55 PM, pratibhaG <pr...@in2m.com>
>  > wrote:
>  >>
>  >>  Thanks a lot for your reply,
>  >>  I guess this is some default or welcome file. May be there is some
>  >>  configuration which tells that if I hit URL
>  >>  "http://localhost:8192/mylistenHttp/", then main.wsdl will be invoked?
>  >>  where does this file reside? If I want to invoke some custom file say
>  >>  mywsdl.wsdl how would I do that?
>  >>  Please reply
>  >>  Thanks once again
>  >>  -Pratibha
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
>  >>
>  >>
>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > Cheers,
>  > Guillaume Nodet
>  > ------------------------
>  > Blog: http://gnodet.blogspot.com/
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17073134.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Why every http request goes to main.wsdl?

Posted by kapilsharma <ka...@thejavaworld.com>.
Gnodet, Pratibha,

Did you solved the problem?

My problem is a bit similar. I'll be a lot thankful if anyone of you let me
know the problems with my or have could provide any hint. My problem is
given below:

Diagram below shows the flow I'm trying to achieve with Service Mix 3.2.1 

http://www.nabble.com/file/p17073134/SMX-Test-Flow.jpg 

When I hit "http://localhost:8192/PortalCommExample/" (Above BC in diagram)
from browser, I'm expecting to get response from
"http://localhost/esbtest/testService1.php" (HTTP Service 2) but I'm getting
error "resource not found".

Although it doesn't make any sense, but for testing purpose, I'm trying to
hit HTTP Service 2 from HTTP Service 1 (Ideally Web browser) using SMX
(Service Mix). At that moment, I don't want SMX, to implement any logic thus
I'm not having any Service Engine. Again I'm not using SOAP request, its
just simple HTTP request-response.

For this I have 2 Service Unit (for 2 BC) and a SA. xbean.xml of 2 SU are as
follow.

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
                xmlns:test="http://www.abc.com/abcde">
        <http:endpoint service="test:MyHttpReceiver"
                endpoint="receiverConsumer"
                targetService="test:MyProviderService"
                role="consumer"
                soap="false"
                locationURI="http://localhost:8192/PortalCommExample/"/>
</beans>

and

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
                xmlns:test="http://www.abc.com/abcde">
        <http:endpoint service="test:MyProviderService"
                endpoint="senderProvider"
                role="provider"
                soap="false"
                locationURI="http://localhost/esbtest/testService1.php" />
</beans>

It would be helpful if someone let me know if I'm trying it in wrong manner.
(I know this example doesn't make a lot of sense). I don't want to define
WSDL or any routing as I'm sure which end-point i need to hit. Now this
failure raises few questions for me.
1. Do I always need to define WSDL. I think its standard format for NMR but
shouldn't SMX-HTTP BC converts it in NMR specific format?
2. Can two BC communicate with each other without SE or SE is must?
3. Don't SMX provide way for simple HTTP request? All examples that I saw
are using SOAP request and WSDL.
4. How can I achieve required flow?


gnodet wrote:
> 
> You can't.  This page listing the services is generated and is
> provided for convenience only.
> If you go to http://localhost:8192/mylistenHttp/, you won't see the
> wsdl, this only happens if you click on the link, because the link
> shows the address of the service but points to the wsdl.  Makes sense
> ?
> 
> On Fri, Apr 25, 2008 at 2:55 PM, pratibhaG <pr...@in2m.com>
> wrote:
>>
>>  Thanks a lot for your reply,
>>  I guess this is some default or welcome file. May be there is some
>>  configuration which tells that if I hit URL
>>  "http://localhost:8192/mylistenHttp/", then main.wsdl will be invoked?
>>  where does this file reside? If I want to invoke some custom file say
>>  mywsdl.wsdl how would I do that?
>>  Please reply
>>  Thanks once again
>>  -Pratibha
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p17073134.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Why every http request goes to main.wsdl?

Posted by Guillaume Nodet <gn...@gmail.com>.
You can't.  This page listing the services is generated and is
provided for convenience only.
If you go to http://localhost:8192/mylistenHttp/, you won't see the
wsdl, this only happens if you click on the link, because the link
shows the address of the service but points to the wsdl.  Makes sense
?

On Fri, Apr 25, 2008 at 2:55 PM, pratibhaG <pr...@in2m.com> wrote:
>
>  Thanks a lot for your reply,
>  I guess this is some default or welcome file. May be there is some
>  configuration which tells that if I hit URL
>  "http://localhost:8192/mylistenHttp/", then main.wsdl will be invoked?
>  where does this file reside? If I want to invoke some custom file say
>  mywsdl.wsdl how would I do that?
>  Please reply
>  Thanks once again
>  -Pratibha
>
>  --
>  View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Why every http request goes to main.wsdl?

Posted by pratibhaG <pr...@in2m.com>.
Thanks a lot for your reply, 
I guess this is some default or welcome file. May be there is some
configuration which tells that if I hit URL
"http://localhost:8192/mylistenHttp/", then main.wsdl will be invoked? 
where does this file reside? If I want to invoke some custom file say
mywsdl.wsdl how would I do that?
Please reply
Thanks once again
-Pratibha

-- 
View this message in context: http://www.nabble.com/Why-every-http--request-goes-to-main.wsdl--tp16891783p16895542.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.