StdClass Attribute Request Problem - Soap Client

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • StdClass Attribute Request Problem - Soap Client

    Hallo, ich habe ein Problem, ich möchte diese Zeile haben :

    [COLOR="Blue"]
    <UniqueID [COLOR="Red"]source="ES"[/COLOR]>2</UniqueID>[/COLOR]


    Zur Info source ist in der xsd als Attribut definiert

    Mein Code;
    $sale_object = new stdClass();
    $sale_object->InvoiceRecipient->Profile->Profile->IDs->UniqueID->[COLOR="Red"]source[/COLOR] = [COLOR="Red"]"ES"[/COLOR];
    $sale_object->InvoiceRecipient->Profile->Profile->IDs->UniqueID = "2";

    Leider funktioniert das nicht! Jetzt meine Frage, wie kann zur der UniqueID das Attribut source = "2" hinzufügen?
    Das es so auschaut:
    <UniqueID source="ES">2</UniqueID>

    Ausgabe stdClass:

    [IDs] => stdClass Object
    (
    [UniqueID] => 2
    [source] => ES
    )

    Vielen Dank für eure Hilfe!
    Last edited by phop; 13-10-2011, 09:39.

  • #2
    Hmmm...

    Was sagt denn SoapClient:: __getTypes() dazu?

    Warum verwendest du stdClass()?
    Wir werden alle sterben

    Comment


    • #3
      was spricht gegen stdClass()?!

      Comment


      • #4
        Lösung:
        $sale_object->InvoiceRecipient->Profile->Profile->IDs->UniqueID = array("_" => "2", "source" => "ES") ;

        Comment

        Working...
        X