cancel
Showing results for 
Search instead for 
Did you mean: 

Unsupported HTTP Method: PUT

Highlighted
Regular Visitor

Unsupported HTTP Method: PUT

Hi,

I am using SOAPUI Open Source 5.5.0 for both windows and linux environment.

I have created a mock response service on my windows machine and using DISPATCH as SCRIPT.

I have defined two responses depending on parameter in request.I have tested this on the windows machine and it is working fine.

However when I export this project and run this in linux environment using ./mockservicerunner.sh -m.

Now when I fire a request with HTTP PUT method,I am receiving an exception com.eviware.soapui.impl.wsdl.mock.DispatchException: Unsupported HTTP Method: PUT.

Can I get some clue as of why I am receiving this exception.

Below is the script code:

import javax.xml.xpath.*
import groovy.xml.StreamingMarkupBuilder
import groovy.lang.Binding;
import groovy.lang.Script;
def util = new com.eviware.soapui.support.GroovyUtils( context )
def xml = new XmlSlurper().parseText(mockRequest.requestContent)
def country = xml.Body.Set.MOAttributes.SetSubscription.api_code
def str = country.toString()
def resultingResponse = "none"
log.info str
//def len = str.size()
//log.info len
if(str == "5300")
{
//context.ResultResponse = 'Response2'
resultingResponse = 'Response1'
log.info "r1"
}
else if(str != "5300")
{
resultingResponse = 'Response2'
log.info "r2"
}
context.ResultResponse = resultingResponse

=====================================================================================

Below is the full exception log:

2019-12-11 06:48:46,627 ERROR [errorlog] com.eviware.soapui.impl.wsdl.mock.DispatchException: Unsupported HTTP Method: PUT
com.eviware.soapui.impl.wsdl.mock.DispatchException: Unsupported HTTP Method: PUT
at com.eviware.soapui.model.support.AbstractMockDispatcher.dispatchPutRequest(AbstractMockDispatcher.java:55)
at com.eviware.soapui.model.support.AbstractMockDispatcher.dispatchRequest(AbstractMockDispatcher.java:104)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:116)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)