SoapServer and Violation of encoding rules error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vmattila
Forum Newbie
Posts: 1
Joined: Thu Dec 21, 2006 4:45 am

SoapServer and Violation of encoding rules error

Post by vmattila »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello readers,

Well, I've been looking for experts of SOAP and PHP - but without success yet. This forum seems to be active, so let's try if someone is able to help. ;)

I am consuming a web service created with PHP from .NET application. I have defined a custom datatype in my WSDL document:
[syntax="xml"]<types xmlns="http://schemas.xmlsoap.org/wsdl/">
   <schema targetNamespace="urn:testService"
xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="objSessionToken">
     <sequence>
      <element name="clientApplicationId" type="xsd:string"/>
      <element name="clientApplicationVersion" type="xsd:string"/>
     </sequence>
    </complexType>
   </schema>
</types>
My VB.NET is able to see this datatype and successfully maps it to .NET datatype. This same objSessionToken is mapped to PHP class at SOAP Server (classmap option in server constructor).

Now, when I try to call a function and send objSessionToken object on the SOAP Request, the server returns "SOAP-ERROR: Encoding: Violation of encoding rules" fault. This error happens also if I consume the server over PHP SoapClient.

I can't find any reason for this - could somebody give some hints where to find and what would cause this error?

PHP version is 5.2.0 (-8)

Thanks,
Ville


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply