I'm trying to get some values from a WebService, but I'm getting some error messages when accessing from PHP web application or SoapUI.
When I access the service from Visual Studio .NET I get the right values, but I really need to access this from PHP.
Here is the error message:
<faultstring xml:lang="pt-BR">The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'ConsultaFretePedido'. End element 'xmlPedido' from namespace 'http://tempuri.org/' expected. Found element 'Pedido' from namespace ''. Line 6, position 51.</faultstring>
I guess this is the error:
End element 'xmlPedido' from namespace 'http://tempuri.org/' expected.
Found element 'Pedido' from namespace ''. Line 6, position 51.
that means, that you have started with <xmlPedido> but ended with </Pedido>
look at the xml code, that the webservice is giving back, at line 6
I'd recommend using SOAPui to check the WebService.
Related
I am trying out fine-uploader's library. I am getting the following console error whenever I run their traditional UI and PHP server code:
templating.js:638 Uncaught TypeError: Cannot read property 'appendChild' of null
at qq.Templating.render (templating.js:638)
at new qq.FineUploader (uploader.js:162)
at (index):87
What could be the issue (Sorry question may not be detailed but i figure anyone who has interacted with the library gets it)
Modifying the sample code for embedded signing to use a CompositeTemplate resulted in the following error.
msg: Access to undeclared static property: stdClass::$swaggerTypes
file: $home/lib/docusign/src/ObjectSerializer.php
line: 68
This happens on the attempt to serialize SignHere:scale_value, which is an object, but a standard object, not a Swagger object, and the serializer assumes ALL objects are Swagger objects. Not sure if the SDK is mistakenly assuming scale_value is an object (seems it should just be a scalar) or there's a missing ScaleValue model class.
Anyone run into this before?
Yep, this was definitely a bug in the SDk. Bug reported but no idea how long it will take to be fixed.
If you run into this issue, just open src/Model/SignHere.php and change the type of scale_value to string instead of object.
I' ve a problem with Soap (I'm using it for the first time!).
I'm trying to solve a problem with SOAP, used to communicate between my site and another.
In SoapServer (on my site) I have a function called say_hello() that takes no argument and returns simply "hello", if I call it from a SoapClient, also with an argument, it works well.
The problem appears if the argument passed is "SELECT everythingyouwanthere FROM otherthingifyouwant". I don't know why but it returns "PHP Fatal error: Uncaught SoapFault exception: [HTTP] Not Found" (404 error).
This started to happen suddenly (or, at least, I don't know the causes). On the server PrestaShop is installed.
Thanks in advance!
P.S. Sorry for my bad english!
try to pass the argument through an array.
Instead of
...
$client = new SoapClient(WSDL);
$client->say_hello("SELECT everythingyouwanthere FROM otherthingifyouwant");
...
try
...
$client = new SoapClient(WSDL);
$client->say_hello(array("parameter_name" => "SELECT everythingyouwanthere FROM otherthingifyouwant"));
...
I am using a Zend_Soap_Client to call a web service. I am getting an exception from the error which I suspect is down to me not sending something along with the request:
Fatal error: Uncaught SoapFault exception: [Sender] SOAP-ERROR:
Encoding: object hasn't 'V24Flag' propert
Because it throws an exception I want to try view what is the actual request being sent, however because of the exception, I can not use Zend_Soap_Client->getLastRequest() to get the request (it returns null). Looking at the Zend_Soap_Client->getLastRequest() its a thin wrapper for soapClient->__soapCall() which I'm not sure how to dig deeper from.
Your problem is actually slightly different to what you think it is. The reason Zend_Soap_Client::getLastRequest() returns NULL for you is that no request was ever made: the error is being thrown at the stage where the request internally is being compared against the WSDL you are using. So the method is perfectly correct to return NULL.
As to how to form the parameter for your SOAP call so this error isn't thrown, I can't be of much greater help right now (I expect it depends partly on the services you are integrating with), but there's a userland answer on the php.net page for SoapClient::__soapCall() which may point you in a fruitful direction. Essentially, some people seem to have got somewhere by doing a deep conversion of an array structure into stdClass objects. That doesn't seem to be the whole story (it isn't for the issue I'm currently investigating), and indeed this may be down to a bug in PHP, but I hope it helps you towards an answer.
How about
try {
$client = new Zend_Soap_CLient();
$client->doSomething($params);
} catch(SoapFault $f) {
echo $f->getTraceAsString();
}
Btw. Zend_Soap_Client->getLastRequest() wraps SoapClient::__getLastRequest();
I am trying to make a service call to a php function from flex, through Zend AMF. Most of the functions get called fine, but for one particular function, it throws the following exception:
InvocationTargetException:There was an
error while invoking the operation.
Check your operation inputs or server
code and try invoking the operation
again.
Reason: Fatal error: Call to a member
function getInvokeArguments() on a
non-object in
D:\wamp\www\ZendFramework\library\Zend\Amf\Server.php
on line 328
I am not able to debug through this - has anyone faced any issue like this before, or have any ideas how this can be debugged?
At a quick glance through ZFW's source, this appears to be a bug on their framework.
// There is no check if $this->_table[$qualifiedName] is an object, implements an interface, extends a class, only if it's set (the key exists).
$info = $this->_table[$qualifiedName];
$argv = $info->getInvokeArguments(); // Here's when you get the error.
Source: http://framework.zend.com/code/filedetails.php?repname=Zend+Framework&path=/trunk/library/Zend/Amf/Server.php
I looked in their bug tracker and haven't found anything related to this, perhaps you should open a new issue?
Additionally, you can debug the problem by grabbing the message that Flex is sending to the PHP client and making a test case out of it.
We finally realized that this was a problem in the flex project setup - don't know exactly what it was, but once we deleted and created the project again, things started working fine!