cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Content Type Text/HTML soap adapter

adnanmaqbool
Contributor
0 Kudos

Dear All

I am using a Java Class to send a SOAP request to PI SOAP Adapter but getting error "Invalid Content Type Text/HTML".

The WSDL file I am using is refreing to external includes for refering data types and messages due to which I created my own data types and message types in mapping.

WSDL file is attached. I think "Invalid Content Type Text/HTML". is appearing due to some thing wrong in Message Mapping, how can I find out exact error or can we creat our own message type instead of using wsdl for this purpose. Is there some way to monitor SOAP adapte other then SXMB_MONI.


<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="Payments" targetNamespace="http://tempuri.org/">
	<wsdl:types>
		<xsd:schema targetNamespace="http://tempuri.org/Imports">
			<xsd:import schemaLocation="http://10.17.188.5//ABL_CTS/Payments.svc?xsd=xsd0" namespace="http://tempuri.org/"/>
			<xsd:import schemaLocation="http://10.17.188.5//ABL_CTS/Payments.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
		</xsd:schema>
	</wsdl:types>
	<wsdl:message name="IPayments_MakePayment_InputMessage">
		<wsdl:part name="parameters" element="tns:MakePayment"/>
	</wsdl:message>
	<wsdl:message name="IPayments_MakePayment_OutputMessage">
		<wsdl:part name="parameters" element="tns:MakePaymentResponse"/>
	</wsdl:message>
	<wsdl:message name="IPayments_StatusInquiry_InputMessage">
		<wsdl:part name="parameters" element="tns:StatusInquiry"/>
	</wsdl:message>
	<wsdl:message name="IPayments_StatusInquiry_OutputMessage">
		<wsdl:part name="parameters" element="tns:StatusInquiryResponse"/>
	</wsdl:message>
	<wsdl:portType name="IPayments">
		<wsdl:operation name="MakePayment">
			<wsdl:input message="tns:IPayments_MakePayment_InputMessage" wsaw:Action="http://tempuri.org/IPayments/MakePayment"/>
			<wsdl:output message="tns:IPayments_MakePayment_OutputMessage" wsaw:Action="http://tempuri.org/IPayments/MakePaymentResponse"/>
		</wsdl:operation>
		<wsdl:operation name="StatusInquiry">
			<wsdl:input message="tns:IPayments_StatusInquiry_InputMessage" wsaw:Action="http://tempuri.org/IPayments/StatusInquiry"/>
			<wsdl:output message="tns:IPayments_StatusInquiry_OutputMessage" wsaw:Action="http://tempuri.org/IPayments/StatusInquiryResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="BasicHttpBinding_IPayments" type="tns:IPayments">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="MakePayment">
			<soap:operation soapAction="http://tempuri.org/IPayments/MakePayment" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="StatusInquiry">
			<soap:operation soapAction="http://tempuri.org/IPayments/StatusInquiry" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="Payments">
		<wsdl:port name="BasicHttpBinding_IPayments" binding="tns:BasicHttpBinding_IPayments">
			<soap:address location="http://10.17.188.5/ABL_CTS/Payments.svc"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>

Edited by: Adnan Maqbool on Dec 19, 2009 8:34 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
how can I find out exact error or can we creat our own message type instead of using wsdl for this purpose.

If it is a SOAP receiver channel, then you cannot create your own DT and MT....you have to use the WSDL provided by the SOAP application.

So instead of using your own DT, use the WSDL and if it is referring any other structures then make sure that the import statement is properly maintained in the main WSDL.

1) Kepp all the files in one folder

2) Open the main WSDL using some tool say StylusStudio.

3) If it opens without any error and all the referenced nodes are seen then its ok.

4) Import all these files under the External definition section of the same namespace.

5) Include it in the MI/ SI.

6) Then test.

As far as your error is concerned....the SOAP message should have the content type as text/ xml ..... others give you an error.....it can be avoided using the MessageTransformBean (provided all other configuration is proper)

Check pt6 under SOAP Receiver Adapter here: /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

Regards,

Abhishek.

adnanmaqbool
Contributor
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

First of all make sure you message interface are having correct message type or wsdl. And then check your Interface mapping if you have chosen the correct message interace in request & response tab.

Probably if you search on sdn with text "Invalid Content Type Text/HTML" then you will get number of threads discussing the same problem.

Regards,

Sarvesh