How to make a SOAP complex type call with duplicate array keys?










0















I have 2 problems or can't seem to figure it out.



Proble
SOAP:



<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns11:createBusinessInteraction xmlns:ns11="http://test.com/services/common/businessinteraction/v1" xmlns:ns10="http://test.com/services/common/base/v1" xmlns:ns12="http://test.com/services/common/customer/v1" xmlns:ns2="http://test.com/schemas/common/base/v1" xmlns:ns3="http://test.com/schemas/common/party/v1" xmlns:ns4="http://test.com/schemas/common/location/v1" xmlns:ns5="http://test.com/schemas/common/dealer/v1" xmlns:ns6="http://test.com/schemas/common/businessinteraction/v1" xmlns:ns7="http://test.com/schemas/common/customer/v1" xmlns:ns8="http://test.com/schemas/product/fulfillment/v1" xmlns:ns9="http://test.com/schemas/product/lifecycle/v1">
<ns11:createBusinessInteractionRequestMsg>
<ns10:header>
<ns10:source>Someting</ns10:source>
<ns10:destination>MM</ns10:destination>
<ns10:origin>Someting</ns10:origin>
<ns10:transactionId>6483fd9a-9bb9-4517-8341-f455146ad0af</ns10:transactionId>
</ns10:header>
<ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns2:characteristicCollection>
<ns2:characteristic>
<ns2:type>
<ns2:value>MM_SOURCE</ns2:value>
</ns2:type>
<ns2:catalogValue>
<ns2:id>37</ns2:id>
<ns2:value>010100100</ns2:value>
<ns2:catalogName>BusinessInteraction.AdditionalProperty</ns2:catalogName>
</ns2:catalogValue>
</ns2:characteristic>
</ns2:characteristicCollection>
<ns6:priority>
<ns2:id>2</ns2:id>
</ns6:priority>
<ns6:interactingRoleCollection>
<ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
<ns6:identifierValue>12345678</ns6:identifierValue>
<ns6:roleType>
<ns2:id>1</ns2:id>
</ns6:roleType>
</ns6:businessInteractionRole>
</ns6:interactingRoleCollection>
<ns6:businessInteractionItemCollection>
<ns6:businessInteractionItem>
<ns6:businessInteractionRoleCollection>
<ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
<ns6:identifierValue>12345678</ns6:identifierValue>
<ns6:roleType>
<ns2:id>1</ns2:id>
</ns6:roleType>
</ns6:businessInteractionRole>
</ns6:businessInteractionRoleCollection>
<ns6:topicGroupCollection>
<ns6:topicGroup>
<ns6:topicCollection>
<ns6:topic>
<ns2:id>1000024</ns2:id>
<ns2:catalogName>BusinessInteraction.Topic.Job</ns2:catalogName>
</ns6:topic>
<ns6:topic>
<ns2:id>2000228</ns2:id>
<ns2:catalogName>BusinessInteraction.Topic.GroupServices</ns2:catalogName>
</ns6:topic>
</ns6:topicCollection>
</ns6:topicGroup>
</ns6:topicGroupCollection>
<ns6:attachmentCollection>
<ns6:attachment>
<ns2:title>some.pdf</ns2:title>
<ns2:documentContent xsi:type="ns2:File">
<ns2:content>f34rff</ns2:content>
<ns2:name>some.pdf</ns2:name>
<ns2:extension>pdf</ns2:extension>
</ns2:documentContent>
</ns6:attachment>
</ns6:attachmentCollection>
</ns6:businessInteractionItem>
</ns6:businessInteractionItemCollection>
<ns6:recipients>test@test.si</ns6:recipients>
<ns6:sender>test@test.si</ns6:sender>
</ns11:businessInteraction>
</ns11:createBusinessInteractionRequestMsg>
</ns11:createBusinessInteraction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I have problem with this compley type (xsi:type and xmlns:xsi):



<ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


This is my code:



$client = new SoapClient("http://service.test.com:80/services/common/businessinteraction/v1/BusinessInteractionService/v/1.8.0?wsdl",array('login'=> "myusername",
'password'=> "Test123"));

