0

When I publish a REST API using context “/configuration” and version “v3.0”, and Production URL “myhost.com/configuration/v3.0”, and make a call to “apim.com/configuration/v3.0/codes/?count=5&id=11849&offset=0”, API Manager correctly passes the following on to my endpoint: “myhost.com/configuration/v3.0/codes/?count=5&id=11849&offset=0”.

When I do a similar thing with a SOAP API, using context “/configuration” and version “v3.0”, and Production URL ”myhost.com/configuration/v3.0”, and make a call to “apim.com/configuration/v3.0/codes”, the API Manager pass he the following on to my endpoint: “myhost.com/configuration/v3.0”. This doesn’t work because “codes” was dropped.

Is there something different API Manager does with REST and SOAP? Seems odd.

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
  • what do you mean by "When I do a similar thing with a SOAP API,".. ? How you published your API now, and how you are executing that? – Ratha Jun 12 '13 at 11:30
  • I publish the SOAP API using context "/configuration" and version "v3.0", and specify a Production URL of "myhost.com/configuration/v3.0". When I call the API, I specify "apim.com/configuration/v3.0/codes" as the URI along with the rest of my SOAP message. But the message passed to my server from APIM is "myhost.com/configuration/v3.0", not "myhost.com/configuration/v3.0/codes". – user2344065 Jun 12 '13 at 12:03
  • This is different behavior than I get if I do a similar thing with a REST interface. In that case, I publish the REST API using context "/configuration", and version "v3.0", and Production URL "myhost.com/configuration/v3.0". When I call the API, "apim.com/configuration/v3.0/codes/?count=5&id=11849&offset=0", APIM correctly passes "myhost.com/configuration/v3.0/codes/?count=5&id=11849&offset=0" to my server. Why does "/codes" get dropped in the SOAP case? – user2344065 Jun 12 '13 at 12:07
  • Hi Ratha. This is really going to cause us issues soon - any ideas? – user2344065 Jun 14 '13 at 14:47
  • Hi, your commnet is not clear, what do you mean by SOAPAPI and RESTAPI.? If you publish an API via APIManager , all are REST API. DO you mean your backend service is a SOAP service and one is another RESTAPI? IF so, you can clearly provide which service/api works fine with waht type of request, and URL etc..Sorry, your terms are not clear – Ratha Jun 14 '13 at 15:34
  • Hi Ratha. Sorry I wasn't clear. Yes, we support both SOAP and REST on our backend services. Right now, I'm just trying to get SOAP to work. When I publish using the context "/configuration" and version "v3.0", and specifiy a Production URL of "myhost.com/configuration.v3.0", and call the API via "apim.com/configuration/v3.0/codes", along with my SOAP message, the message passed to may server seems to be "myhost.com/configuration/v3.0", not "myhost.com/configuration/v3.0/codes". Thus, my back end service can't process the message. – user2344065 Jun 17 '13 at 16:34
  • When I was playing with publishing a REST interface, the REST parameters get passed to the backend server, so I'm not sure why it's different. – user2344065 Jun 17 '13 at 16:34
  • Hi Ratha. Here is a bit more info, hopefully more clear. This is from the API Manager http_access log. localhost:8280 - - - "POST /configuration/v3.0/codes/SOAP HTTP/1.1" - - "-" "Apache-HttpClient/4.1.1 (java 1.5)" myHost.com:8081 - - - "POST http://myhost.com:8081/configuration/v3.0 HTTP/1.1" - - "-" "Synapse-HttpComponents-NIO". Why doesn't the API Manager POST to myhost.com include the "/codes/SOAP"? – user2344065 Jun 19 '13 at 20:02
  • When you make call to an API-S(backend service is SOAP service)like `http://host/myhost.com/configuration/v3.0/codes` APIManager drops "/codes" string and for the API-R(backend service is SOAP service),It is allowed to pass that "/codes" string? Can you post your API configurations for both cases.You can find that in the deploymnet/server/synapseconifg/api folder. In both cases, you are doing POST? – Ratha Jun 20 '13 at 17:26
  • API configuration in synapseconfig is too long to post. But it is the same in both the REST and the SOAP cases. I have found that if I manually change the address uri in synapseconfig from myhost.com:8081/configuration/v3.0 to myhost.com:8081/configuration/v3.0/codes, it works as I want for SOAP. It's just odd that isn't required for REST. Is there something in API Manager that is acting differently if I have a SOAP backend? – user2344065 Jun 25 '13 at 20:52

0 Answers0