passing variable amount of complex types to WSDL SOAP webservice?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • olafmol

    passing variable amount of complex types to WSDL SOAP webservice?

    Hello,

    i have a problem using a .NET WSDL Webservice from PHP. Using both the
    NuSOAP lib for PHP4, and the build-in SOAP lib for PHP5 it seems that the
    SOAP client cannot pass a variable amount of complex datatypes to the WSDL
    webservice.

    This is the request-structure we've been using:

    <EzCreateAuctio nArray xmlns=http://www.blabla.com>
    <mySewInfo>
    <UserToken>stri ng</UserToken>
    <UserID>strin g</UserID>
    <EnvironmentID> int</EnvironmentID>
    </mySewInfo>
    <theColl>
    <SimpleItemType >
    <Title>string </Title>
    <Subtitle>strin g</Subtitle>
    <Description>st ring</Description>
    </SimpleItemType>
    <SimpleItemType >
    <Title>string </Title>
    <Subtitle>strin g</Subtitle>
    <Description>st ring</Description>
    </SimpleItemType>
    </theColl>
    </EzCreateAuction Array>

    as you can see this structure is setup to accept a variable amount of
    <SimpleItemType > datastructures. When setting up the correct data in PHP i
    am using associative arrays and this works fine. The problem is that the
    associative index-key needs to be exactly the same as the item-name in the
    WSDL request structure. So if i f.e. use "theColtest 123" instead of
    "theColl" the request cannot be created correctly as there isn't a match
    between the WSDL and my input data structure. This is not really a problem,
    but it becomes one when i want to add multiple items of the
    "SimpleItemType ". It's impossible to add more than 1 of these to an
    associative array because the key has to be unique. And by using other
    key-names the WSDL structure is not the same anymore, so the request isn't
    passed.

    Can anyone tell me if there is a way to pass a variable amount of complex
    datatypes from within PHP to a WSDL SOAP webservice?

    Cheers! Olaf



Working...