Jump to content

Recommended Posts

Hi,

 

Well, I'm having this

 

The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GetSomething'. End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' expected. Found element 'param1' from namespace ''.

 

 

The soapclient request itself is something with multiple namespaces, like :

     <aaa xmlns="namespace1">
         <bbb xmlns="namespace2" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

            <requestparams>xxxxx</requestparams>
         </bbb>

      </aaa>

 

So far I think this may got to do with multiple namespaces, so I've been trying to figure out how to deal with this for hours to no avail.

 

Anyone can shed a light into this problem ?

 

 

Thanks in advance,

 

 

Thanks for the response requinix,

 

It seems somehow that's how it is from what I just saw in __getLastRequest()

somehow it turns into <ns1:aaa />

So it may have to do with how to put xml into php kind of stuff.

 

$client = new SoapClient('web service wsdl', array('trace' => 1));
$client->__setSoapHeaders($header);
$result = $client->getSomething($params);

 

This was how I did it n the $params is a nested array (from the xml nodes...in which some of the nodes have xml namespaces)

 

During my time figuring out on how to solve this...I stumbled upon soapVar and something like extending soapclient...still figuring out how to use it in my case n whether or not it solves my problem.

Again thanks requinix,

 

Well, I used SoapVar with XSD_ANYXML n response is well received...it's not really how I want it (as it's in StdClass object instead of array/xml), but it's a good first step.

 

Well, thanks a lot...I'll keep in mind to check my request next time.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.