$param = array(
'createBusinessInteractionRequestMsg' => array(
'header' => array(
'origin' => 'Test'
),
'businessInteraction' => array(
'originApplication' => array('id' => 31), //31
'user' => array('username' => 'myusername'),
'channel' => array('id' => 2), //2
'origin' => array('id' => 2), //2
'note' => 'Something',
'subject' => 'Some subject',
'status' => array('id' => 2),
'priority' => array('id' => 2), //2
'interactingRoleCollection' => array(
'businessInteractionRole' => array(
'identifierValue' => 12345678,
'roleType' => array('id' => 1)
)
),
'businessInteractionItemCollection' => array(
'businessInteractionItem' => array(
'businessInteractionRoleCollection' => array(
'businessInteractionRole' => array(
'identifierValue' => 112047,
'roleType' => array('id' => 1)
)
),
'subject' => 'Something',
'topicGroupCollection' => array(
'topicGroup' => array(
'topicCollection' => array(
'topic' => array(
'id' => array(2000266,1000004),
'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
)
),
'classification' => array(
'id' => 1,
'catalogName' => 'BusinessInteraction.TopicClassification'
)
)
)
)
),
'recipients' => 'test@test.com',
'sender' => 'test@test.com'
)
)
);

$value = $client->createBusinessInteraction($param);


At first i had problems with duplicate keys. So from this:



'topicGroupCollection' => array(
'topicGroup' => array(
'topicCollection' => array(
'topic' => array(
'id' => array(10000024),
'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
),
'topic' => array(
'id' => array(2000266),
'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
)
),
'classification' => array(
'id' => 1,
'catalogName' => 'BusinessInteraction.TopicClassification'
)
)
)


I changed it to:



'topicGroupCollection' => array(
'topicGroup' => array(
'topicCollection' => array(
'topic' => array(
'id' => array(2000266,1000004),
'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
)
),
'classification' => array(
'id' => 1,
'catalogName' => 'BusinessInteraction.TopicClassification'
)
)
)


  1. So why do i get an error from the server that array does not exsist?


  2. And how do i add the complex type to the mentioned element?










