PHP soap and XMLSchema-instance

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Jevad
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Apr 15, 2013 5:35 am

PHP soap and XMLSchema-instance

Postby Jevad » Mon Apr 15, 2013 5:47 am

Code: Select all

$loginxml = new SoapVar('<h:Auth xmlns:h="http://whatever.org/2013/01" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<h:User>user1</h:User>
<h:Password>password1</h:Password>
</h:Auth>', XSD_ANYXML);


How do I do this with out using XSD_ANYXML?

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: PHP soap and XMLSchema-instance

Postby johnj » Mon Apr 15, 2013 6:08 am

Please read about SoapVar from php.net.

If you look at the documentation of class SoapVar, you can see that its second parameter to the constructor is "encoding". This encoding ID can be XSD_STRING, XSD_BOOLEAN, XSD_DECIMAL, XSD_DATE, XSD_ANYXML, etc etc. So, you have to choose this parameter based on your requirement.


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron