Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question How to invoke a webservice PUT ?

More
26 May 2017 11:14 - 26 May 2017 11:15 #1 by Emmanuel Rambeau
How to invoke a webservice PUT ? was created by Emmanuel Rambeau
Good morning,

I work with webservices supplied by an entity to get data. I just have to set in input a security code. Usually, it's very simple, because it is with the verb GET.
The URL is like the following :
https://myrandomserver.com/api/domain/v1/licensedUsers?securityCode=XXXXXXXXXX


For unknown reasons, the API I'm trying to use works with the verb PUT (even it is only to get data, as previously).
The curl syntax (which works) is the following :
curl -X PUT https://myrandomserver.com/api/library/v1 -d securityCode=XXXXXXXXXX


How can I invoke it with Stambia ?

I created, in my metadata, a new port with the verb PUT.
Next, I tried several things, like executing with only the modification of the verb, next modifying the binding type of the input, or finally set a HTTP header. But I didn't found the right issue.

I'm facing this error :

POST requests require a Content-length header.
(even it is effectively PUT...)


Could you please advise me ?

Thank you in advance.

Regards,

Emmanuel
Last edit: 26 May 2017 11:15 by Emmanuel Rambeau.
More
29 May 2017 13:47 - 30 May 2017 10:26 #2 by Emmanuel Rambeau
Replied by Emmanuel Rambeau on topic How to invoke a webservice PUT ?
Hello,

Solved by setting in the input type parameter : binding type = mime:content, and content-type = application/x-www-form-urlencoded.

Emmanuel
Last edit: 30 May 2017 10:26 by Emmanuel Rambeau. Reason: English traduction