Jump to:

3377 Posts in 1001 Topics by 714 members

Data Model Questions

SilverStripe Forums » Data Model Questions » SOAPModelAccess / Content-Type of response

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 987 Views
  • rob.s
    Avatar
    Community Member
    78 Posts

    SOAPModelAccess / Content-Type of response Link to this post

    Hi,

    these days i'm trying to consume a SS-Model by a C# (.NET 2.0) SOAP Client.
    The wsdl is correctly interprated since SS 2.4.x !!

    But i'm always getting an error when getXML() is invoked.

    Something like:
    ... the expected Content-Type is text/xml. The Content-Type of the response is "text/html; charset=UTF-8"

    I tried to insert at:
    SOAPModelAccess.php

       function getXML($class, $id, $relation = false, $username = null, $password = null) {
          $this->authenticate($username, $password);
          
          $response = Director::test(
             $this->buildRestfulURL($class, $id, $relation, 'xml'),
             null,
             null,
             'GET'
          );
    $response->addHeader('Content-Type', 'text/xml');
          return ($response->isError()) ? $this->getErrorMessage($response) : $response->getBody();
       }

    with no luck ......

    Can anyone help me ?

    Greetings,
    Rob

  • rob.s
    Avatar
    Community Member
    78 Posts

    Re: SOAPModelAccess / Content-Type of response Link to this post

    Sorry for bumping this post.
    Are there any ideas out there, how to fix this issue ?

    Rob

    Edit: 2.4.4. is in use ...

  • saviolan
    Avatar
    Community Member
    1 Post
    987 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.