share|improve this question


























    0















    I have 2 problems or can't seem to figure it out.



    Proble
    SOAP:



    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <ns11:createBusinessInteraction xmlns:ns11="http://test.com/services/common/businessinteraction/v1" xmlns:ns10="http://test.com/services/common/base/v1" xmlns:ns12="http://test.com/services/common/customer/v1" xmlns:ns2="http://test.com/schemas/common/base/v1" xmlns:ns3="http://test.com/schemas/common/party/v1" xmlns:ns4="http://test.com/schemas/common/location/v1" xmlns:ns5="http://test.com/schemas/common/dealer/v1" xmlns:ns6="http://test.com/schemas/common/businessinteraction/v1" xmlns:ns7="http://test.com/schemas/common/customer/v1" xmlns:ns8="http://test.com/schemas/product/fulfillment/v1" xmlns:ns9="http://test.com/schemas/product/lifecycle/v1">
    <ns11:createBusinessInteractionRequestMsg>
    <ns10:header>
    <ns10:source>Someting</ns10:source>
    <ns10:destination>MM</ns10:destination>
    <ns10:origin>Someting</ns10:origin>
    <ns10:transactionId>6483fd9a-9bb9-4517-8341-f455146ad0af</ns10:transactionId>
    </ns10:header>
    <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ns2:characteristicCollection>
    <ns2:characteristic>
    <ns2:type>
    <ns2:value>MM_SOURCE</ns2:value>
    </ns2:type>
    <ns2:catalogValue>
    <ns2:id>37</ns2:id>
    <ns2:value>010100100</ns2:value>
    <ns2:catalogName>BusinessInteraction.AdditionalProperty</ns2:catalogName>
    </ns2:catalogValue>
    </ns2:characteristic>
    </ns2:characteristicCollection>
    <ns6:priority>
    <ns2:id>2</ns2:id>
    </ns6:priority>
    <ns6:interactingRoleCollection>
    <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
    <ns6:identifierValue>12345678</ns6:identifierValue>
    <ns6:roleType>
    <ns2:id>1</ns2:id>
    </ns6:roleType>
    </ns6:businessInteractionRole>
    </ns6:interactingRoleCollection>
    <ns6:businessInteractionItemCollection>
    <ns6:businessInteractionItem>
    <ns6:businessInteractionRoleCollection>
    <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
    <ns6:identifierValue>12345678</ns6:identifierValue>
    <ns6:roleType>
    <ns2:id>1</ns2:id>
    </ns6:roleType>
    </ns6:businessInteractionRole>
    </ns6:businessInteractionRoleCollection>
    <ns6:topicGroupCollection>
    <ns6:topicGroup>
    <ns6:topicCollection>
    <ns6:topic>
    <ns2:id>1000024</ns2:id>
    <ns2:catalogName>BusinessInteraction.Topic.Job</ns2:catalogName>
    </ns6:topic>
    <ns6:topic>
    <ns2:id>2000228</ns2:id>
    <ns2:catalogName>BusinessInteraction.Topic.GroupServices</ns2:catalogName>
    </ns6:topic>
    </ns6:topicCollection>
    </ns6:topicGroup>
    </ns6:topicGroupCollection>
    <ns6:attachmentCollection>
    <ns6:attachment>
    <ns2:title>some.pdf</ns2:title>
    <ns2:documentContent xsi:type="ns2:File">
    <ns2:content>f34rff</ns2:content>
    <ns2:name>some.pdf</ns2:name>
    <ns2:extension>pdf</ns2:extension>
    </ns2:documentContent>
    </ns6:attachment>
    </ns6:attachmentCollection>
    </ns6:businessInteractionItem>
    </ns6:businessInteractionItemCollection>
    <ns6:recipients>test@test.si</ns6:recipients>
    <ns6:sender>test@test.si</ns6:sender>
    </ns11:businessInteraction>
    </ns11:createBusinessInteractionRequestMsg>
    </ns11:createBusinessInteraction>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


    I have problem with this compley type (xsi:type and xmlns:xsi):



    <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


    This is my code:



    $client = new SoapClient("http://service.test.com:80/services/common/businessinteraction/v1/BusinessInteractionService/v/1.8.0?wsdl",array('login'=> "myusername",
    'password'=> "Test123"));

    $param = array(
    'createBusinessInteractionRequestMsg' => array(
    'header' => array(
    'origin' => 'Test'
    ),
    'businessInteraction' => array(
    'originApplication' => array('id' => 31), //31
    'user' => array('username' => 'myusername'),
    'channel' => array('id' => 2), //2
    'origin' => array('id' => 2), //2
    'note' => 'Something',
    'subject' => 'Some subject',
    'status' => array('id' => 2),
    'priority' => array('id' => 2), //2
    'interactingRoleCollection' => array(
    'businessInteractionRole' => array(
    'identifierValue' => 12345678,
    'roleType' => array('id' => 1)
    )
    ),
    'businessInteractionItemCollection' => array(
    'businessInteractionItem' => array(
    'businessInteractionRoleCollection' => array(
    'businessInteractionRole' => array(
    'identifierValue' => 112047,
    'roleType' => array('id' => 1)
    )
    ),
    'subject' => 'Something',
    'topicGroupCollection' => array(
    'topicGroup' => array(
    'topicCollection' => array(
    'topic' => array(
    'id' => array(2000266,1000004),
    'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
    )
    ),
    'classification' => array(
    'id' => 1,
    'catalogName' => 'BusinessInteraction.TopicClassification'
    )
    )
    )
    )
    ),
    'recipients' => 'test@test.com',
    'sender' => 'test@test.com'
    )
    )
    );

    $value = $client->createBusinessInteraction($param);


    At first i had problems with duplicate keys. So from this:



    'topicGroupCollection' => array(
    'topicGroup' => array(
    'topicCollection' => array(
    'topic' => array(
    'id' => array(10000024),
    'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
    ),
    'topic' => array(
    'id' => array(2000266),
    'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
    )
    ),
    'classification' => array(
    'id' => 1,
    'catalogName' => 'BusinessInteraction.TopicClassification'
    )
    )
    )


    I changed it to:



    'topicGroupCollection' => array(
    'topicGroup' => array(
    'topicCollection' => array(
    'topic' => array(
    'id' => array(2000266,1000004),
    'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
    )
    ),
    'classification' => array(
    'id' => 1,
    'catalogName' => 'BusinessInteraction.TopicClassification'
    )
    )
    )


    1. So why do i get an error from the server that array does not exsist?


    2. And how do i add the complex type to the mentioned element?










    share|improve this question
























      0












      0








      0


      1






      I have 2 problems or can't seem to figure it out.



      Proble
      SOAP:



      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>
      <ns11:createBusinessInteraction xmlns:ns11="http://test.com/services/common/businessinteraction/v1" xmlns:ns10="http://test.com/services/common/base/v1" xmlns:ns12="http://test.com/services/common/customer/v1" xmlns:ns2="http://test.com/schemas/common/base/v1" xmlns:ns3="http://test.com/schemas/common/party/v1" xmlns:ns4="http://test.com/schemas/common/location/v1" xmlns:ns5="http://test.com/schemas/common/dealer/v1" xmlns:ns6="http://test.com/schemas/common/businessinteraction/v1" xmlns:ns7="http://test.com/schemas/common/customer/v1" xmlns:ns8="http://test.com/schemas/product/fulfillment/v1" xmlns:ns9="http://test.com/schemas/product/lifecycle/v1">
      <ns11:createBusinessInteractionRequestMsg>
      <ns10:header>
      <ns10:source>Someting</ns10:source>
      <ns10:destination>MM</ns10:destination>
      <ns10:origin>Someting</ns10:origin>
      <ns10:transactionId>6483fd9a-9bb9-4517-8341-f455146ad0af</ns10:transactionId>
      </ns10:header>
      <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ns2:characteristicCollection>
      <ns2:characteristic>
      <ns2:type>
      <ns2:value>MM_SOURCE</ns2:value>
      </ns2:type>
      <ns2:catalogValue>
      <ns2:id>37</ns2:id>
      <ns2:value>010100100</ns2:value>
      <ns2:catalogName>BusinessInteraction.AdditionalProperty</ns2:catalogName>
      </ns2:catalogValue>
      </ns2:characteristic>
      </ns2:characteristicCollection>
      <ns6:priority>
      <ns2:id>2</ns2:id>
      </ns6:priority>
      <ns6:interactingRoleCollection>
      <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
      <ns6:identifierValue>12345678</ns6:identifierValue>
      <ns6:roleType>
      <ns2:id>1</ns2:id>
      </ns6:roleType>
      </ns6:businessInteractionRole>
      </ns6:interactingRoleCollection>
      <ns6:businessInteractionItemCollection>
      <ns6:businessInteractionItem>
      <ns6:businessInteractionRoleCollection>
      <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
      <ns6:identifierValue>12345678</ns6:identifierValue>
      <ns6:roleType>
      <ns2:id>1</ns2:id>
      </ns6:roleType>
      </ns6:businessInteractionRole>
      </ns6:businessInteractionRoleCollection>
      <ns6:topicGroupCollection>
      <ns6:topicGroup>
      <ns6:topicCollection>
      <ns6:topic>
      <ns2:id>1000024</ns2:id>
      <ns2:catalogName>BusinessInteraction.Topic.Job</ns2:catalogName>
      </ns6:topic>
      <ns6:topic>
      <ns2:id>2000228</ns2:id>
      <ns2:catalogName>BusinessInteraction.Topic.GroupServices</ns2:catalogName>
      </ns6:topic>
      </ns6:topicCollection>
      </ns6:topicGroup>
      </ns6:topicGroupCollection>
      <ns6:attachmentCollection>
      <ns6:attachment>
      <ns2:title>some.pdf</ns2:title>
      <ns2:documentContent xsi:type="ns2:File">
      <ns2:content>f34rff</ns2:content>
      <ns2:name>some.pdf</ns2:name>
      <ns2:extension>pdf</ns2:extension>
      </ns2:documentContent>
      </ns6:attachment>
      </ns6:attachmentCollection>
      </ns6:businessInteractionItem>
      </ns6:businessInteractionItemCollection>
      <ns6:recipients>test@test.si</ns6:recipients>
      <ns6:sender>test@test.si</ns6:sender>
      </ns11:businessInteraction>
      </ns11:createBusinessInteractionRequestMsg>
      </ns11:createBusinessInteraction>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      I have problem with this compley type (xsi:type and xmlns:xsi):



      <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


      This is my code:



      $client = new SoapClient("http://service.test.com:80/services/common/businessinteraction/v1/BusinessInteractionService/v/1.8.0?wsdl",array('login'=> "myusername",
      'password'=> "Test123"));

      $param = array(
      'createBusinessInteractionRequestMsg' => array(
      'header' => array(
      'origin' => 'Test'
      ),
      'businessInteraction' => array(
      'originApplication' => array('id' => 31), //31
      'user' => array('username' => 'myusername'),
      'channel' => array('id' => 2), //2
      'origin' => array('id' => 2), //2
      'note' => 'Something',
      'subject' => 'Some subject',
      'status' => array('id' => 2),
      'priority' => array('id' => 2), //2
      'interactingRoleCollection' => array(
      'businessInteractionRole' => array(
      'identifierValue' => 12345678,
      'roleType' => array('id' => 1)
      )
      ),
      'businessInteractionItemCollection' => array(
      'businessInteractionItem' => array(
      'businessInteractionRoleCollection' => array(
      'businessInteractionRole' => array(
      'identifierValue' => 112047,
      'roleType' => array('id' => 1)
      )
      ),
      'subject' => 'Something',
      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(2000266,1000004),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )
      )
      ),
      'recipients' => 'test@test.com',
      'sender' => 'test@test.com'
      )
      )
      );

      $value = $client->createBusinessInteraction($param);


      At first i had problems with duplicate keys. So from this:



      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(10000024),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      ),
      'topic' => array(
      'id' => array(2000266),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )


      I changed it to:



      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(2000266,1000004),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )


      1. So why do i get an error from the server that array does not exsist?


      2. And how do i add the complex type to the mentioned element?










      share|improve this question














      I have 2 problems or can't seem to figure it out.



      Proble
      SOAP:



      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>
      <ns11:createBusinessInteraction xmlns:ns11="http://test.com/services/common/businessinteraction/v1" xmlns:ns10="http://test.com/services/common/base/v1" xmlns:ns12="http://test.com/services/common/customer/v1" xmlns:ns2="http://test.com/schemas/common/base/v1" xmlns:ns3="http://test.com/schemas/common/party/v1" xmlns:ns4="http://test.com/schemas/common/location/v1" xmlns:ns5="http://test.com/schemas/common/dealer/v1" xmlns:ns6="http://test.com/schemas/common/businessinteraction/v1" xmlns:ns7="http://test.com/schemas/common/customer/v1" xmlns:ns8="http://test.com/schemas/product/fulfillment/v1" xmlns:ns9="http://test.com/schemas/product/lifecycle/v1">
      <ns11:createBusinessInteractionRequestMsg>
      <ns10:header>
      <ns10:source>Someting</ns10:source>
      <ns10:destination>MM</ns10:destination>
      <ns10:origin>Someting</ns10:origin>
      <ns10:transactionId>6483fd9a-9bb9-4517-8341-f455146ad0af</ns10:transactionId>
      </ns10:header>
      <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ns2:characteristicCollection>
      <ns2:characteristic>
      <ns2:type>
      <ns2:value>MM_SOURCE</ns2:value>
      </ns2:type>
      <ns2:catalogValue>
      <ns2:id>37</ns2:id>
      <ns2:value>010100100</ns2:value>
      <ns2:catalogName>BusinessInteraction.AdditionalProperty</ns2:catalogName>
      </ns2:catalogValue>
      </ns2:characteristic>
      </ns2:characteristicCollection>
      <ns6:priority>
      <ns2:id>2</ns2:id>
      </ns6:priority>
      <ns6:interactingRoleCollection>
      <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
      <ns6:identifierValue>12345678</ns6:identifierValue>
      <ns6:roleType>
      <ns2:id>1</ns2:id>
      </ns6:roleType>
      </ns6:businessInteractionRole>
      </ns6:interactingRoleCollection>
      <ns6:businessInteractionItemCollection>
      <ns6:businessInteractionItem>
      <ns6:businessInteractionRoleCollection>
      <ns6:businessInteractionRole xsi:type="ns6:BusinessInteractionPartyRole">
      <ns6:identifierValue>12345678</ns6:identifierValue>
      <ns6:roleType>
      <ns2:id>1</ns2:id>
      </ns6:roleType>
      </ns6:businessInteractionRole>
      </ns6:businessInteractionRoleCollection>
      <ns6:topicGroupCollection>
      <ns6:topicGroup>
      <ns6:topicCollection>
      <ns6:topic>
      <ns2:id>1000024</ns2:id>
      <ns2:catalogName>BusinessInteraction.Topic.Job</ns2:catalogName>
      </ns6:topic>
      <ns6:topic>
      <ns2:id>2000228</ns2:id>
      <ns2:catalogName>BusinessInteraction.Topic.GroupServices</ns2:catalogName>
      </ns6:topic>
      </ns6:topicCollection>
      </ns6:topicGroup>
      </ns6:topicGroupCollection>
      <ns6:attachmentCollection>
      <ns6:attachment>
      <ns2:title>some.pdf</ns2:title>
      <ns2:documentContent xsi:type="ns2:File">
      <ns2:content>f34rff</ns2:content>
      <ns2:name>some.pdf</ns2:name>
      <ns2:extension>pdf</ns2:extension>
      </ns2:documentContent>
      </ns6:attachment>
      </ns6:attachmentCollection>
      </ns6:businessInteractionItem>
      </ns6:businessInteractionItemCollection>
      <ns6:recipients>test@test.si</ns6:recipients>
      <ns6:sender>test@test.si</ns6:sender>
      </ns11:businessInteraction>
      </ns11:createBusinessInteractionRequestMsg>
      </ns11:createBusinessInteraction>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      I have problem with this compley type (xsi:type and xmlns:xsi):



      <ns11:businessInteraction xsi:type="ns6:BusinessInteractionEmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


      This is my code:



      $client = new SoapClient("http://service.test.com:80/services/common/businessinteraction/v1/BusinessInteractionService/v/1.8.0?wsdl",array('login'=> "myusername",
      'password'=> "Test123"));

      $param = array(
      'createBusinessInteractionRequestMsg' => array(
      'header' => array(
      'origin' => 'Test'
      ),
      'businessInteraction' => array(
      'originApplication' => array('id' => 31), //31
      'user' => array('username' => 'myusername'),
      'channel' => array('id' => 2), //2
      'origin' => array('id' => 2), //2
      'note' => 'Something',
      'subject' => 'Some subject',
      'status' => array('id' => 2),
      'priority' => array('id' => 2), //2
      'interactingRoleCollection' => array(
      'businessInteractionRole' => array(
      'identifierValue' => 12345678,
      'roleType' => array('id' => 1)
      )
      ),
      'businessInteractionItemCollection' => array(
      'businessInteractionItem' => array(
      'businessInteractionRoleCollection' => array(
      'businessInteractionRole' => array(
      'identifierValue' => 112047,
      'roleType' => array('id' => 1)
      )
      ),
      'subject' => 'Something',
      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(2000266,1000004),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )
      )
      ),
      'recipients' => 'test@test.com',
      'sender' => 'test@test.com'
      )
      )
      );

      $value = $client->createBusinessInteraction($param);


      At first i had problems with duplicate keys. So from this:



      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(10000024),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      ),
      'topic' => array(
      'id' => array(2000266),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )


      I changed it to:



      'topicGroupCollection' => array(
      'topicGroup' => array(
      'topicCollection' => array(
      'topic' => array(
      'id' => array(2000266,1000004),
      'catalogName' => array('BusinessInteraction.Topic.Job','BusinessInteraction.Topic.GroupServices')
      )
      ),
      'classification' => array(
      'id' => 1,
      'catalogName' => 'BusinessInteraction.TopicClassification'
      )
      )
      )


      1. So why do i get an error from the server that array does not exsist?


      2. And how do i add the complex type to the mentioned element?







      php soap wsdl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 11:52









      CtrlAltEliteCtrlAltElite

      2815




      2815






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53261602%2fhow-to-make-a-soap-complex-type-call-with-duplicate-array-keys%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53261602%2fhow-to-make-a-soap-complex-type-call-with-duplicate-array-keys%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo