cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
579
Views
0
Helpful
2
Replies

Got 404 using XML API

kuprianowiczm
Level 1
Level 1

Hi,


i am trying to integrate webex meetings in my ios application.


App send xml body like this :using (instead apidemoeu) my siteName and valid email and password:

"<?xml version="1.0" encoding="ISO-8859-1"?>

<serv:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:serv="http://www.webex.com/schemas/2002/06/service">

<header>

<securityContext>

<siteName>apidemoeu</siteName>

<password>hostpassword</password>

<email>hostid</email>

</securityContext>

</header>

<body>

<bodyContent xsi:type="java:com.webex.service.binding.user.AuthenticateUser">

<samlResponse>samlResponse message will go here</samlResponse>

</bodyContent>

</body>

</serv:message>"



Code building request:

     NSString * xml  = [self authentificateUser];//xml value higer

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://apidemoeu.webex.com/WBXService/XMLService"]

                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy

                                                       timeoutInterval:10.0];

   

    [request setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];

    [request setHTTPMethod:@"POST"];

   [request setHTTPBody:[xml dataUsingEncoding:NSUTF8StringEncoding]];

    NSError *error;

    NSURLResponse *response;

    NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];


Response always the same(with no difference with methods and base url server):

<NSHTTPURLResponse: 0x8da4f20> { URL: https://apidemoeu.webex.com/WBXService/XMLService/ } { status code: 404, headers {

    Connection = "Keep-Alive";

    "Content-Type" = "text/plain";

    Date = "Tue, 25 Mar 2014 10:29:16 GMT";

    "Keep-Alive" = "timeout=15, max=95";

    Server = "Apache-Coyote/1.1";

    "Transfer-Encoding" = Identity;

} }

What can be wrong? Is something with server configuration or is bug in my code?
Very thanks for help


2 Replies 2

kuprianowiczm
Level 1
Level 1

My bad. Sorry

Hello,

     Does the follow-up response indicate you were able to get this working? Unrelated, please note that you should use content-type of text/xml instead of application/x-www-form-urlencoded unless you are passing XML as url encoded form data in a post variable. While the XML API server is configured to ignore incorrect content-type, it is a best practice and configuration could change in the future. In the past, setting incorrect content-type has resulted in null response.