【问题标题】:How to create an otrs ticket using a soap request .Net如何使用肥皂请求.Net 创建 otrs 票
【发布时间】:2013-08-08 12:15:36
【问题描述】:

我已经创建了一个解决方案。 添加了 WSDL 文件。 这继续弹出以下错误“需要长度”。

我尝试在post ( 中使用上述代码,但似乎不起作用。 我们在哪里指定 Operation 名称?

-- 阿南德

【问题讨论】:

    标签: c# .net otrs


    【解决方案1】:

    在让它在 java c# .net 等中工作之前,您需要正确获取 SOAP xml。

    操作名称作为标签添加到soap body 元素中。 例如,您的操作名称是 OTRS UI Web 服务中指定的 createMyOTRSTicket。 发送的 SOAP 请求应如下所示:

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <createMyOTRSTicket xmlns="WS">          
             <UserLogin>MyUserName</UserLogin>
             <Password>MyPassword</Password>
                 <Queue>'some queue name'</Queue>
                 <State>'some state name'</State>
                 <Priority>1</Priority>
                 <!-- ...etc.. --> 
             <Article>
                 <Subject>some subject</Subject>
                 <Body>some body</Body>
                 <ContentType>text/plain; charset=utf8</ContentType>
            </Article>
        </createMyOTRSTicket >
    </soap:Body>
    </soap:Envelope>
    

    请参阅API,了解 TicketCreate here 需要哪些元素以及哪些元素是可选的

    应将 Soap 消息发送到 /nph-genericinterface.pl/Webservice/CreateTicketWS,其中 CreateTicketWS 是 Web 服务的名称。 另请注意,属性 xmlns="WS" 指的是您在“网络传输”配置中指定的命名空间,也位于 GenericInterface Web 服务管理中。 我希望这可以帮助你。抱歉,对于 SOAP 和 OTRS 的新手来说,这可能会有点令人困惑。

    【讨论】:

    • 有没有办法使用 GenericInterface 获取票证历史记录?
    • 嗨。目前最接近的是 GenericInterface 中的 TicketGet。见here
    猜你喜欢
    • 2013-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多