NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

WFA REST calls giving "argument type mismatch"

arndt
12,682 Views

Hi all,

I have a script that I wrote in Perl for running WFA workflows via REST calls, which used to work with WFA 2.0.  Now I am trying to run it for some workflows, against a WFA 2.1 or 2.2RC1 server, and in both cases I am getting an error of "argument type mismatch".  Here are a few more details from the WFA server.log file

2014-04-15 16:41:26,874 ERROR [com.netapp.wfa.rs.validation.WfaExceptionMapper] (http-executor-threads - 125) REST service got exception, returning: Internal Server Error (500): org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to public javax.ws.rs.core.Response com.netapp.wfa.rs.workflow.WorkflowResource.executeWorkflow(java.lang.String,com.netapp.wfa.rs.workflow.model.WorkflowInput,javax.ws.rs.core.UriInfo)  ( java.lang.String 76b936ba-d52e-4304-b562-01676d35ad43, java.lang.String <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workflowInput> <userInputValues> <userInputEntry key="ClusterName" value="cs001"/> <userInputEntry key="VserverName" value="vs05_arndt_de"/> <userInputEntry key="VolumeName" value="wfatest1"/> <userInputEntry key="VolumeSizeInGB" value="1"/> </userInputValues> </workflowInput> </xml>, com.sun.proxy.$Proxy173 org.jboss.resteasy.specimpl.UriInfoImpl@585e0f79 )

And further down in server.log:

Caused by: java.lang.IllegalArgumentException: argument type mismatch

I am able to REST GET calls to determine the workflow UUID, so I know my authentication is working.  Any ideas what is going on?  Thanks,

Mike

1 ACCEPTED SOLUTION

ktim
12,682 Views

Hi Mike,

It looks like "Bad arguments passed to public javax.ws.rs.core.Response" is a fairly generic error based on a quick search.

More log information might be useful (or your code perhaps?).

I found with WFA REST workflow invocation that

- you need to use HTTP/1.0 (not 1.1)

- Set content type to application/xml

- Request type is POST

Regards,

Tim

View solution in original post

5 REPLIES 5

ktim
12,682 Views

Hi Mike,

I suspect that the "</xml>" tag is causing this. This shouldn't be present.

[The <?xml ... ?>  bit is the XML declaration and doesn't need a matching close tag]

Regards,

Tim

arndt
12,682 Views

Oops, good catch Tim, but that was just me messing with my XML because I was suspecting something may be wrong with it. I get the same error with that removed…here are the relevant log entries:

2014-04-16 07:21:13,101 ERROR (http-executor-threads - 133) REST service got exception, returning: Internal Server Error (500): org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to public javax.ws.rs.core.Response com.netapp.wfa.rs.workflow.WorkflowResource.executeWorkflow(java.lang.String,com.netapp.wfa.rs.workflow.model.WorkflowInput,javax.ws.rs.core.UriInfo) ( java.lang.String 76b936ba-d52e-4304-b562-01676d35ad43, java.lang.String , com.sun.proxy.$Proxy173 org.jboss.resteasy.specimpl.UriInfoImpl@6d19f804 )

Caused by: java.lang.IllegalArgumentException: argument type mismatch

Any other ideas? Thanks,

Mike

arndt
12,682 Views

The XML from that last log message didn't show up right...here it is:

2014-04-16 07:21:13,101 ERROR [com.netapp.wfa.rs.validation.WfaExceptionMapper] (http-executor-threads - 133) REST service got exception, returning: Internal Server Error (500): org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to public javax.ws.rs.core.Response com.netapp.wfa.rs.workflow.WorkflowResource.executeWorkflow(java.lang.String,com.netapp.wfa.rs.workflow.model.WorkflowInput,javax.ws.rs.core.UriInfo)  ( java.lang.String 76b936ba-d52e-4304-b562-01676d35ad43, java.lang.String <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workflowInput> <userInputValues> <userInputEntry key="ClusterName" value="cs001"/> <userInputEntry key="VserverName" value="vs05_arndt_de"/> <userInputEntry key="VolumeName" value="wfatest1"/> <userInputEntry key="VolumeSizeInGB" value="1"/> </userInputValues> </workflowInput>, com.sun.proxy.$Proxy173 org.jboss.resteasy.specimpl.UriInfoImpl@6d19f804 )

ktim
12,683 Views

Hi Mike,

It looks like "Bad arguments passed to public javax.ws.rs.core.Response" is a fairly generic error based on a quick search.

More log information might be useful (or your code perhaps?).

I found with WFA REST workflow invocation that

- you need to use HTTP/1.0 (not 1.1)

- Set content type to application/xml

- Request type is POST

Regards,

Tim

arndt
12,682 Views

Looks like I needed to set the content-type to application/xml, and things are working now.  Thanks!

Mike

Public