Forum Discussion
Had a q when i try to do this in SOAP UI
The URL in the collection has
https://{{DocumentDBHost}}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I created a project level property for DocumentDBHost with value rxc-provider-dev-us-c-cdb.documents.azure.com:443
When i use this in my TC like below
https://{#Project#DocumentDBHost}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I get a error
- Tue Jun 23 21:54:25 CDT 2020:ERROR:An error occurred [Illegal character in authority at index 8: https://{/#Project%23DocumentDBHost%7D], see error log for details
and Null pointer exception ...
how do i make this work ?
Are you typing out these URLs or are you copy and pasting?
Reason i ask is you state the following:
"https://{{DocumentDBHost}}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I created a project level property for DocumentDBHost with value rxc-provider-dev-us-c-cdb.documents.azure.com:443"
So are you saying the full URL (host and URI) is as follows?
https://rxc-provider-dev-us-c-cdb.documents.azure.com:443/ dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
That hostname is huge.
Anyway (sorry im getting sidetracked) i believe the error response is giving you the clue where it states " error occurred [Illegal character in authority at index 8: https://{/#Project%23DocumentDBHost%7D] "
You have an erroneous forward slash character ( '/' ) in the hostname. The 3rd slash from the left shouldnt be there. A slash is a reserved character in http as it means something specific. Hence you cant use a / in a hostname.
Also you have an extra ] character (which isnt an http reserved character) but the ] character isnt included in the URI you defined earlier in your post.
Nice one
Rich
Is that right?
- ameesh19844 years agoContributorThe url you have is right that's azure cloud and its long
The issue is I have 5.4 soapui so i cannot import the collection else would not have to do this ...manually create each property
If u have and are trying with 5.5 or Pro etc you could just import collection in soap ui - richie4 years agoCommunity HeroYeah i've got ReadyAPI!, but that doesnt help you does it?
I suppose if you send me your collection i could import it and then save it as a new project and send you the project, but i wouldn't have thought the company you work for would allow that...
Rich - ameesh19844 years agoContributorIf you see the collection after import the only parameters are the DocumentHost and master key , you can put your values and change the pre script and make it work, then export it and send me on gmail as they are only json files , that would work
ameesh1984@gmail.com is my gmail - ameesh19844 years agoContributorYou could also put it up on a public github after testing it in your local , same like the original collection and I can take it from there
- ameesh19844 years agoContributorYours would be a XML from soap ui which I could import and change the values for my host and run it hopefully
- richie4 years agoCommunity HeroHey ameesh1984,
Slow up a bit mate, we're getting ahead of ourselves.
Its gonna be about another 3 hours til i have the chance to look at the prescript (remember im not a scripter so no guarantees), have you made any headway with your script?
SOME QUESTIONS:
Q1. Does the postman collection have only a single request in it? Seems like a lot of effort for a single request fella....wouldn't it just be easier for you to manually create a single request?
Q2. If you want me to create the request myself i'm gonna need a lot more info than youve supplied so far. All i know is the full URL, that there is a parameterised hostname and there is some other parameter.
Q3. You haven't indicated the http method/verb....what method is used by the request....GET? POST? PATCH? PUT? DELETE? etc.
Q4. Is there a payload associated with the request? If there is a payload, whats the datatype of payload?
Q5. You state there are only 2 parms...hostname and master key. What parm type is the master key? Header? Uri/template? Matrix? Query?
Q6. Are there any custom headers (people quite often forget about the headers thinking theyre just environmental, but you do get custom headers occasionally)???
I'm more than happy to do the above fella, but it's probably quicker for you to do it rather than even bothering to type the answers to my questions! To be honest the fact that you wanna import the request from a collection rather than just create the thing directly in soapui makes me think its far more complicated than described...or am i misunderstanding something else? (I tend to have a perpetual cloud of confusion most days of the week...)
Cheers!
Rich - ameesh19844 years agoContributorIf you open the collection all 10 requests use the same pre request script
I need one of them converted to groovy so that it can work with soap ui
If you have an azure instance to test against you can try it with your variables for 1 request - richie4 years agoCommunity HeroWhat do you mean "if you have an azure instance you can try it with variables for 1 request"
Azure is just the clour hosting platform. I have a number of different projects hosting various different applications, but none of them are expecting me to publish your request to them.
Im also gonna need the previous questions i asked answered so i know what im trying and can tailor the request accordingly!
Ta
Rich - ameesh19844 years agoContributor
First are you able to import this collection into your Postman
https://github.com/liupeirong/cosmosdb-postman-collection
Once you do you will see a collection called "Query Collection - specify query in body"
All is had to do is in the environment look up on the top right of postman set my azure host and Master key and the query as put below in the body of my message
{
"query": "SELECT * FROM provider_pharmacy c WHERE c.pharmacyId = @id",
"parameters": [
{"name": "@id", "value": "xbbbbbd"}
]
}
I need the same to work from soap ui but i dont have the pre request script in groovy
This should answer all your questions - ameesh19844 years agoContributorAny update on this did u get to try
I am not a js guy hence struggling to find the statements to convert it to groovy
Related Content
- 2 years agonormgean
- 9 months agoRicky1
- 4 years agoTommyTester
- 9 months agoMussieG
Recent Discussions
- 14 days agosmilnik