Message style & attachment
I am able to create a message style service which send a string to MDB. But I could
not find any example or documentation for attachments. Does anybody has any sample
code,pseudo code,any pointers????
If I send a org.w3c.dom.Document object to JMS & my MDB will get an ObjectMessage
object from JMS topic. How do I convert it to org.w3c.dom.Document?
Never did get it working.
Similar Messages
-
Using message-style web service by a Microsoft client
Does anyone have a sample Microsoft client using message-style web service? BEA
does not provide one. I found MS client does not receive messages published between
2 calls to method "receive", while the sample Java client ConsumerClient.java
does.
ConsumerClient.java is like:
while(true){
Object result = method.invoke(null);
sleep(20000); // not in sample, added for my test
System.out.println(result);
My VBScript code is like:
Set SC = CreateObject("MSSOAP.SoapClient")
SC.mssoapinit "http://localhost:7001/msg/Receiver/Receiver.wsdl", "", "", ""
While TRUE
Res = SC.receive
WScript.echo "Res = " & Res
Res = ""
' do something that takes 20 seconds
Wend
I added 20 seconds between calls so I can publish a message between 2 calls. I
found the Java client receives the message but the VBScript client doesn't. Has
anyone else observed this?Hi Kevin,
Thanks for your feedback.
Header support is planed for the next major release.
regards,
-manoj
Kevin Jiang wrote:
Hi Manoj,
Can you use SOAP header to pass session id accross instead of HTTP header? MS
SOAP toolkit 2.0 support access to SOAP header.
My app needs to use topic instead of queue. But as I said earlier, I can use MS
XML toolkit to access HTTP header. So I have a work around.
Thanks for all your responses with regard to this question!
Kevin
manoj cheenath <[email protected]> wrote:
Hum! i thought you were not able to receive message at all. now
i understood the problem. yes we are using http header to pass
session id accross, in the case of web service client who wants
to subscribe to JMS topics. I cant think of any other way to do
this. if you have any suggestions, i very much like to hear it.
for your application is it possible to use queues instead of topics?
we do not use http session information in the case of JMS queues.
-manoj
Kevin Jiang wrote:
Hi Manoj,
Your sample code is basically same as mine. It would also lose messagespublished
between calls to "receive" method.
I figured out what's going on. Undocumented by BEA, the web servicesends JMS
session ID in HTTP header along with first message. When client makessubsequent
calls to "receive", this ID must be sent back. I found this by usinga SOAP trace
tool.
Unfortunately, MS SOAP toolkit doesn't support access to HTTP header.So one has
to use MS XML toolkit to use message-style web service, when writingMS clients.
manoj cheenath <[email protected]> wrote:
an example of using message style web services with
ms soap toolkit is attached. let me know if this works
for you.
regards,
-manoj
Kevin Jiang wrote:
Hi Manoj,
I just changed anyType to string and the problem still happens.
Thanks,
Kevin
manoj cheenath <[email protected]> wrote:
I have not tryed message style web services with MS soap toolkit.
I think the problem is because the WSDL for the message style
web service use xsd:anyType as the return type and MS soap is
not able to understand it. can you pls modify the xsd:anyType to
xsd:string (or someother base type) in the WSDL.
SC.mssoapinit can load wsdl stored as a local file. so it should
be easy to make this change.
regards,
-manoj
Kevin Jiang wrote:
Does anyone have a sample Microsoft client using message-style
web
service? BEA
does not provide one. I found MS client does not receive messages
published
between
2 calls to method "receive", while the sample Java client ConsumerClient.java
does.
ConsumerClient.java is like:
while(true){
Object result = method.invoke(null);
sleep(20000); // not in sample, added for my test
System.out.println(result);
My VBScript code is like:
Set SC = CreateObject("MSSOAP.SoapClient")
SC.mssoapinit "http://localhost:7001/msg/Receiver/Receiver.wsdl",
While TRUE
Res = SC.receive
WScript.echo "Res = " & Res
Res = ""
' do something that takes 20 seconds
Wend
I added 20 seconds between calls so I can publish a message between2 calls. I
found the Java client receives the message but the VBScript clientdoesn't. Has
anyone else observed this? -
'Payload not Serializable' with custom WSDL data types in message-style web service
I'm implementing a message-style web service which publishes to a JMS Queue.
I had the web service built and deployed, but noticed that the "sendRequest" message's
part was of type "xsd:anyType." This is not specific enough for our interface,
since it is externally facing and needs to describe the object we're expecting
on the back end.
So I replaced xsd:anyType with mynamespace:MyType, which is defined as a complex
type in the same WSDL document.
My problem is that when I test the web service with the new WSDL (using the client.jar),
I get a server-side exception from the DestinationSendAdapter.doPost() method.
The exception reads:
javax.servlet.ServletException: Payload not Serializable
at weblogic.soap.server.servlet.DestinationSendAdapter.doPost(DestinationSendAdapter.java:129)
The domain object ('classic' JavaBean) that it should map to on the server side
extends a class that implements Serializable, so it should inherit the trait.
So my questions are:
1) Did I properly go about trying to restrict the object type that gets sent to
my Destination?
2) If no, what is the correct way? If yes, why am I receiving the Payload not
Serializable error if the domain object implements Serializable?
Thanks in advance.Resolved:
Apparently this is the right approach, as it boiled down to a classpath issue
on the client-side. Thanks anyway. -
Message title says it: Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?
I can't find anything in the Knowledge Base that says these two options no longer work or still do.
I do not have a system capable of running Lion, but I need to know the answer nonetheless.Gee, I don't know: "paste attachments mail Lion"? ;-)
One further question, if I may: in Panther (which is where I've aggregated nearly 7 years of mail), if you copy more than one file in the Finder, switch to Mail, and paste the files into a new message, only the file names paste in. If you copy one file and paste it into a Mail message, you get the file, not just the name. Is that still true, or has that (IMHO) bug been fixed since 10.3.9? -
Message driven bean and message style web service
Hi,
I'm trying to deploy a message style web service with a message driven EJB as
the receiver and am getting the following exception:
<Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw an Exception
in onMessage(). The exception was:
java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
public void onMessage(Message message) {
System.out.println("onMessage");
TextMessage textmessage = (TextMessage)message. // It is throwing
the exception on this line --looks pretty normal
Has anyone seen this before? Am I missing something?
Thanks,
TimHi Tim,
I think the problem is that you are assuming that the data type, of the message
argument to the onMessage(Message message) method in your MDB, is of type TextMessage.
I agree that this seems logical, especially since you passed "a string" to the
Message-style Web Service. However, this is not the case, because the WSDL uses
the "xsd:anyType" as the data type for any argument you pass to the send() method
;-) This maps to a java.lang.Object in the WebLogic Web Services implementation,
which is why you get the casting error. Try this instead:
public void onMessage(Message msg)
try
String msgText;
ObjectMessage objMessage = (ObjectMessage)msg;
msgText = (String)objMessage.getObject();
System.out.println("[PostDefaultPayment.onMessage(Message)] msgText=" + msgText);
System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSType()="
+ msg.getJMSType());
System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSCorrelationID()="
+ msg.getJMSCorrelationID());
System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSMessageID()="
+ msg.getJMSMessageID());
catch(Exception e)
e.printStackTrace();
Regards,
Mike Wooten
"Tim Uy" <[email protected]> wrote:
>
Hi,
I'm trying to deploy a message style web service with a message driven
EJB as
the receiver and am getting the following exception:
<Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw
an Exception
in onMessage(). The exception was:
java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
public void onMessage(Message message) {
System.out.println("onMessage");
TextMessage textmessage = (TextMessage)message. // It
is throwing
the exception on this line --looks pretty normal
Has anyone seen this before? Am I missing something?
Thanks,
Tim -
How to get message/rfc822 attachment name by using JavaMail
Hi,
I am fetching incoming mail which has message/rfc822 attachment. i.e: ".msg" (mime message) is attached to this incoming mail. When I try to get name of this message/rfc822 attachment, I am getting null. Body part for this message attachment doesn't contain attachment name? Is this known issue? Is there any solution for this? How to get attached message name?
I am using javax.mail.part.getFileName() for getting bodypart's filename.
Thanks,
ShilpaThis is not unusual. An attached message need not have a filename,
especially if it wasn't stored in a file but rather was just attached to the
new message from within the mailer that composed the new message.
Some mailers will set a filename anyway, but there's no requirement
that they do that. -
J2ME + message style "rpc/encoding"
Hi,
I have a web services with message style "rpc/encoded" and i need consume this web service from a J2ME app. I wrote in the J2ME help that is impossible because it supports the "document/literal" style. How can i call this methods? Is it possible?
Thanks.
BrunoRajesh -
Thanks, that is what I was looking for. Do you know if the sample client
code follows JAX-RPC? Or is this special API developed for Workshop web
services?
Thanks,
Pat
"Rajesh Mirchandani" <[email protected]> wrote in message
news:[email protected]..
If you look into the test view you will find a link for a java proxy(click the
"overview" tab and the the "Java Proxy" tab.). If you copy and paste thatcode
into a java client or a servlet you should be able to invoke the webservice.
>
Let me know if you need an example.
Pat Regan wrote:
It seems to me that, under the hood, a session bean is always the first
component called in a Workshop created web service. If this is the
case,
then would a Java client always use the JAX-RPC api to call it? Evenfor an
asynchronous web service? Does anyone have an example Java Client that
invokes a Workshop created web service?
Thanks,
Pat--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support -
Message style webservice WLS6.1SP5
Hi there,
I have implemented a message style webservice that sends data to a soap client.
In my tests, the java client works fine, but the .NET client looses messages.
On the client side I invoke receive on both clients, but the .NET client seems
to close the connection between subsequent calls and looses the message (This
is my guess because the number of subscribers is increasing with subseq. calls).
What am I missing?
Thanks
JuergI did some more investigation and have analyzed what a .NET clients sends and what
a Java Client sends:
Here are the results:
JAVA CLIENT
=========
POST /WebServices/serverPush HTTP/1.1
SOAPAction: "urn:receive"
Content-Type: text/xml; charset=utf-8
User-Agent: Java1.3.1_01
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-length: 490
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns1:receive xmlns:ns1='urn:serverPushWS'
SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml http://schemas.xmlsoap.org/soap/encoding/'></ns1:receive></SOAP-ENV:Body></SOAP-ENV:Envelope>
JAVA CLIENT HEADER
===============
<HTTPHeaders><authorization>Basic bnVsbDpudWxs</authorization><user-agent>Java1.3.1_01</user-agent><host>localhost:8080</host><accept>text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2</accept><connection>keep-alive</connection></HTTPHeaders>
.NET CLIENT MESSAGE
===============
<?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:local" xmlns:types="urn:local/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<q1:receive xmlns:q1="urn:serverPushWS" />
</soap:Body>
</soap:Envelope>
.NET CLIENT HEADER
==============
- <HTTPHeaders>
<user-agent>Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol
1.0.3705.0)</user-agent>
<content-type>text/xml; charset=utf-8</content-type>
<soapaction>"urn:receive"</soapaction>
<content-length>468</content-length>
<expect>100-continue</expect>
<connection>Keep-Alive</connection>
<host>localhost</host>
</HTTPHeaders>
The only maor difference that I see, is that the Java client also sends a HTTP
header. Could this make the difference?
Please help
Juerg
"Juerg Staub" <[email protected]> wrote:
>
Hi there,
I have implemented a message style webservice that sends data to a soap
client.
In my tests, the java client works fine, but the .NET client looses
messages.
On the client side I invoke receive on both clients, but the .NET client
seems
to close the connection between subsequent calls and looses the message
(This
is my guess because the number of subscribers is increasing with subseq.
calls).
What am I missing?
Thanks
Juerg -
Any sample for Message with Attachment for OC4J-10.1.3?
Does any one know where I can find sample for Message with Attachment for oc4j 10.1.3. ORacle web service site how-to pages has no any sample for this. I saw this a new chapter is added to Oracle Web Service USer Guide, but no sample to test.
Thanks
TZhangDoes any one know where I can find sample for Message with Attachment for oc4j 10.1.3. ORacle web service site how-to pages has no any sample for this. I saw this a new chapter is added to Oracle Web Service USer Guide, but no sample to test.
Thanks
TZhang -
I received an email from a friend with two attached images with "Content-Disposition: inline". When I replied to the message to say "hey, cool," those messages were included in the quoted message and attached and sent with my reply. That really shouldn't be the default behavior, and even if someone thinks it should be, there has to be a way to turn it off, right?
Please tell me how to turn it off.
Google searches turn up posts by frustrated users going all the way back to 2008, and there seems to be no answer better than "manually delete the photos each time".OK, so if a message contains images as part of signatures, it wouldn't necessarily be correct to delete them. So we're left with doing it on a case by case basis.
People who don't like graphic content use plain text; this would automatically dispose of inline graphics content (though not true attachments). -
How can I change the MESSAGE STYLE for messages?
My customer complains about the big "X", as well as he thinks it's an error instead of a just message or note.
so my question is how do i change the message style then?You only get that when you have two or more consecutive messages. Try to avoid that is one option.
You can change the icon if you want. Create another icon, call it stop.ico and put it in the icons directory (as indicated by UI_ICON). However, if you have a STOP alert, the icon changes for that alert too.
Note: this is for Developer 6i. In 9i you cannot use ico files. Use gif files instead and put the image in the image jar file (found in OH/forms90/java directory). Since you see a big X, I believe you are using 6i. -
Example for message-style with Message Driven Bean
hi,
Can i have some examples of webservices message-style with
MDB?....
thanksThe current version of the white-paper that Raffi
refers to covers through 7.0. For 8.1 see also
http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#accessing_foreign_providers
and
http://edocs.bea.com/wls/docs81/jms/j2ee_components.html
these features can often make integration easier.
Tom
Raffi wrote:
> Doug,
>
> You can find very detailed information on this topic at the link below. All
> you need to do is specify the destination-jndi-name, initial-context-factory,
> provider-url, and connection-factory-jndi-name in weblogic-ejb-jar.xml for the
> non-BEA JMS provider for that specific MDB.
>
> ftp://edownload:[email protected]/pub/downloads/jmsproviders.pdf
>
> Hope that helps!
>
> Raffi
>
> Doug Chew <[email protected]> wrote:
>
>>Can someone give me an example on how to setup a message driven bean
>>with a foreign JMS provider using the foreign JMS provider's implementation
>>of a connection factory. i.e. binding the foreign JMS provider's connection
>>factory to the JNDI tree.
>>
>>Thanks
>
>
-
Firefox crashes when printing a Gmail message or attachment
ID: 911954ff-c73d-41fe-bbdb-727902140624
Firefox crashes whenever I try to print a Gmail message or attachment. Within a message, I click the down arrow and select "Print." The usual print dialog box opens, but when I click "Print" here, Firefox crashes completely.
Same thing happens if I click on an attachment and click the "print" icon...or open the attachment in Preview and try to print it.
I'm running up-to-date Firefox 30.0 on Mac OS 10.6.8.Hmm, it started happening again, and this time the suggestions above did not fix the problem. Last time, setting another printer as the default worked.
This time, changing the default printer didn't help. Neither did clicking the "reset Firefox" button.
I also tried shutting down and restarting the Minolta BizHub that I am trying to print to.
I can print fine to another printer.
It worked fine since June 24, my last post. -
Message Style Web Serivce Example
Hi,
Am trying the run the message style web service example that comes along
with weblogic server.
As per the documentation, I created a JMS connection factory and JMS topic,
with the JNDI names
as given in the documentation.
I built the example using ant, and that worked successfully. It created an
ear file, which I deployed successfully
in the weblogic server.
Now when I am testing the example, I run the Consumer client first and then
run the Producer client.
Now the problem is that the message is delivered sometimes and sometimes its
not delivered.
Also when I run more that one instance of Consumer client, the behaviour is
unpredicatable, the message is sometimes
delivered to all consumers, sometimes, to one consumer and sometimes to
none.
I checked the 'Montior JMS Destination' on the weblogic console, and it
shows the correct no of messages,
but it also shows some Bytes Pending.
Am not sure, what could be the reason for this. Can someone please help me
on this.
Thanks
AmitI have an open ticket with BEA regarding this issue. The problem is in that this
type of WS in WebLogic implementation works incorrect with JMS. In particular,
the Servlet generated on the server does not disconnect itself from the JMS. New
client causes a new JMS connection. If you deal with JMS Queue and accidentally
produce more than one "listeners", the JMS decides which listener would be granted
the message. That's why you get messages randomly.
The second problem that I've found is that message-style WS capable to receive
messages that sent only by message-style WS. In my tests, the messages were sent
by regular sender ( see WLS Examples for topic and queue ) while the message-style
WS was the listener, i.e. implemented "receive" method. This WS did not get any
messages sent by regular sender but always got messages sent by another WS ( to
the queue or to the topic, did not matter ).
I've decided to write my own message-style WS instead of BEA's implementation
finally.
-Michael
"Amit" <[email protected]> wrote:
Hi,
Am trying the run the message style web service example that comes along
with weblogic server.
As per the documentation, I created a JMS connection factory and JMS
topic,
with the JNDI names
as given in the documentation.
I built the example using ant, and that worked successfully. It created
an
ear file, which I deployed successfully
in the weblogic server.
Now when I am testing the example, I run the Consumer client first and
then
run the Producer client.
Now the problem is that the message is delivered sometimes and sometimes
its
not delivered.
Also when I run more that one instance of Consumer client, the behaviour
is
unpredicatable, the message is sometimes
delivered to all consumers, sometimes, to one consumer and sometimes
to
none.
I checked the 'Montior JMS Destination' on the weblogic console, and
it
shows the correct no of messages,
but it also shows some Bytes Pending.
Am not sure, what could be the reason for this. Can someone please help
me
on this.
Thanks
Amit -
How to change messaging server attachment quotas
Hi All
We have messaging server version 7.3.currently we are able to send 1MB,But we want to change it to 10MB,where need the chage,please help.
-bash-3.00# ./imsimta version
Sun Java(tm) System Messaging Server 7.3-11.01 64bit (built Sep 1 2009)
libimta.so 7.3-11.01 64bit (built 19:54:45, Sep 1 2009)
Using /opt/sun/comms/messaging64/config/imta.cnf (not compiled)
SunOS mirror 5.10 Generic_141444-09 sun4v sparc SUNW,Sun-Blade-T6320
Regards
Kamalkkdas wrote:
Iam getting this error messages convergence version 1.3 from client machine Iexploere 7,8 Firefox 5.0
Firstly, there is no such version of Convergence. There is Convergence 1 Update 3 (a.k.a. Convergence patch 10). Convergence 1.3 doesn't exist.
You can get the exact version of Convergence by running "./iwcadmin -V" e.g.
-bash-3.00# ./iwcadmin -V
Sun Convergence 1.0-11.01 (built November 2 2009 - 20:48:35) Also there is no such version of Firefox. There is Firefox 3.5, Firefox 3.0 -- there is no Firefox 5.0.
Error
you have not authorized to perform this operation.There is no such error message. The following error message does exist however:
"Error: You are not authorized to perform this operation"
If you expect people to help you in the forums the least you can do is spend the time to provide correct information so we don't waste time searching for non-existent error messages.
Attachment size 3.3MB is ok if i try 4MB getting below this errorIf the attachment size is larger the Messaging Server allows you should get a popup with the message:
"Error: File too large"
What you can try is to increase the Messaging Server service.http.maxmessagesize and service.http.maxpostsize settings e.g.
./configutil -o service.http.maxmessagesize -v "12058624"
./configutil -o service.http.maxpostsize -v "12058624"
./stop-msg http
./start-msg httpRegards,
Shane.
Maybe you are looking for
-
Why do the colours from Adobe Color Theme creation change when I try to use them?
I've been exploring the Adobe Color Theme creator in InDesign. There are the three tabs: Create, Explore, My Themes. In the create tab I can create a theme of colours, get the combination just right, and then save my new theme. However as soon as I
-
Posting of Bank Charges not Possible
Hi Sap Gurus, I have a question/problem regarding the bank statement upload process (TC: FF_5) Maybe someone has a solution for this, orhas the same problem. First we've run the payment run to clear/pay our vendors a) Invoice Posting (40 Expense (De
-
Hi Experts, Am sending alert to external mail ID. Here my req is to send alert to some user as copy(in CC). How to set this? plz help me. Thank you.
-
Last posting run terminated (Restart in period 2010 001)
HI, There is the challenge issue for Depreciation run in AFAB, While running the depreciation for the month of jan month system never allowing to post. After the upload of assets through BDC, this is the first time we are trying to run the depreciat
-
Will Mountain Lion work on my 4 year old iMac with Intel Core 2 Duo processor and a 2.66 gHz. Really do not want to load it and find there are issues. Oh I really not a big tech guy I just want everything to work well. And I'm just about to purchase