Forum Discussion

GeertsP's avatar
GeertsP
Occasional Contributor
9 years ago

rest (get) mock service configuration (dispatch error)

Hi All,

 

being a long time user of soapui in soap context interfaces I am now involved with testing a HTTP Get Rest call.

Since I noticed that soapui supports this as well I intend to use it for testing the gateway we have deployed here.

The gateway is to function as a 100% passthrough of the request it receives. 

So I intend to use SOAPUI for both making REST call and capturing the forwarded (by the gateway) request with a Mock service. 

The request looks as follows: 

 

http://puhsap0010:8000/sap/geoe/arcgis/sync?sap-client=100&Command=U&ObjNr=IE000000000010927004&Category=B&ObjType=IE&TXNMSG=%7B%22attributes%22%3A%7B%22GEOCODE%22%3A%22107%22%2C%22KM_GEOCODE%22%3A%2212.74%22%2C%22AFKORTING%22%3A%22Ztmo%22%7D%7D&Direction=S&SubType=STATION

 

My gateway receives this request (matched on the basis of the URI) and dispatches it further and ultimately makes a call to my mockservice (leaving all request parameters intact !)

 

I have configured my mockservice  for a GET method and a Resource path of :  /sap/geoe/arcgis/sync

In addition I created a response which is basically a HTTP 200 OK code.  

However when I run this I keep getting a [dispath error, missing response]. which the client sees as a

 

<data contentType="null" contentLength="62"><![CDATA[Service response code: 404
Service response:
Service status: ]]></data>

 

and not the ok message I want to see.    Judging by the error message two things might be incorrect

1. the resource path is not matched and therefore the dispatch error

2. or it matched but there is no response defined in some way. 

 

I currently suspect the first so the question is what the resource path should be in this type of situation ?  I can't give it the full string because it will change with every call and I don't whether other mechanisms like e.g. wildcards are needed. 

If however you think the path is correct what could the reason that the response is not returned ?  

 

Thanks

 

Peter

 

 

 

 

No RepliesBe the first to reply