Forum Discussion
richie
Community Hero
Hey ameesh1984,
I can have a go at it, but im not a real scripter and i might miss something/be unaware of something that would cause it to fail.
I'll give it a shot, perhaps Rao or Himanshu may be able to help?...theyre definitely better placed to help than i.
In the meantime why dont you have a go too...youve been working with some groovy recently...right?
Between us we might be able to get somewhere.
Thats all i got im afraid,
Nice one
Rich
I can have a go at it, but im not a real scripter and i might miss something/be unaware of something that would cause it to fail.
I'll give it a shot, perhaps Rao or Himanshu may be able to help?...theyre definitely better placed to help than i.
In the meantime why dont you have a go too...youve been working with some groovy recently...right?
Between us we might be able to get somewhere.
Thats all i got im afraid,
Nice one
Rich
ameesh1984
4 years agoContributor
I am on it , pls start with the collection so that you do have a base to begin with
There was no way I could find to have a nested groovy and JS project in soap ui hence we need to convert this to groovy
There was no way I could find to have a nested groovy and JS project in soap ui hence we need to convert this to groovy
- richie4 years agoCommunity HeroNp. Working on it right now
Rich - ameesh19844 years agoContributor
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 ?
- richie4 years agoCommunity HeroHey ameesh1984,
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
Related Content
- 2 years agonormgean
- 9 months agoRicky1
- 4 years agoTommyTester
- 9 months agoMussieG
Recent Discussions
- 14 days agosmilnik