ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Unable to bind to the Service Catalog RequestService web service in Visual Studio 2005.

book

Article ID: 53430

calendar_today

Updated On:

Products

CA IT Asset Manager CA Software Asset Manager (CA SAM) ASSET PORTFOLIO MGMT- SERVER Service Accounting SERVICE ASSURE CA Service Catalog CA Service Management - Service Desk Manager CA Unicenter NSM

Issue/Introduction

Description:

When I add a Web Reference to the RequestService web service in Visual Studio 2005, the web service isn't available.
If I select the "Update Web Reference" option for this Web Service, it generates an error:

"The custom tool 'MSDiscoCodeGenerator' failed.
Unable to import binding 'RequestServiceSOAPBinding' from namespace 'urn:usmRequestService'."

and in the Error pane at the bottom of the Visual Studio window, it says:
"Custom tool error: Unable to import WebService/Schema.
Unable to import binding 'RequestServiceSoapBinding' from namespace 'urn:usmRequestService'.
Unable to import operation 'addRequestAttachment'. The datatype 'http://xml.apache.org/xml-soap:DataHandler' is missing."

Solution:

This is because of the input parameter DataHandler in the webservice method ''addRequestAttachment' in RequestService.
In Catalog 11.2 SP2 this method is deprecated and a new method was created, addRequestAttachmentWithPath.

Follow the below instructions to resolve this problem:
Log in to the computer on which Service View is installed.

  1. Go to %USM_HOME%\view\webapps\usm\admin.

  2. Edit the file deploy_Request.wsdd. Instead of '*' in the value for the "allowedMethods" parameter, list all of the methods for this webservice, except addRequestAttachment, separated by commas.

    i.e. Change

    <parameter name="allowedMethods" value="*"/>

    to

    <parameter name="allowedMethods" value="getRequestHeader ,getDefaultUserForRequestActions
    ,submitRequest ,saveRequest ,addRequestNote ,addRequestItemNote ,getRequestNotes
    ,addRequestOfferingNote ,getRequestOfferingNotes ,getRequestItemNotes ,getRequestItems
    ,aveRequestForm ,sendRequestEmail ,getPrimaryServiceDesk ,cancelRequest ,getPendingActions
    ,getRequests ,deleteRequests ,logOut ,logIn ,logInToken ,getRequestItem ,updateRequestOfferingStatus
    ,getRequestItemRow ,updateRequestItemRowStatus ,getRequestsByUserID ,getRequestsByAccountID
    ,getPendingActionsForRequest ,addRequestWithForm ,saveRequestHeader ,saveRequestItems
    ,addWorkflowPendingAction ,addRequestAttachmentWithPath ,editRequestAttachmentDetails
    ,removeRequestAttachment ,getRequestAttachments ,addProcessInstanceToRequestItem
    ,addProcessInstanceToRequest ,addProcessInstanceToRequestItemOffering ,getRequestStatus
    ,getRequestOfferingStatus ,getRequestItemStatus ,getAssetUUIDByRequestID ,getAssetUUIDByRequestItemID
    ,getFormRateItemValue ,getFormRateItemValues ,addTicketToRequestItem ,getTicketFromRequestItem
    ,assignAssetUUIDToRequestItem ,unassignAssetUUIDFromRequestItem ,getModelUUIDByRateItemID
    ,assignModelUUIDToRateItem ,unassignModelUUIDFromRateItem ,getModelUUIDByRequestItemID"/>

    The easiest way to get a complete list of methods, go to the Web Services page (http://<server>:<port>/usm/services), and you can copy/paste the list of methods from the RequestService method, removing "addRequestAttachment" from the list.

  3. In the same file, change the value of the typeMappingVersion parameter from 1.2 to 1.1, as follows:

    <parameter name="typeMappingVersion" value="1.1"/>

  4. Log into Service Delivery, and re-deploy the RequestService Web Service:

    • "Administration"
    • "Tools"
    • "Web Services"
    • Select "RequestService" and click on undeploy.
    • Select "RequestService" and click on deploy.

      The addRequestAttachment method will still be displayed in the list, as this is hard coded, but it will not be deployed and so will not cause this problem.

Environment

Release:
Component: USVCT