I've been using Network Analyst in ArcGIS desktop (10.1), and using succesfully some SOAP API operations (findAddressCandidates, GetNALAyerNames, GetSolverParameters, GetSolverParameters2)

But now want to get OD Cost Matrix (Network Analyst) using SOAP API.

I've been following the steps: http://resources.arcgis.com/en/help/soap/10.1/#/Overview/01vp0000001p000000/

Basically, I call getSolverParameters2 to get parameters and content of NAClasses for the OD Cost Matrix Layer.

Debugging the code, I can see data returned by getSolverParameters2.

When I call solve operation (defined in WSDL)

I get and HTTP 400 Error (Bad request) and the following message:

"The request sent by the client was syntactically incorrect ()"

NAServerODCostMatrixParams params = (NAServerODCostMatrixParams) port.getSolverParameters2("OD Cost Matrix", "", true); NAServerSolverResults results = port.solve(params);

(Also, I've been trying fill NAServerODCostMatrix 'by hand', unsuccesfuly )

I trace the SOAP request message and I can see the content. The same results I get when I follow this steps using SOAP UI.

Do you have any idea about this problem and/or to solve it? or what can I try?

  • What happens when you try GetSolverParameters instead? Maybe use the code sample there to make sure NALayerName is spelled correctly. – Kirk Kuykendall Jun 26 '13 at 22:36

You may not have seen these remarks on SOAP SDK documentation for NAServerODCostMatrixParams:

You cannot set return both the ODLines and the ODMatrix. If you want to return the ODLines, ReturnODLines should be set to true, MatrixResultType must be set to esriNAODCostMatrixNone and ReturnODMatrix must be set to false. If you want to return the ODMatrix, ReturnODMatrix should be set to true, OutputLines must be set to esriNAOutputLineNone, and PopulateODLines and ReturnODLines must all be set to false.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.