Forum Discussion
SaraCavelind
12 years agoContributor
Hi!
It's just one application that will use this mock servers and on that aplication we run one automated GUI test at one given time, so I figure here will not be any collisions?
So the situation right now:
On Windows using the soapUI client; I can have multiple mockservices running on the same port; and executing a request to the mock will in fact go to the real system retrieve the data, save the file to disc, and show the result to the soapUI client. Perfect!
Due to our environment we will execute the file using the mockservicerunner.sh, "nohup mockservicerunner.sh projectfil &" on AIX. When doing so I experience the same as If I run the file using mockservicerunner on windows: It appears I never get any answer from the backend system!
Are there any limittaion to the mockservicerunner? Like not using the same ports as you suggested?
def project = mockOperation.getMockService().getProject()
def request = project.interfaces["getPersonBinding"].operations["getPersonOp"].getRequestByName("Request 1")
// set request from incoming
request.requestContent = mockRequest.requestContent
// submit request asynchronously
request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
// save response to context
requestContext.responseMessage = request.responseContentAsXml
def fileW = new File(fullFileName)
fileW.createNewFile()
fileW.setWritable(true, false)
log.info "Skrivbar:"+fileW.canWrite()
log.info "InnehÄll"
log.info requestContext.responseMessage -> empty!
fileW.write(requestContext.responseMessage) -> Java Null pointer exception!
It's just one application that will use this mock servers and on that aplication we run one automated GUI test at one given time, so I figure here will not be any collisions?
So the situation right now:
On Windows using the soapUI client; I can have multiple mockservices running on the same port; and executing a request to the mock will in fact go to the real system retrieve the data, save the file to disc, and show the result to the soapUI client. Perfect!
Due to our environment we will execute the file using the mockservicerunner.sh, "nohup mockservicerunner.sh projectfil &" on AIX. When doing so I experience the same as If I run the file using mockservicerunner on windows: It appears I never get any answer from the backend system!
Are there any limittaion to the mockservicerunner? Like not using the same ports as you suggested?
def project = mockOperation.getMockService().getProject()
def request = project.interfaces["getPersonBinding"].operations["getPersonOp"].getRequestByName("Request 1")
// set request from incoming
request.requestContent = mockRequest.requestContent
// submit request asynchronously
request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
// save response to context
requestContext.responseMessage = request.responseContentAsXml
def fileW = new File(fullFileName)
fileW.createNewFile()
fileW.setWritable(true, false)
log.info "Skrivbar:"+fileW.canWrite()
log.info "InnehÄll"
log.info requestContext.responseMessage -> empty!
fileW.write(requestContext.responseMessage) -> Java Null pointer exception!
Related Content
Recent Discussions
- 4 days agominhng