How to set content type in SOAP AXIS sender adapter
Hi All,
I am trying to fetch the data from an URL which has special characters(like Ä, ï) using SAP PI - SOAP AXIS adapter. I am facing the below error in the channel.
“error during receive: java.io.UnsupportedEncodingException: charset: utf-8”
I need to set the content type as ISO-9958-1 but there is no such option present in the SOAP AXIS sender Adapter. Please let me know if there is any way to set the content type and fetch the data successfully.
Thanks,
Konda
Hi Sudha,
I have tried textcodepageconversion, Message
Transformation and Annomizer beans but didn't help and this error is in sender SOAP AXIS adapter.
Thanks,
Konda
Similar Messages
-
I download itext for convert jsp to PDF. How to set content type for PDF.
I download itext for convert jsp to PDF. How to set content type for PDF. I try
<%@ page contentType = "application/pdf;charset=TIS-620" %>
, but the page does not PDF.
Thank.PDF files are usually binary files, JSPs are not well-suited for binary content.
(If you download the result of your JSP you'll see that it is not a valid PDF file; it will have probably a lot of whitespace and linefeeds, that will choke your PDF reader.). The first few characters must be
"%PDF-" without whitespace.
You can try using PDF files encoded as text - check if you can use text-encoded PDFs in iText.
Try using a Servlet instead. -
How to set content type while sending an email?
Hello,
I want to set content type text/html while send an email using org.apache.commons.httpclient api. I am using MultipartPostMethod method. and i am set using object of multipartpostmethod like post.
and post.setRequestHeader("Content-Type","text/html").
but it wont work.
so please give me a proper solution.
example::
MultipartPostMethod post = new MultipartPostMethod("url");
post.addParameter("msgbody","html message");
post.setRequestHeader("Content-Type","text/html");
Regards,
Bhavesh KharwaActually, I'm writing a "HashMap" from servlet to applet. I have used your suggested content type "application/octet-stream" and another "appication/x-java-serialized-object" to try it. But in applet side, when I use (HashMap)in.readObject(), it always gives me a exception as:"java.util.HashMap; IllegalAccessException". Why?
Thankd. -
Urgent: How to set content type on upload depending on target folder?
Hi,
i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in. All files placed below a certain root directory have to be of my custom content type. All others should be stored as documents of type "Document". Is there an easy way to accomplish this task? I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
Any hints are welcome.
Thanks.Hi,
i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in.All files placed below a certain root directory have to be of my custom content type.
+++ Use an agent to verify the name and extension using the IfsEvent class and EVENTTYPE_CREATEINSTANCE
All others should be stored as documents of type "Document". Is there an easy way to accomplish this task?
+++ Those that aren't your custom content type move to a different folder using the agent.
I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
+++I've found that registering content type only really affects things like how a browser knows what kind of file it's downloading/looking at (mime type) or how a renderer knows how to render it.
Any hints are welcome.
Thanks. -
How to set content type in servlet?
Hi, there,
I'm writing a servlet to use ObjectOutputStream to return an object to applet. How can I set this content type in servlet?
Thanks.Actually, I'm writing a "HashMap" from servlet to applet. I have used your suggested content type "application/octet-stream" and another "appication/x-java-serialized-object" to try it. But in applet side, when I use (HashMap)in.readObject(), it always gives me a exception as:"java.util.HashMap; IllegalAccessException". Why?
Thankd. -
How to set content-type for outbound mail in BCS
Hey everybody,
can anybody please give me a hint how to set the content-type for outbound email in ABAP using BCS to send mail.
By default the content tyoe is set to text/html. I need other.
Best regards
Roman//add related mutip-part to combine parts
MimeMultipart multipart = new MimeMultipart("related");
//attach a pdf
messageBodyPart = new MimeBodyPart();
fds = new FileDataSource("h:/something.pdf");
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setFileName(fds.getName());
multipart.addBodyPart(messageBodyPart);
//add multipart to the message
message.setContent(multipart);
//send message
Transport.send(message); -
How to set Content-Type of attachment?
Does anyone know how I can set the Content-Type of an attachment of an outgoing mail?
I use Apple Mail, and with one correspondent I have this annoying problem that he never receives any excel or word attachments that I send (and possibly other ones, too).
Our support now says that I should try to set the Content-Type
of the excel attachments to "Content-Type: application/vnd.ms-excel".
Apple Mail seems to set it to
"Content-Type: application/octet-stream"
and they think that attachments with this content-type might get blocked by the mail server of my correspondent.
Any suggestions, ideas, etc., will be appreciated.
Best regards,
Gabriel.Thanks a lot for your test.
Unfortunately, I get
Content-Type: application/octet-stream;
when I try to send an excel attachment to myself.
Below is the beginning of the email (in "source" format).
Any ideas why you get the correct mime-type, but I don't?
Regards,
Gabriel.
---------- beginning of email
Return-Path: <[email protected]>
Received: from [80.128.100.143] (account xxxxxxx HELO [192.168.2.100])
by tu-clausthal.de (CommuniGate Pro SMTP 5.2.4)
with ESMTPSA id 35503032 for [email protected]; Mon, 30 Jun 2008 21:59:05 +0200
Message-Id: <[email protected]>
From: Gabriel Zachmann <[email protected]>
To: Gabriel Zachmann <[email protected]>
Content-Type: multipart/signed; boundary=Apple-Mail-13-325543015; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v924)
Subject: test
Date: Mon, 30 Jun 2008 21:59:04 +0200
X-Mailer: Apple Mail (2.924)
--Apple-Mail-13-325543015
Content-Type: multipart/mixed;
boundary=Apple-Mail-12-325542957
--Apple-Mail-12-325542957
Content-Disposition: attachment;
filename="Kostenabfrage AVILUS Gesamtinklusive_TPxyz 080606.xls"
Content-Type: application/octet-stream;
x-mac-creator=5843454C;
x-unix-mode=0644;
x-mac-type=584C5338;
name="Gesamt.xls"
Content-Transfer-Encoding: base64 -
How to set content type for a JSF page
Hi,
I want to know is there any way we can specify the content type of a JSF page, like in JSPs we have the page attribute <%@ page contentType="application/vnd.ms-excel" %>
In JSP we can create a html table with values and if we specify the contenType as application/vnd.ms-excel, we would get an excel file generated.
But do we have something similar to this is JSF, as I am using Facelets I cannot use page directive in the xhtml file.
I tried setting the content type in MangedBean's action as follows
((HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse()).setContentType("application/vnd.ms-excel"); but it did'nt work.
Thanks in advance.//add related mutip-part to combine parts
MimeMultipart multipart = new MimeMultipart("related");
//attach a pdf
messageBodyPart = new MimeBodyPart();
fds = new FileDataSource("h:/something.pdf");
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setFileName(fds.getName());
multipart.addBodyPart(messageBodyPart);
//add multipart to the message
message.setContent(multipart);
//send message
Transport.send(message); -
How to set content type for the attachment?
Hello Everybody,
I was trying to do the following in my send mail program:-
1. I am making a file using FileWriter:
FileWriter fw = new FileWriter(f);
fw.write(str);
2. I now want to attach this file with my mail. but before that I want to set the Content type of this as "application/smil". and trying the following code:
mimebodyparts[0].setContent(fds[0],"application/smil");
As this is a new MIME type perhaps I need to change the mailcap file. I found the same in the activation jar package but thought instead of chagning the default file i tried putting following code in my program:
File capfile = new File("simple.mailcap");
if (!capfile.isFile())
System.out.println("Cannot locate the \"simple.mailcap\" file.");
System.exit(1);
CommandMap.setDefaultCommandMap( new MailcapCommandMap(new FileInputStream(capfile)));
and in simple.mailcap file put the following value
application/smil;; x-java-content-handler=com.sun.mail.handlers.application_smil but I am still getting the following error:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/smil
Can somebody Please help to sort this out.
regards,
Arun//add related mutip-part to combine parts
MimeMultipart multipart = new MimeMultipart("related");
//attach a pdf
messageBodyPart = new MimeBodyPart();
fds = new FileDataSource("h:/something.pdf");
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setFileName(fds.getName());
multipart.addBodyPart(messageBodyPart);
//add multipart to the message
message.setContent(multipart);
//send message
Transport.send(message); -
SOAP AXIS sender adapter response message
Hi all,
In our scenario a 3rd party app. is sending a request to our Sender SOAP Axis adapter. The message contains attachments and uses MTOM features. When receiving I have no problems. BUT when I sent a response I the SOAP AXIS adapter sents the attachmnt I received back.
Why does the AXIS adapter sents a response back with our attachment we received???? Any ideas? I tried to use a custom module to delete that part, but It cannot be edited. The modules input is just our normal message. Afterwards the attachment gets added...
ThanksNot really sure about this, but have you tried to disable the Keep-Attachment option in the adapter (but if you're doing sync Axis comm., I don't think it would work as it would remove attachments when receiving them) ...
Chris -
Content type for soap messages
Hi,
i'm picking up a file via nfs, taking the content of the file and i'm trying to send the content via SOAP to a Webservice. i'm encountering the foloowing error message in the comm. channel monitoring:
SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN
So how/where can i set TEXT/XML in XI 3.0? Or did i made another misconfiguration where i'm not aware of? Any help appreciated.Hi,
thanks for the quick answers.
The Werbservice is MS CRM Dynamics. The "GUI" is still working. so the webservice is active and alive.
I want to query the CRM, so i sent a fetch statement to file, which is being picked up and sent as SOAP message to the webservice.
With point 6 in the mentioned blog the error message in the rwb is gone now, but the message in SXMB_MONI is flagged red and i'm struggling to finfd out what the next error is....may be someone can point out where to look at -
Hi All,
I am getting an error, when I am sending message from few BPM's to a common Webservice Synchronously.
Delivery of the message to the application using connection AFW failed, due to: java.io.IOException: invalid content type for SOAP: TEXT/HTML. Setting message to status failed.
Previously, it was working fine. But today I am getting the errors. Could any one please explain, what exactly the reason is. I searched the Forum, but didnt find a proper resolution. We are sending the same set of data to the Webservice, which we were sending before. Please suggest.
Regards,
SubhenduHi Vijay,
I am wondering,Without this module, how it was working fine for so many days. Could you please throw light?
Regards,
Subhendu -
In HTTP to SOAP scenario. Error i get is "Invalid content type for SOAP"
Hi,
In HTTP to SOAP(synch) scenario. Error i get is <b>"Invalid content type for SOAP"</b>
When pass my data in the HTTP client, I get the following Error.
What may be the cause,How to reslove it.
Response am getting is below............................
Result:
<SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN</SAP:AdditionalText></SAP:Error>hi ,
Just refer following 2 links
Re: Invalid content type for SOAP
Re: invalid content type for SOAP: TEXT/HTML
Regards,
AshwinM
Reward If helpful -
Invalid content type for SOAP: TEXT/HTML
Hi guys,
Im trying to sending a message via sender soap adapter and Im receiving this error:
Exception caught by adapter framework: invalid content type for SOAP: TEXT/HTML
I already have read most off all posts about this error in this forum. So, if I understand, this error means that my receiver soap adapter cant reach the web service provider and an HTTP error notification is sent to calling application. Although, the SOAP adapter doesnt understand this kind of errors (ex. 404 not found -> SOAP call has no error codes and use the HTTP codes for effect) and this happening because the error is in text/html format and SOAP adapter is waiting a response in text/xml.
This is a simple calculator web service that receives two arguments and returns the sum as a result. (Like Siva Maranani weblog /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi )
The web service is published on SAP Enterprise Portal and it works fine.
- The login works fine
User: ex30268
Pwd: 12345678
- We dont have certificates and proxy server.
This is the address in my receiver soap adapter: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
I already checked the settings of my receiver soap adapter and did a little test, enabling the parameter Do Not Use SOAP Envelop only in receiver adapter. And the result is an exception during mapping!!! What is means this error?
Does anybody know how to solve this issue?
Thanks in advance.
Cheers,
Ricardo.Hi all,
Please forgive me for boring you again with this subject, but I havent yet solved this issue, I still receive the following message and Im getting quite worried
>>> Invalid content type for SOAP: TEXT/HTML
Im following Siva Maranani web log (Invoke Webservices using SAPXI) and I will describe the steps that I did:
<b>Integration Repository:</b>
An Inbound synchronous Message Interface (CalculatorWS_IN_MI) using the message types in external definition (WSDL from web service hat I want to invoke).
The other necessary data types (Calc_input_DT has 2 parameters>arg1 and arg2. and Calc_out_DT has 1 param> result) and corresponding Message types.
An Outbound synchronous Message Interface (Calc_OUT_MI) using the message types defined in Integration Directory.
2 Message mappings (request and response) and 1 Interface mapping.
<b>Integration Directory:</b>
A scenario calls WebServices.
2 business services (webservice and webservice_calc).
A Receiver determination with webservice as a sender service (note: this sender is simulated from the WSNavigator from an Enterprise Portal that I have installed locally in my laptop) the interface is (Calc_OUT_MI).
An Interface determination with webservice_calc as a receiver service and the corresponding mapping interface and SOAP receiver channel.
Configurations of SOAP receiver channel:
Target URL: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
User: ex30268
Pwd: 12345678
I have picked only the parameters Use Encoded Headers and Use Query String activated. Im not using any kind of certificates or proxy servers.
A call tentative:
Request
POST /XISOAPAdapter/MessageServlet?channel=:WebService:SOAPSenderChannel&version=3.0&Sender.Service=WebService&Interface=http%3A%2F%2Fswitching%2Fxi%5ECalc_OUT_MI HTTP/1.1
Host: ed19dci1f.appl.edinfor.pt:54900
Content-Type: text/xml; charset="UTF-8"
Connection: close
Cookie: <value is hidden>
Cookie: <value is hidden>
Authorization: <value is hidden>
SOAPAction: "http://sap.com/xi/WebService/soap1.1"
Content-Length: 407
Response
HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/6.40
Content-Type: text/xml; charset=utf-8
Date: Fri, 12 May 2006 08:24:18 GMT
<?xml version='1.0'?>
<!-- see the documentation -->
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
<context>XIAdapter</context>
<code>DeliveryException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:125)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
at com.sap.engine.frame.core.thread.Task.run(Task.java(Compiled Code))
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java(Compiled Code))
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java(Compiled Code))
]]></text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
I think that I have tried everything and read almost of posts, web logs, SDN community contribution and the info in help.sap.com, but Im feeling unable to solve this kind of issue. Im afraid that I was missed something. So thats the reason to describe here all the steps that I have done.
I hope somebody knows how to solve this issue or give me something that can help me find the end of this road
Thanks for all.
Cheers,
Ricardo. -
IOException: invalid content type for SOAP: TEXT/ using Sender SOAP adapter
Hi all,
When I am using Sender SOAP adapter, i am getting (MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System) exception.
From my RWB I can see:
2009-05-25 16:18:39 Information The message was successfully retrieved from the call queue.
2009-05-25 16:18:39 Information The message status was set to DLNG.
2009-05-25 16:18:39 Error Failed to parse the XI system response.
2009-05-25 16:18:39 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System.
2009-05-25 16:18:39 Error The message status was set to FAIL.
2009-05-25 16:18:39 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML
Please help if possible! Thanks!
MayankHi,
Check in SLD your integration engine business system have the following
pipeline url : http://server:httpport/sap/xi/engine?type=entry
check Http port also
After that go to TCODE - SXMB_ADM - integrationn engine configuration and check if your server is configured as HUB with the same url or not.
Thanks
Kasturika Phukan
Maybe you are looking for
-
AppleScript Call Soap Data types
I am using AppleScript to issue SOAP requests via built-in the 'call soap' function. The server to which I am connecting uses both simple and complex data types. It's pretty straight forward issuing the basic parameters for simple data types, but if
-
Hi, i want to know the procedure for background execution for reports with example , Thank u, Regards, Sivaram. Moderator message: please search for available information/documentation. Edited by: Thomas Zloch on Apr 20, 2011 2:26 PM
-
IS Java/ABAP in REd in RWB.
hi @, Our XI host name has been chaged with addition of domain name and afetr that we are nto able to connect and do cache refresh. In cache connectivity test my IS abap/java both are showing RED . My assumption is the URLs are nto correct somewhere
-
How to embed music into adobe muse
I wanna make a website for a musician and I'm wondering how to embed mp3 songs on the website. Thanks
-
Customizing blocking screen by Access Restriction of Linksys router
Hi, I've recently deployed the Access Restriction of my linksys rounter and it works fine. When I try visiting the website which I've set to be blocked, a screen with the message "Website blocked by Linksys Firewall" is shown. May I know how I can c