You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openmeetings.apache.org by Zhirong Tong <to...@ptteng.com> on 2020/06/30 06:36:09 UTC

How to forge a proper wsdl request in postman when having multiple DTO object as request param.

Hi ,
I would like to ask about how to forge a proper wsdl request in postman when having multiple DTO object as request param.
It was fine for me when proceed with http://localhost:5080/openmeetings/services/user/login <http://localhost:5080/openmeetings/services/user/login>, as it only require two simple string.





But http://localhost:5080/openmeetings/services/user/login <http://localhost:5080/openmeetings/services/user/login> was a headache to me , it has two dto object and a string. 
I’ve set header to Content-Type text/xml;charset=utf-8 and still got 400 bad request,  don’t know how to pass through this one.  Here is my code :

http://localhost:5080/openmeetings/services/user/hash

<soapenv:Envelope xmlns:soapenv="http://webservice.openmeetings.apache.org/" xmlns:ws="http://webservice.openmeetings.apache.org/org.apache.openmeetings.webservice.RoomWebService">
   <soapenv:Body>
      <ws:getRoomHash>
        <sid>0beff440-e67b-4c1c-b84d-e069bf066e2a</sid>
        <externalUserDTO>
            <externalId>1</externalId>
            <externalType>user</externalType>
        </externalUserDTO>
         <roomOptionsDTO>
          <roomId>1</roomId>
         </roomOptionsDTO> 
      </ws:getRoomHash>
   </soapenv:Body>
</soapenv:Envelope>


Re: How to forge a proper wsdl request in postman when having multiple DTO object as request param.

Posted by Maxim Solodovnik <so...@gmail.com>.
Comparing to REST API sample your "user" has too few fields ...

What's in the logs?

On Tue, 30 Jun 2020 at 14:36, Zhirong Tong <to...@ptteng.com> wrote:

> The   https://openmeetings.apache.org/RestAPISample.html was so helpful,
> but after all I tried make it that way  in postman , still get 400 bad
> request.   I know it could be very close or there might be a little mistake
> in my data .  Since it was a 400 bad request, so  there could be no log to
> tell what is wrong.
>
>
>
>
>
> On Jun 30, 2020, at 2:43 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> You can check console for latest OM build
> https://builds.apache.org/view/M-R/view/OpenMeetings/job/openmeetings/lastBuild/consoleFull
> It has unit tests for REST methods
> You can see payload and improve your calls
>
> Also please check REST sample available here
> https://openmeetings.apache.org/RestAPISample.html
>
> On Tue, 30 Jun 2020 at 13:36, Zhirong Tong <to...@ptteng.com> wrote:
>
>> Hi ,
>> I would like to ask about how to forge a proper wsdl request in postman
>> when having multiple DTO object as request param.
>> It was fine for me when proceed with
>> http://localhost:5080/openmeetings/services/user/login, as it only
>> require two simple string.
>>
>> <loginwasfine.png>
>>
>>
>>
>> But http://localhost:5080/openmeetings/services/user/login was a
>> headache to me , it has two dto object and a string.
>> I’ve set header to Content-Type text/xml;charset=utf-8 and still got 400
>> bad request, don’t know how to pass through this one. Here is my code :
>>
>> http://localhost:5080/openmeetings/services/user/hash
>>
>> <soapenv:Envelope xmlns:soapenv="
>> http://webservice.openmeetings.apache.org/" xmlns:ws="
>> http://webservice.openmeetings.apache.org/org.apache.openmeetings.webservice.RoomWebService
>> ">
>> <soapenv:Body>
>> <ws:getRoomHash>
>> <sid>0beff440-e67b-4c1c-b84d-e069bf066e2a</sid>
>> <externalUserDTO>
>> <externalId>1</externalId>
>> <externalType>user</externalType>
>> </externalUserDTO>
>> <roomOptionsDTO>
>> <roomId>1</roomId>
>> </roomOptionsDTO>
>> </ws:getRoomHash>
>> </soapenv:Body>
>> </soapenv:Envelope>
>>
>> <dto_request.png>
>>
>
>
> --
> Best regards,
> Maxim
>
>
>

-- 
Best regards,
Maxim

Re: How to forge a proper wsdl request in postman when having multiple DTO object as request param.

Posted by Zhirong Tong <to...@ptteng.com>.
The   https://openmeetings.apache.org/RestAPISample.html <https://openmeetings.apache.org/RestAPISample.html> was so helpful, but after all I tried make it that way  in postman , still get 400 bad request.   I know it could be very close or there might be a little mistake in my data .  Since it was a 400 bad request, so  there could be no log to tell what is wrong.





