Zend_Soap_Server Procedure 'sendsth' not present - zend-framework

we have a Zend_Soap_Server and a corresponding client, based on the same WSDL and the method "sendsth" is handled correctly if called from the PHP client.
Now I need to call it from perl so I create a client with SOAP::Lite, again using the same WSDL. When I call the method from the client I get an error in the server:
PHP Fatal error: Procedure 'sendsth' not present in /usr/local/zend/share/ZendFramework/library/Zend/Soap/Server.php
Do you have an idea what could be wrong or how to debug that?
Interesting aspect:
even if I wrap the call to $server->handle() in a try/catch block the program crashes exactly there

Related

Embedded Jetty 9 HttpException equivalent?

We are Upgrading to Jetty 9 from Jetty 6, but in our previous code we are throwing org.eclipse.jetty.http.HttpException, but I see that this Class is removed in 9.x. Is there any equivalent of this class or should I define a new class with the same content to use it in my code?
Jetty 7.6 was the first version to not have HttpException.
It was removed as part of commit d81f9c1e
The purpose of HttpException was limited to reporting really bad HTTP parsing issues with bad requests (all of which would result in a 400 Bad Request). That implementation was changed to use HttpParser.badMessage() instead, as that will properly set the connection state, and then allow implementations of HttpHandler.badMessage() to log or produce whatever response is desired, afterwords resulting in a forced connection close.
Without this change, it was not possible to log 400 Bad Request in the access log, and customize the error 400 response message.
There is no equivalent exception for HttpException present in Jetty 7.6+.
It was an internal class anyway, not meant for you to be using.
What are you attempting to accomplish by using that?

have two callback in one jsonp file

how can I have a valid jsonp file that contains two different callback
test.jsonp
a_callback({x:1});
b_callback({x:1});
when I put two callback in one file I get
Uncaught ReferenceError
error
If you are getting a reference error, then you are trying to reference something that doesn't exist. The error message should tell you what that is.
There is nothing stopping you putting two function calls in a dynamically loaded JavaScript file (which is, essentially, what JSONP is).

How to manage the error queue in openssl (SSL_get_error and ERR_get_error)

In OpenSSl, The man pages for The majority of SSL_* calls indicate an error by returning a value <= 0 and suggest calling SSL_get_error() to get the extended error.
But within the man pages for these calls as well as for other OpenSSL library calls, there are vague references to using the "error queue" in OpenSSL - Such is the case in the man page for SSL_get_error:
The current thread's error queue must be empty before the TLS/SSL I/O
operation is attempted, or SSL_get_error() will not work reliably.
And in that very same man page, the description for SSL_ERROR_SSL says this:
SSL_ERROR_SSL
A failure in the SSL library occurred, usually a protocol error.
The OpenSSL error queue contains more information on the error.
This kind of implies that there is something in the error queue worth reading. And failure to read it makes a subsequent call to SSL_get_error unreliable. Presumably, the call to make is ERR_get_error.
I plan to use non-blocking sockets in my code. As such, it's important that I reliably discover when the error condition is SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE so I can put the socket in the correct polling mode.
So my questions are this:
Does SSL_get_error() call ERR_get_error() implicitly for me? Or do I need to use both?
Should I be calling ERR_clear_error prior to every OpenSSL library call?
Is it possible that more than one error could be in the queue after an OpenSSL library call completes? Hence, are there circumstances where the first error in the queue is more relevant than the last error?
SSL_get_error does not call ERR_get_error. So if you just call SSL_get_error, the error stays in the queue.
You should be calling ERR_clear_error prior to ANY SSL-call(SSL_read, SSL_write etc) that is followed by SSL_get_error, otherwise you may be reading an old error that occurred previously in the current thread.

GWT RPC method call fails without error message

In GWT application I have RPC interface. Some methods works fine (i.e. RemoeServiceServlet configured fine), but when I try to invoke another method, it always fails with onFailure() method. Ajax call also don't occur (I can see it using FireBug, also on server side method invocation don't occur), but another methods of this service performs Ajax calls as well.
When I try to log error using e.getMessage() I get "undefined" message. Also I tried to wrap RPC calling code using try-catch - no error message.
Can this issue be related with GWT-RPC Serialization?
EDIT: Opera Dragonfly showed error on following method inside generated JavaScript (compiled with PRETTY mode):
function $check(this$static, typeSignature){
if (isNull($get_3(this$static.methodMapNative, typeSignature))) {
Unhandled Object: undefined
throw new SerializationException_1(typeSignature);
}
}
with error message
Unhandled Object: undefined
I would guess that you have a Serialization issue, remember that Java Serialization is not the same as GWT Serialization.
There is often no meaningful error message on Serialization errors when using RPC.
must have 0-ary constructor
final fields are inherently transient (ie. do NOT use final fields in classes intended to be serialized)
collections (ex List and Set) must be annotated with #gwt.typeArgs. #gwt.typeArgs is a JavaDoc annotation, thus it must be wrapped in a JavaDoc comment
ex.: /** #gwt.typeArgs */
For more details see:
GWT Serialization
Another thing to try:
When running GWT from the eclipse-plugin, a folder in the eclipse project is created (I belive its called gwt-unitCache). Sometimes my own GWT projects get ill and output strange exceptions, I can solve this by deleting the folder and run the project again.

FastCGI with protocol = Tcp on IIS 7

I have tried to use IIS 7 (as included in Windows 7) to test a FastCGI library I am currently developing.
According to the original FastCGI spec, when an application is called, its stdin handle is replaced with a socket. By default, IIS uses a named pipe instead, but it is possible to configure it to use TCP, i.e. a socket.
When I try to use this socket in my test application, I get an WSAENOTSOCK error.
When I try to use a named pipe instead (after reconfiguring IIS), I run into similar problems. For example, I get a ERROR_INVALID_HANDLE when I try to use PeekNamedPipe. ReadFile and WriteFile however work correctly.
I guess the problem is that this handle is inherited from the parent process and the current process does not really know its exact type. It seems to assume that the handle represents a simple file.
Has anyone run into similar problems and knows a solution/workaround? Can I somehow update the in-process status of my handle such that the WIN32 API function will accept it as a socket/named pipe?
In case anyone else ever stumbles upon this: DuplicateHandle does the trick.
In fact, the function OS_LibInit of the libfcgi implementation shows how to start an FastCGI app that got its socket through stdin.