从HP Service Manager中调用TIBCO Web服务会导致错误

问题描述:

为了达到集成目的,我们需要使用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是无法读取模式

我已经解决了这个问题 问题是与SOAP版本的SOAP。由TIBC提供的wsdl版本O是1.2,HP SM期望1.1

SOAP 1.2支持application/soap + xml,而SOAP 1.1支持text/xml。这就是我得到内容类型错误的原因。