You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by Ken Hu <ke...@mmti.com.tw> on 2006/01/09 11:42:21 UTC

Please help ... I'm afraid I am going to give up...

Dear All:

Sorry for disturbing all of you ... this is my third times in a week to
ask in this forum.
I think Sandesha could be great help for our project, but it's hard for
us to make it work.

We have made a axis ws, the deploy.wsdd is like the following:
=================================================================
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
	<service name="TaskWS" provider="java:RPC">
		<parameter name="className" value="com.ctu.tm.ws.TaskWSIF"/>
		<parameter name="allowedMethods" value="*"/>
		<beanMapping qname="myNS:Forecast" xmlns:myNS="urn:BeanService"
languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
	</service>
</deployment>
=================================================================
It works fine on Jetty + axis .


Then we think we need some kind of messaging service , so we dicide to
give Sandesha a try.
Accroding to the sandesha's user guide talking about adding sandesha on
an existing ws, we modify the deploy.wsdd , so it looks like :
=================================================================
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
	<service name="TaskWS" provider="java:RPC">
		<parameter name="className" value="com.ctu.tm.ws.TaskWSIF"/>
		<parameter name="allowedMethods" value="*"/>
		<beanMapping qname="myNS:Forecast" xmlns:myNS="urn:BeanService"
languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
	</service>

	<service name="RMService" provider="Handler">
         <requestFlow>
             <handler
type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>
             <handler
type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handler>
         </requestFlow>

         <parameter name="handlerClass"
value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
         <parameter name="className"
value="org.apache.sandesha.client.RMService"/>
         <parameter name="allowedMethods" value="*"/>
         <parameter name="scope" value="request"/>
     </service>
</deployment>
=================================================================
It seems correct to me , I just copy the setting from document.

Then I modify the client code:
=================================================================
QName qn = new QName("urn:BeanService", "Forecast");
			Call call = (Call) service.createCall();
			SandeshaContext ctx = new SandeshaContext();

ctx.setAcksToURL("http://hamagawa.loc.net:8086/hg10/services/RMService"/*Constants.WSA.NS_ADDRESSING_ANONYMOUS*/);
ctx.setReplyToURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
ctx.setFromURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
ctx.initCall(call, WSUrl,
		"urn:wsrm:receiveTaskBean",Constants.ClientProperties.IN_OUT);
			
call.registerTypeMapping(TaskBaseBean.class, qn,
		new BeanSerializerFactory(TaskBaseBean.class, qn),
		new BeanDeserializerFactory(TaskBaseBean.class, qn));
call.setTargetEndpointAddress(new java.net.URL(WSUrl));
call.setOperationName("receiveTaskBean");
call.addParameter("taskbasebean", qn, ParameterMode.IN);
call.addParameter("domain_id", XMLType.XSD_STRING, ParameterMode.IN );
call.addParameter("comp_id", XMLType.XSD_STRING, ParameterMode.IN );
call.addParameter("user_id", XMLType.XSD_STRING, ParameterMode.IN );

call.setReturnType(XMLType.XSD_BOOLEAN);
ctx.setLastMessage(call);
reply = ((Boolean) call.invoke(new Object[] { domainID, compID, userID ,
taskBaseBeans })).booleanValue();
ctx.endSequence();
=================================================================
As you can see , I almost copy them all from the sample in the document.

