Re: Soap client, different element type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You probably want an array of soapvars, something along the lines of this
$params = array(
soapval('somename','dateTime',$date,false,'http://www.w3.org/2001/XMLSchema') ,
       soapval('somename','dateTime',$date,false,'http://www.w3.org/2001/XMLSchema')
);
-Justin


On Mar 5, 2009, at 4:57 PM, Fernando wrote:

Hello,

The SOAP server that i'm connecting require two fields with the same
value. But when i try to send using nusoap, it only sends the last
one. Example:

$params = array(
             'field_foo' => 'name',
             'field_foo' => 'name2'
);

I guess this isn't something recommended, but it is required by the SOAP server.

Do you know how can i change the default nusoap behavior?

2009/3/4 Justin Prosser <jprosser@washington.edu>:
I've been dealing with complex data structures between PHP and .NET a lot lately and have had good luck with the PHP extension but that was after much
research and learning.

Looks like you'll want to use the soapval call along the lines of:

new soapval('somename','dateTime',$date,
false,'http://www.w3.org/2001/XMLSchema')

soapval(name of the object, data type of the object, value of the object,
namespace of the value, namespace of the data type)

I'm most familiar with the PHP SOAP extension which the above is very
similar.  This was from the site:
http://msdn.microsoft.com/en-us/library/ms980207.aspx
which I used in my learning process, but went with the PHP SOAP extension in
the end.
-Justin

On Mar 4, 2009, at 8:26 AM, Fernando wrote:

Hello,

I have been searching this everywhere and can´t find anything.
Unfortunately i can´t use ext/soap because the server that i´m using
won´t allow recompiling php to add it.

So if anyone know how can i pass xsd:dateTime on nusoap, i would
appreciate some help

Thanks,

Fernando.

2009/3/4 Will Fitch <will@phpfever.com>:

I’m not sure the nuSoap way, nor do I know what the WSDL you’re using specifies. With ext/soap, you can pass a structure (class) or array with
the element name and type.

Maybe some nuSoap gurus can lend a hand?


On 3/4/09 9:59 AM, "Fernando" <stormrider.may@gmail.com> wrote:

Hello Will,

Thanks for the reply.

I´m trying to pass this parameter using datetime function. Example:

<?php
$date = new DateTime();
$date->format(DATE_RFC3339);

$params = array( 'myDate' => $date );
?>

But when i take a look at what nusoap is sending, it is something like
this:

<myDate xsi:type="xsd:string">2009-03-04T12:57:25-03:00</myDate>

How can i force the type to be set as dateTime?

Thanks,

Fernando.

2009/3/4 Will Fitch <will@phpfever.com>:

This is an XML data type.  Please see
http://books.xmlschemata.org/relaxng/ch19-77049.html for more details.



On 3/4/09 9:48 AM, "Fernando Morgenstern" <stormrider.may@gmail.com >
wrote:

Hello,

I´m accessing a SOAP server using nusoap. There are some params that i
need to pass as dateTime.

Do you know how can i send this kind of parameter? I can send string,
float and int, but don´t know how to send dateTime.

Thanks for any help about this!
--
Fernando

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux