Note that with a POST request, the query string is *always* null, so that is not an error. A query string only applies to GET and HEAD requests.

Met hartelijke groet,


Ernst de Haan

Op 21 dec. 2012 om 22:07 heeft fazakas peter <fazakaspeter@yahoo.com> het volgende geschreven:

Dear sir,

I did as it says it the manual. I created a custom calling convention and it didn't work. I deleted it and recompiled. I added the default calling convention "_xins-std" to the impl.xml file. Recompiled again.

I got this far:

When I start the server it says:
...
[java] 3245 INFO Default calling convention is "_xins-std".
...

If i just simply write in a browser the following line I get a nice result:

http://localhost:8080/unittest/?_function=ReturnTheResultText&inputexample=5

The servers says:

[java] 3521 INFO Received HTTP GET request from 192.168.2.2, path is "/unittest/", query string is "_function=ReturnTheResult
&inputexample=5".
[java] 3541 INFO 20121221-225426679 192.168.2.2 ReturnTheResultText 5 0


But if i use the generated CAPI in a java project:

[java] 1200 INFO Starting watch thread #0 for file "xins.properties". Checking for modifications every 10 second(s).
[java] 3521 INFO Received HTTP POST request from 192.168.2.2, path is "/unittest/", query string is (null).
[java] 3440 INFO XSLT template cache in the XSLT calling convention is enabled.
[java] 3510 INFO Unable to detect calling convention for request. None of the calling conventions matches.
[java] 3523 INFO Unable to process HTTP POST request from 192.168.2.2, path is "/unittest/", query string is (null). Returnin
g HTTP status code 400. Reason: "Unable to activate appropriate calling convention: Request does not specify a calling convention,
it cannot be handled by the default calling convention and it was not possible to find any calling convention that can handle it.
".
[java] org.xins.server.InvalidRequestException: Request does not specify a calling convention, it cannot be handled by the de
fault calling convention and it was not possible to find any calling convention that can handle it.
[java] at org.xins.server.CallingConventionManager.detectCallingConvention(CallingConventionManager.java:815)
[java] at org.xins.server.CallingConventionManager.getCallingConvention(CallingConventionManager.java:596)
[java] at org.xins.server.Engine.determineCC(Engine.java:576)
[java] at org.xins.server.Engine.delegateToCC(Engine.java:530)
[java] at org.xins.server.Engine.doService(Engine.java:427)
[java] at org.xins.server.Engine.service(Engine.java:376)
[java] at org.xins.server.APIServlet.service(APIServlet.java:206)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[java] at org.xins.common.servlet.container.LocalServletHandler.query(LocalServletHandler.java:178)
[java] at org.xins.common.servlet.container.NettyServletHandler.messageReceived(NettyServletHandler.java:89)
[java] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
[java] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline
.java:754)
[java] at org.jboss.netty.handler.codec.http.HttpContentEncoder.messageReceived(HttpContentEncoder.java:83)
[java] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
[java] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline
.java:754)
[java] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
[java] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndfireMessageReceived(ReplayingDecoder.java:513)
[java] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:497)
[java] at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:434)
[java] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
[java] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
[java] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
[java] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
[java] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)
[java] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)
[java] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[java] at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:662)
   



This is another simple project. I restarted the whole thing for about 10 times and I am still at this error.



From: JW Borleffs <jw@jwscripts.com>
To: fazakas peter <fazakaspeter@yahoo.com>
Cc: "xins-users@lists.sourceforge.net" <xins-users@lists.sourceforge.net>
Sent: Friday, December 21, 2012 10:01 PM
Subject: Re: [Xins-users] query string is null - question

If you've created a custom calling convention, you should define it in the impl.xml as the default calling convention. Again, see the manual for more info.

Op 21 dec. 2012 om 20:13 heeft fazakas peter <fazakaspeter@yahoo.com> het volgende geschreven:

Dear sir,
thanks for answering but I just can't get to work.
I created a custom calling convention based on the manual. There were some deprecated classes there but I managed to resolve them, but still: query string is empty.

I just want to some more examples or tutorials to get my head around this. Is there any?

Thanks.





From: JW Borleffs <jw@jwscripts.com>
To:
Cc: fazakas peter <fazakaspeter@yahoo.com>; "xins-users@lists.sourceforge.net" <xins-users@lists.sourceforge.net>
Sent: Friday, December 21, 2012 5:57 PM
Subject: Re: [Xins-users] query string is null - question

Sorry, that would be _xins-std.

Op 21 dec. 2012 om 16:49 heeft JW Borleffs <jw@jwscripts.com> het volgende geschreven:

Hi,

You need to define _xins-soap as the (default) calling convention.

See the manual for more information.

Regards,
JW

Op 21 dec. 2012 om 10:07 heeft fazakas peter <fazakaspeter@yahoo.com> het volgende geschreven:

Hi,
I have another question. I advance I just want to say that I am newbie in XINS. 

I created a web service (following the User-guide) and used the CAPI generated by XINS in a java project.
When I call the remote function(Ex. callTheBestPercentage("5") ) the server outputs a message: 

[java] 3521 INFO Received HTTP POST request from 192.168.2.2, path is "/mutationtest/", query string is (null).
[java] 3523 INFO Unable to process HTTP POST request from 192.168.2.2, path is "/mutationtest/", query string is (null). Returning HTTP status code              
404. Reason: "Cannot determine which function to invoke.".
[java] org.xins.server.FunctionNotSpecifiedException: Function not specified in incoming request.

If i try in a browser: 


than, it works. It returns the wanted page.

This is the code snipet from the java project:

TargetDescriptor descriptor;
.....
descriptor = new TargetDescriptor("http://localhost:8080/mutationtest/", 20000);
   
CAPI project = new CAPI(descriptor);

TheBestPercentageResult result = project.callTheBestPercentage("5");
 
System.out.println("Best result: " + result.getBestresult());


I don't know what I am doing wrong.

Could please someone help me?

Thanks.


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xins-users mailing list
Xins-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xins-users
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xins-users mailing list
Xins-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xins-users




------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xins-users mailing list
Xins-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xins-users