Because my client code is a servlet , so I run the browser to test my
code.
(My servlet and my webservice are running on the same machine, in fact ,
they're in the same web application)

The situation is that the browser just keeping running and running and
nothing really happens until I must stop my browser's action.

There're a lot of messages occur in the log file , I notice one of them
saying:
=================================================================
Inactivity Timeout Reached, No Response from the Server
=================================================================

Can anyone one kindly help me to find out what's going wrong here ?
Really appreciate  ....

Ken

-- 
研發部             胡重威             Ken Hu          ken@mmti.com.tw

孟華科技股份有限公司
http://www.mmti.com.tw

高雄巿804鼓山區蓮海路70號
國立中山大學創新育成中心511室

電話      07-5253020
傳真      07-5252165
行動      0937083880


---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Re: Please help ... I'm afraid I am going to give up...

Posted by Jaliya Ekanayake <jn...@gmail.com>.
Hi Ken Hu,

Now you explained the problem clearly. Let me see.

Your scenario is different from normal usage where the client resides in a
different computer. Anyway Sandesha supports this scenario as well, but it
needs additional modifications.

Follow the below steps carefully.

In this type of scenario both client and the service are both Web Services.
Client is the RMService and the actual web service is TaskWS (according to
your wsdd) so both should be configured with Sandesha.

You need modify the server-config.wsdd (Remember if you modify the
deploy.wsdd then you need to deploy the services using the Axis's deploy
tool, else you can directly modify the server-config.wsdd as follows. NOTE:
Client (or Client Web Service should use RMClientProvider while Web Service
you need to invoke uses RMProvider)


  <service name="TaskWS" provider="java:RPC">
   <requestFlow>
             <handler type="java:
org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>

>           <handler type="java:
> org.apache.axis.message.addressing.handler.AddressingHandler"></handler>

     </requestFlow>

>
>   <parameter name="handlerClass" value="
> org.apache.sandesha.ws.rm.providers.RMProvider"/>

      <parameter name="className" value="com.ctu.tm.ws.TaskWSIF"/>
                <parameter name="allowedMethods" value="*"/>
                <beanMapping qname="myNS:Forecast"
xmlns:myNS="urn:BeanService"
              languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
        </service>

        <service name="RMService" provider="Handler">
         <requestFlow>
             <handler
type="java:org.apache.sandesha.ws.rm
>
> .handlers.RMServerRequestHandler"></handler>
>              <handler
> type="java:org.apache.axis.message.addressing.handler.AddressingHandler
> "></handler>
>          </requestFlow>
>
>          <parameter name="handlerClass"
> value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
>          <parameter name="className"
> value="org.apache.sandesha.client.RMService"/>
>          <parameter name="allowedMethods" value="*"/>
>          <parameter name="scope" value="request"/>
>      </service>



This should work. Let us know the results.:)

In anycase, userguide states this clearly at the bottm ;)

Cheers,

Jaliya
















