2013-07-20 50 views
0

爲了達到集成目的,我們需要使用HP​​ SM中由TIBCO公開的Web服務。從HP Service Manager中調用TIBCO Web服務會導致錯誤

在HP SM中,我們使用名爲wsdl2js的實用程序來使用Web服務,該實用程序使用wsdl url創建JavaScript。我能夠使用wsdl2js但是當我調用Web服務,我能看到越來越形成SM請求XML,但在響應我收到錯誤消息」

Error calling method: doSoapRequest in class:com/hp/ov/sm/server/utility/SoapClient 
Exception(com.sun.xml.messaging.saaj.SOAPExceptionImpl: 
java.security.PirvilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: 
Invalid Content-type:text/html.Is this an error message instead of a SOAP response? 

在WSDL文件中,有以下模式:

<?xml version="1.0" encoding="UTF-8"?> 
<!--Created by TIBCO WSDL--> 
<wsdl:definitions xmlns:ns1="http://www.tibco.com/schemas/TIGIaaS-IP085/WSDL and XSD/Schema.xsd4" xmlns:tns="http://xmlns.example.com/1372306950675/CreateUpdateIncidentImpl/BusinessProcesses/_00-InputChannels" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" name="Untitled" targetNamespace="http://xmlns.example.com/1372306950675/CreateUpdateIncidentImpl/BusinessProcesses/_00-InputChannels"> 
    <wsdl:types> 
     <xs:schema xmlns="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" elementFormDefault="qualified" attributeFormDefault="unqualified"> 
      <xs:element name="HPSM"> 

莫非這個錯誤是因爲它安裝在不同的Unix服務器比TIBCO在SM是無法讀取模式

回答

1

我已經解決了這個問題 問題是與SOAP版本的SOAP。由TIBC提供的wsdl版本O是1.2,HP SM期望1.1

SOAP 1.2支持application/soap + xml,而SOAP 1.1支持text/xml。這就是我得到內容類型錯誤的原因。

相關問題