• Sunil Sharma
  • NEWBIE
  • 30 Points
  • Member since 2013
  • Astrea

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 6
    Replies
Hi,
Below is the JSON Response of External REST Service API. My requirement is to extract a piece of data from the response. I am unable to deserialize the piece of data which is in BOLD.

{"sports" :[{"name" :"tennis","id" :850,"uid" :"s:850","leagues" :[{"name" :"Association of Tennis Professionals","abbreviation" :"atp","id" :850,"groupId" :"atp","shortName" :"ATP","athletes" :[{"id" :760,"firstName" :"Jorge","lastName" :"Aguilar","fullName" :"Jorge Aguilar","displayName" :"Jorge Aguilar","shortName" :"J. Aguilar","links" :{"api" :{"athletes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760"},"news" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news"},"notes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news/notes"}},"web" :{"athletes" :{"href" :"http://espn.go.com/tennis/player/_/id/760?ex_cid=espnapi_public"}},"mobile" :{"athletes" :{"href" :"http://m.espn.go.com/general/tennis/playercard?playerId=760&ex_cid=espnapi_public"}}}}]
}]}],"resultsOffset" :0,"resultsLimit" :50,"resultsCount" :1,"timestamp" :"2014-02-19T07:35:25Z","status" :"success"}

What is the diffarence between SOAP AND REST?

my apex class method is trying to call an external webservice function, and it gives this
 
Failed to invoke future method 'public static void mycall()'

Debug Log:
System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'
 
any idea of how to fix this? what should I do to make it work?
  • January 14, 2009
  • Like
  • 0
Hi I am trying to integrate salesforce.com with Oracle Apps using BPEL. I have published my BPEL as a webservice in our test server and had created an apex class which calls this webservice. Later I am invoking this using an S-control button in Accounts tab.

But I am getting the following error when I invoke the button.

**
{faultcode:’soapenv”Client’, faultstring:’System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element ‘http://schemas.xmlsoap.org/soap/envelope/:Envelope’ but found ‘:html’

Class.wwwTrianzCom.Create_AccountPort.process: line 15, column 13
Class.AccountWrapper.CreateFunction: line 5, column 10
**

Please help me to figure out the problem.

Thank you, Aneesh
Hi,
Below is the JSON Response of External REST Service API. My requirement is to extract a piece of data from the response. I am unable to deserialize the piece of data which is in BOLD.

{"sports" :[{"name" :"tennis","id" :850,"uid" :"s:850","leagues" :[{"name" :"Association of Tennis Professionals","abbreviation" :"atp","id" :850,"groupId" :"atp","shortName" :"ATP","athletes" :[{"id" :760,"firstName" :"Jorge","lastName" :"Aguilar","fullName" :"Jorge Aguilar","displayName" :"Jorge Aguilar","shortName" :"J. Aguilar","links" :{"api" :{"athletes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760"},"news" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news"},"notes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news/notes"}},"web" :{"athletes" :{"href" :"http://espn.go.com/tennis/player/_/id/760?ex_cid=espnapi_public"}},"mobile" :{"athletes" :{"href" :"http://m.espn.go.com/general/tennis/playercard?playerId=760&ex_cid=espnapi_public"}}}}]
}]}],"resultsOffset" :0,"resultsLimit" :50,"resultsCount" :1,"timestamp" :"2014-02-19T07:35:25Z","status" :"success"}