> On Jun 30, 2020, at 2:43 PM, Maxim Solodovnik <so...@gmail.com> wrote:
> 
> You can check console for latest OM build https://builds.apache.org/view/M-R/view/OpenMeetings/job/openmeetings/lastBuild/consoleFull <https://builds.apache.org/view/M-R/view/OpenMeetings/job/openmeetings/lastBuild/consoleFull>
> It has unit tests for REST methods
> You can see payload and improve your calls
> 
> Also please check REST sample available here https://openmeetings.apache.org/RestAPISample.html <https://openmeetings.apache.org/RestAPISample.html>
> On Tue, 30 Jun 2020 at 13:36, Zhirong Tong <tongzhirong@ptteng.com <ma...@ptteng.com>> wrote:
> Hi ,
> I would like to ask about how to forge a proper wsdl request in postman when having multiple DTO object as request param.
> It was fine for me when proceed with http://localhost:5080/openmeetings/services/user/login <http://localhost:5080/openmeetings/services/user/login>, as it only require two simple string.
> 
> <loginwasfine.png>
> 
> 
> 
> But http://localhost:5080/openmeetings/services/user/login <http://localhost:5080/openmeetings/services/user/login> was a headache to me , it has two dto object and a string. 
> I’ve set header to Content-Type text/xml;charset=utf-8 and still got 400 bad request,  don’t know how to pass through this one.  Here is my code :
> 
> http://localhost:5080/openmeetings/services/user/hash <http://localhost:5080/openmeetings/services/user/hash>
> 
> <soapenv:Envelope xmlns:soapenv="http://webservice.openmeetings.apache.org/ <http://webservice.openmeetings.apache.org/>" xmlns:ws="http://webservice.openmeetings.apache.org/org.apache.openmeetings.webservice.RoomWebService <http://webservice.openmeetings.apache.org/org.apache.openmeetings.webservice.RoomWebService>">
>    <soapenv:Body>
>       <ws:getRoomHash>
>         <sid>0beff440-e67b-4c1c-b84d-e069bf066e2a</sid>
>         <externalUserDTO>
>             <externalId>1</externalId>
>             <externalType>user</externalType>
>         </externalUserDTO>
>          <roomOptionsDTO>
>           <roomId>1</roomId>
>          </roomOptionsDTO> 
>       </ws:getRoomHash>
>    </soapenv:Body>
> </soapenv:Envelope>
> 
> <dto_request.png>
> 
> 
> -- 
> Best regards,
> Maxim


Re: How to forge a proper wsdl request in postman when having multiple DTO object as request param.

Posted by Maxim Solodovnik <so...@gmail.com>.
You can check console for latest OM build
https://builds.apache.org/view/M-R/view/OpenMeetings/job/openmeetings/lastBuild/consoleFull
It has unit tests for REST methods
You can see payload and improve your calls

Also please check REST sample available here
https://openmeetings.apache.org/RestAPISample.html

On Tue, 30 Jun 2020 at 13:36, Zhirong Tong <to...@ptteng.com> wrote:

> Hi ,
> I would like to ask about how to forge a proper wsdl request in postman
> when having multiple DTO object as request param.
> It was fine for me when proceed with
> http://localhost:5080/openmeetings/services/user/login, as it only
> require two simple string.
>
>
>
>
> But http://localhost:5080/openmeetings/services/user/login was a headache
> to me , it has two dto object and a string.
> I’ve set header to Content-Type text/xml;charset=utf-8 and still got 400
> bad request, don’t know how to pass through this one. Here is my code :
>
> http://localhost:5080/openmeetings/services/user/hash
>
> <soapenv:Envelope xmlns:soapenv="
> http://webservice.openmeetings.apache.org/" xmlns:ws="
> http://webservice.openmeetings.apache.org/org.apache.openmeetings.webservice.RoomWebService
> ">
> <soapenv:Body>
> <ws:getRoomHash>
> <sid>0beff440-e67b-4c1c-b84d-e069bf066e2a</sid>
> <externalUserDTO>
> <externalId>1</externalId>
> <externalType>user</externalType>
> </externalUserDTO>
> <roomOptionsDTO>
> <roomId>1</roomId>
> </roomOptionsDTO>
> </ws:getRoomHash>
> </soapenv:Body>
> </soapenv:Envelope>
>
>

-- 
Best regards,
Maxim