On 1/9/06, Ken Hu <ke...@mmti.com.tw> wrote:
>
> Dear All:
>
> Sorry for disturbing all of you ... this is my third times in a week to
> ask in this forum.
> I think Sandesha could be great help for our project, but it's hard for
> us to make it work.
>
> We have made a axis ws, the deploy.wsdd is like the following:
> =================================================================
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>         <service name="TaskWS" provider="java:RPC">
>                 <parameter name="className" value="com.ctu.tm.ws.TaskWSIF
> "/>
>                 <parameter name="allowedMethods" value="*"/>
>                 <beanMapping qname="myNS:Forecast"
> xmlns:myNS="urn:BeanService"
> languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
>         </service>
> </deployment>
> =================================================================
> It works fine on Jetty + axis .
>
>
> Then we think we need some kind of messaging service , so we dicide to
> give Sandesha a try.
> Accroding to the sandesha's user guide talking about adding sandesha on
> an existing ws, we modify the deploy.wsdd , so it looks like :
> =================================================================
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>         <service name="TaskWS" provider="java:RPC">
>                 <parameter name="className" value="com.ctu.tm.ws.TaskWSIF
> "/>
>                 <parameter name="allowedMethods" value="*"/>
>                 <beanMapping qname="myNS:Forecast"
> xmlns:myNS="urn:BeanService"
> languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
>         </service>
>
>         <service name="RMService" provider="Handler">
>          <requestFlow>
>              <handler
> type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler
> "></handler>
>              <handler
> type="java:org.apache.axis.message.addressing.handler.AddressingHandler
> "></handler>
>          </requestFlow>
>
>          <parameter name="handlerClass"
> value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
>          <parameter name="className"
> value="org.apache.sandesha.client.RMService"/>
>          <parameter name="allowedMethods" value="*"/>
>          <parameter name="scope" value="request"/>
>      </service>
> </deployment>
> =================================================================
> It seems correct to me , I just copy the setting from document.
>
> Then I modify the client code:
> =================================================================
> QName qn = new QName("urn:BeanService", "Forecast");
>                         Call call = (Call) service.createCall();
>                         SandeshaContext ctx = new SandeshaContext();
>
> ctx.setAcksToURL("
> http://hamagawa.loc.net:8086/hg10/services/RMService"/*Constants.WSA.NS_ADDRESSING_ANONYMOUS*/)
> ;
> ctx.setReplyToURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
> ctx.setFromURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
> ctx.initCall(call, WSUrl,
>                 "urn:wsrm:receiveTaskBean",
> Constants.ClientProperties.IN_OUT);
>
> call.registerTypeMapping(TaskBaseBean.class, qn,
>                 new BeanSerializerFactory(TaskBaseBean.class, qn),
>                 new BeanDeserializerFactory(TaskBaseBean.class, qn));
> call.setTargetEndpointAddress(new java.net.URL(WSUrl));
> call.setOperationName("receiveTaskBean");
> call.addParameter("taskbasebean", qn, ParameterMode.IN);
> call.addParameter("domain_id", XMLType.XSD_STRING, ParameterMode.IN );
> call.addParameter("comp_id", XMLType.XSD_STRING, ParameterMode.IN );
> call.addParameter("user_id", XMLType.XSD_STRING, ParameterMode.IN );
>
> call.setReturnType(XMLType.XSD_BOOLEAN);
> ctx.setLastMessage(call);
> reply = ((Boolean) call.invoke(new Object[] { domainID, compID, userID ,
> taskBaseBeans })).booleanValue();
> ctx.endSequence();
> =================================================================
> As you can see , I almost copy them all from the sample in the document.
>
> Because my client code is a servlet , so I run the browser to test my
> code.
> (My servlet and my webservice are running on the same machine, in fact ,
> they're in the same web application)
>
> The situation is that the browser just keeping running and running and
> nothing really happens until I must stop my browser's action.
>
> There're a lot of messages occur in the log file , I notice one of them
> saying:
> =================================================================
> Inactivity Timeout Reached, No Response from the Server
> =================================================================
>
> Can anyone one kindly help me to find out what's going wrong here ?
> Really appreciate  ....
>
> Ken
>
> --
> 研 發部              胡重威              Ken Hu          ken@mmti.com.tw
>
> 孟華科技股份有限公司
> http://www.mmti.com.tw
>
> 高雄巿804鼓山區蓮海路70號
> 國立中山大學創新育成中心511室
>
> 電話      07-5253020
> 傳真      07-5252165
> 行動      0937083880
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>
>

Re: Please help ... I'm afraid I am going to give up...

Posted by Jaliya Ekanayake <jn...@gmail.com>.
Hi Ken Hu,

Now you explained the problem clearly. Let me see.

Your scenario is different from normal usage where the client resides in a
different computer. Anyway Sandesha supports this scenario as well, but it
needs additional modifications.

Follow the below steps carefully.

In this type of scenario both client and the service are both Web Services.
Client is the RMService and the actual web service is TaskWS (according to
your wsdd) so both should be configured with Sandesha.

You need modify the server-config.wsdd (Remember if you modify the
deploy.wsdd then you need to deploy the services using the Axis's deploy
tool, else you can directly modify the server-config.wsdd as follows. NOTE:
Client (or Client Web Service should use RMClientProvider while Web Service
you need to invoke uses RMProvider)


  <service name="TaskWS" provider="java:RPC">
   <requestFlow>
             <handler type="java:
org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>

>           <handler type="java:
> org.apache.axis.message.addressing.handler.AddressingHandler"></handler>

     </requestFlow>

>
>   <parameter name="handlerClass" value="
> org.apache.sandesha.ws.rm.providers.RMProvider"/>

      <parameter name="className" value="com.ctu.tm.ws.TaskWSIF"/>
                <parameter name="allowedMethods" value="*"/>
                <beanMapping qname="myNS:Forecast"
xmlns:myNS="urn:BeanService"
              languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
        </service>

        <service name="RMService" provider="Handler">
         <requestFlow>
             <handler
type="java:org.apache.sandesha.ws.rm
>
> .handlers.RMServerRequestHandler"></handler>
>              <handler
> type="java:org.apache.axis.message.addressing.handler.AddressingHandler
> "></handler>
>          </requestFlow>
>
>          <parameter name="handlerClass"
> value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
>          <parameter name="className"
> value="org.apache.sandesha.client.RMService"/>
>          <parameter name="allowedMethods" value="*"/>
>          <parameter name="scope" value="request"/>
>      </service>



This should work. Let us know the results.:)

In anycase, userguide states this clearly at the bottm ;)

Cheers,

Jaliya
















On 1/9/06, Ken Hu <ke...@mmti.com.tw> wrote:
>
> Dear All:
>
> Sorry for disturbing all of you ... this is my third times in a week to
> ask in this forum.
> I think Sandesha could be great help for our project, but it's hard for
> us to make it work.
>
> We have made a axis ws, the deploy.wsdd is like the following:
> =================================================================
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>         <service name="TaskWS" provider="java:RPC">
>                 <parameter name="className" value="com.ctu.tm.ws.TaskWSIF
> "/>
>                 <parameter name="allowedMethods" value="*"/>
>                 <beanMapping qname="myNS:Forecast"
> xmlns:myNS="urn:BeanService"
> languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
>         </service>
> </deployment>
> =================================================================
> It works fine on Jetty + axis .
>
>
> Then we think we need some kind of messaging service , so we dicide to
> give Sandesha a try.
> Accroding to the sandesha's user guide talking about adding sandesha on
> an existing ws, we modify the deploy.wsdd , so it looks like :
> =================================================================
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>         <service name="TaskWS" provider="java:RPC">
>                 <parameter name="className" value="com.ctu.tm.ws.TaskWSIF
> "/>
>                 <parameter name="allowedMethods" value="*"/>
>                 <beanMapping qname="myNS:Forecast"
> xmlns:myNS="urn:BeanService"
> languageSpecificType="java:com.ctu.tm.data.TaskBaseBean"/>
>         </service>
>
>         <service name="RMService" provider="Handler">
>          <requestFlow>
>              <handler
> type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler
> "></handler>
>              <handler
> type="java:org.apache.axis.message.addressing.handler.AddressingHandler
> "></handler>
>          </requestFlow>
>
>          <parameter name="handlerClass"
> value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
>          <parameter name="className"
> value="org.apache.sandesha.client.RMService"/>
>          <parameter name="allowedMethods" value="*"/>
>          <parameter name="scope" value="request"/>
>      </service>
> </deployment>
> =================================================================
> It seems correct to me , I just copy the setting from document.
>
> Then I modify the client code:
> =================================================================
> QName qn = new QName("urn:BeanService", "Forecast");
>                         Call call = (Call) service.createCall();
>                         SandeshaContext ctx = new SandeshaContext();
>
> ctx.setAcksToURL("
> http://hamagawa.loc.net:8086/hg10/services/RMService"/*Constants.WSA.NS_ADDRESSING_ANONYMOUS*/)
> ;
> ctx.setReplyToURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
> ctx.setFromURL("http://hamagawa.loc.net:8086/hg10/services/RMService");
> ctx.initCall(call, WSUrl,
>                 "urn:wsrm:receiveTaskBean",
> Constants.ClientProperties.IN_OUT);
>
> call.registerTypeMapping(TaskBaseBean.class, qn,
>                 new BeanSerializerFactory(TaskBaseBean.class, qn),
>                 new BeanDeserializerFactory(TaskBaseBean.class, qn));
> call.setTargetEndpointAddress(new java.net.URL(WSUrl));
> call.setOperationName("receiveTaskBean");
> call.addParameter("taskbasebean", qn, ParameterMode.IN);
> call.addParameter("domain_id", XMLType.XSD_STRING, ParameterMode.IN );
> call.addParameter("comp_id", XMLType.XSD_STRING, ParameterMode.IN );
> call.addParameter("user_id", XMLType.XSD_STRING, ParameterMode.IN );
>
> call.setReturnType(XMLType.XSD_BOOLEAN);
> ctx.setLastMessage(call);
> reply = ((Boolean) call.invoke(new Object[] { domainID, compID, userID ,
> taskBaseBeans })).booleanValue();
> ctx.endSequence();
> =================================================================
> As you can see , I almost copy them all from the sample in the document.
>
> Because my client code is a servlet , so I run the browser to test my
> code.
> (My servlet and my webservice are running on the same machine, in fact ,
> they're in the same web application)
>
> The situation is that the browser just keeping running and running and
> nothing really happens until I must stop my browser's action.
>
> There're a lot of messages occur in the log file , I notice one of them
> saying:
> =================================================================
> Inactivity Timeout Reached, No Response from the Server
> =================================================================
>
> Can anyone one kindly help me to find out what's going wrong here ?
> Really appreciate  ....
>
> Ken
>
> --
> 研 發部              胡重威              Ken Hu          ken@mmti.com.tw
>
> 孟華科技股份有限公司
> http://www.mmti.com.tw
>
> 高雄巿804鼓山區蓮海路70號
> 國立中山大學創新育成中心511室
>
> 電話      07-5253020
> 傳真      07-5252165
> 行動      0937083880
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>
>