MDB WebService & SOAP Attachments (SWA or SWAref)
Is it possible to create a MDB that processes messages with MIME content? Using SWA possibly? Anyone know how?
Hi Rahul,
One thing I did not understand is where is your code which is attaching the attachment to the SOAP message.I mean where is the following corresponding part:
1)AttachmentPart attachment = message.createAttachmentPart();
2)String stringContent = "Update address for Sunny Skies " +
"Inc., to 10 Upbeat Street, Pleasant Grove, CA 95439";
attachment.setContent(stringContent, "text/plain");
attachment.setContentId("update_address");
message.addAttachmentPart(attachment);
I have taken the above extract from the Java Webservices Tutorial from Sun, So my understanding says that you have to create the SOAP message and then attach the attachment and then send it the end point using the http protocol.
Regards
Vicky
Similar Messages
-
WLS7 WebServices SOAP with attachments problem
I have implemented a WebService in Weblogic. If I use the standard Sun
JAXM library to invoke the service without any attachments, it works
fine. However, if I use the standard JAXM functionality to add a gif
image to the message, Weblogic throws an exception (attached below)
before it even invokes the handler class for my Web Service.
Basically, the JAXM library does not insert the "start=..." element in
the top level "Content-Type" HTTP header field. Should Weblogic cope
with this, or is it not designed to work with the Sun JAXM library. I
am using the latest version of the Sun WebServices Developers Kit and,
hence, the latest version of the JAXM library. Do BEA recommend a
different client library be used to invoke Weblogic WebServices? If
so which one(s) are supported?
I have another question. Assuming I can find a client which will
deliver to Weblogic an HTTP SOAP mesage that it considers to be valid,
how do attachments get passed to the "component" class? I understand
how I could iterate through the mime segments / attachments from
within the "handler", but I don't understand how / if attachments are
passed onto the actual component class. Reading from the FAQ:
Q. Does WebLogic Server 7.0 support SOAP Messages with Attachments?
A. Yes. As long as the data type of the attachment is on the list of
supported JAX-RPC data types, then WebLogic Server will automatically
handle parameters to Web services that are SOAP attachments. If you
want to do further processing of the attachment, you can use handlers
to intercept the request and response SOAP message (which includes the
attachment.)
I get the impression that attachments are "magically" available to
code within the component, but I don't understand the actual mechanics
of this.
Any thoughts would be gratefully received.
Cheers,
Steve
javax.xml.soap.SOAPException: No start attachment specified in the
Multipart/Rel
ated document
at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
essageImpl.java:174)
at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
java:118)
at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
eFactoryImpl.java:27)
at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
Binding.java:50)
at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
ava:216)
at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
etBase.java:362)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
(WebServiceServlet.java:269)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
a:346)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
eServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
<08-Jan-03 15:22:54 GMT> <Error> <HTTP> <101017>
<[ServletContext(id=2655643,nam
e=mms_service_05.war,context-path=/mms_service_05)] Root cause of
ServletExcepti
on
javax.xml.soap.SOAPException: No start attachment specified in the
Multipart/Rel
ated document
at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
essageImpl.java:174)
at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
java:118)
at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
eFactoryImpl.java:27)
at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
Binding.java:50)
at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
ava:216)
at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
etBase.java:362)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
(WebServiceServlet.java:269)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
a:346)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
eServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
import javax.activation.DataHandler;
public class EchoAttachmentService implements com.bea.jws.WebService
static final long serialVersionUID = 1L;
* @common:operation
* @jws:protocol form-get="false" form-post="false"
public String echoAttachment(DataHandler dh)
return("***Service received DataHandler of type: " + dh.getContentType());
Error Description:
ERROR: EchoAttachment.jws:19: Java type DataHandler is unsupported over a web
service.
SUGGESTION: Use a supported type such as a class with public fields, a JavaBean,
a primitive type, String, BigInteger/BigDecimal, Calendar, GDate/GDuration, QName,
URI, byte[], or an XMLBeans type. -
SOAP Attachments - Streaming interoperability
Hi
I am really interested with Streaming attachments in OC4J.
But I assume it is not interoperable.
When I try to use Streaming for my Web Service, i get an error message that my JAX-RPC handler cannot unmarhall the WS operation (I know weird error).
So it seems that if I want to use Streaming - I have to forget about JAX-RPC handlers (for example logging handler)
Additionally when you open WSDL (of WS + Streaming) file you will see that there is a xml part which is not a WS-I standard:
<sa:stream-attachments xmlns:sa="http://oracle.com/schemas/webservices/streaming-attachments" name="attachments"/>
- and using wsi-test-tools you will get a failure message that it is not
a part of standard namespace: http://schemas.xmlsoap.org/wsdl/soap/
So i guess that client of a Web Service with Streaming must be a JAVA client - and additionally with a usage of oracle WS jar libraries.
So there is a question now, how to enable in OC4J sending big attachments with Interoperability.
I think using AXIS2 module is not an answer, as it also uses JAX-RPC approach based on DOM xml parsers, which means loading whole attachments into memory (no matter if its MTOM, SwA or Base64Encoding).
My question is: IS THERE ANY WAY TO SEND LARGE ATTACHMENTS IN OC4J WITH FULL INTEROPERABILITY (maybe some chunk options)?
Thanks a lot for any answer
JerzyHi, did you ever get a response to your question or figure it out on your own? I'm about to decide the same thing and was trying to find information on large attachments to SOAP messages and whether it's a good idea or not. Specifically, I'm wondering if these large files are read completely into memory at any point or if the API is smart enough to cache...
-
Mapping DataHandler for SOAP attachments
Hi all.
I'm working on a web service that uses SOAP attachments in WebLogic Workshop 8.1,
but I'm having a bit of trouble testing. When I try to access the web service
using the auto-generated client jar provided by workshop, I get the following
error:
java.rmi.RemoteException: web service invoke failed; nested exception is:
javax.xml.soap.SOAPException: failed to serialize xml:weblogic.xml.sche
ma.binding.SerializationException: mapping lookup failure. class=class javax.act
ivation.DataHandler class context=TypedClassContext{schemaType=['http://www.w3.o
rg/2001/XMLSchema']:base64Binary}
I was under the impression that the DataHandler mapping was handled by BEA. Must
I manually map the type in order to use SOAP attachments, or am I missing another
vital step?
I've attached the WSDL file for this service. Thanks.
-Brian
[WS_Import.wsdl]Hi Brian,
I just created a .jws, client jar and standalone JAX-RPC static stub client, using
the WSDL you attached. Everything seems to work in WLS 8.1 SP2. Is this the version
you're using? I have attached a zip containing the static JAX-RPC static stub
client, and the .jws. To test it in the WLW IDE, you'll need to create the following
directories, in the WebLogic Server domain directory you use for WLW:
DCTMWebServices/attachments
The client just sends the certificate.war file, in the DataHandler dhContent argument.
This file is located in the domain directory, you use for WLW. The .jws saves
the attachment into the DCTMWebServices/attachments directory.
Here's the command line I use to run the standalone client:
c:\bea\home1\jdk141_05\jre\bin\java -classpath classes;lib\WS_Import.jar;C:\bea\home1\weblogic\platform81sp2\server\lib\webserviceclient+ssl.jar
-Dweblogic.webservice.verbose=true -Dweblogic.webservice.binding.verbose=true
DTCMWebServices.consumers.standalone.stub.WLWClient 2>stderr.out>stdout.out
Regards,
Mike Wooten
"Brian McLoughlin" <[email protected]> wrote:
>
>
>
Hi all.
I'm working on a web service that uses SOAP attachments in WebLogic Workshop
8.1,
but I'm having a bit of trouble testing. When I try to access the web
service
using the auto-generated client jar provided by workshop, I get the following
error:
java.rmi.RemoteException: web service invoke failed; nested exception
is:
javax.xml.soap.SOAPException: failed to serialize xml:weblogic.xml.sche
ma.binding.SerializationException: mapping lookup failure. class=class
javax.act
ivation.DataHandler class context=TypedClassContext{schemaType=['http://www.w3.o
rg/2001/XMLSchema']:base64Binary}
I was under the impression that the DataHandler mapping was handled by
BEA. Must
I manually map the type in order to use SOAP attachments, or am I missing
another
vital step?
I've attached the WSDL file for this service. Thanks.
-Brian[brian2.zip] -
SOAP attachments :: Error while downloading attachments more than 10MB
Hi,
We are getting the below error when downloading the attachments of size > 10mb.
Client details:
Java version: 1.6.0_05
OS: SunOS
OS version: 5.10
OS architecture: sparc
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2786)
at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:133)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.readFully(HttpSOAPConnection.java:636)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:379)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:169)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:140)
at com.sun.sunit.webservice.soap.SOAPClient.invokeService(SOAPClient.java:94)
at com.sun.sunit.webservice.soap.SOAPClient.invokeService(SOAPClient.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.sunit.util.MethodUtil.invokeMethod(MethodUtil.java:74)
at com.sun.sunit.util.MethodUtil.invokeMethod(MethodUtil.java:38)
at java.lang.Thread.run(Thread.java:619)
Download of large attachments used to work when code is 1.4.2 compiled and SAAJ is 1.2
We have upgraded the code to 1.5 and using SAAJ 1.3 now.
We are unable to download attachments > 10MB.
Please let us know if we need to do any changes at SAAJ to fix this error ?
Note : This message has been posted accidentally in Java Servlet and hence re-posting.
Thanks.RaghuNaveen wrote:
Download of large attachments used to work when code is 1.4.2 compiled and SAAJ is 1.2
We have upgraded the code to 1.5 and using SAAJ 1.3 now.So, this problem is actually caused by SAAJ 1.3 or possibly Java 1.5?
Try downgrading to SAAJ 1.2 first. If that doesn't help, then is it probably a bug in Java 1.5. But according to the stacktrace, I rather think it's a bug in SAAJ 1.3 (as mentioned in the previous topic). -
2 questions really:
1) Is there a way to define soap attachments in a WSDL? How? Can I just use wsdlc then?
2) Is there a way to access SOAP attachments if the WSDL doesn't describe them? Would I do this via a SOAP handler? Or is there another way?Hi,
can you check the wsdlLocation attribute of the @WebService annotation in your ejb endpoint impl, its name should be same with the wsdl in the EJB-JAR.
alternatively, you can modify the wsdl name in jar:/META-INF/wsdls/XXX.wsdl to allow it same with the attribute.
HTH,
Kevin -
File(PDF as attachment)-- XI-- WebService(SOAP with attachment)
Hi i have following Scenerio in my hand,
File>XI>WebService(SOAP)
Kindly help me in implementing the Following Scenerio;
I need to attach PDF to File Adapter as PayLoad or give it to File Adapter as Attachment which in turn send this data to XI and then XI wud generate WebService having this PDF as attachment.
Kindly Walk me thru all the steps during Configuration and design and do guide me how to test wether this scenerio works or not.
Also tell me abt the WebService i need to use to test the Scenerio.
Thanks.Hi Jeet,
If you want your file adapter to read contents from a PDF file, check out the folloing blog,
<a href="/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter">Sender File Adapter with PDF</a>
If you want your file adapter to generate its output into a PDF file, then check the following blog,
<a href="/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter">Receiver File Adapter With PDF</a>
Sriram's blog on FILE to HTTP scenario might of be help to you too. It also deals with Syn / Async Bridge which can be ignored.
<a href="/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi">File to HTTP</a>
Do let us know if you need any further help,
regards,
Bhavesh -
How to deal with SOAP attachments?
Is there any information available on how to work with SOAP attachments? I am looking
for a feature similar to what is available in other products where you can take a
byte[] and map to image/jpg, application/octet-stream, etc... and have the tool create
the appropriate message formats. How would I do this using WL Workshop? I could
not find anything in the docs... is this supported?
Thanks,
BobEasiest thing is to encode the contents of the binary object in the XML
message as you suggest.
I'd like to hear more about what you are trying to do as well -- we're
planning on adding support for attachments in the next release, and I'd like
to make sure we do it in a way that meets your needs.
-C
"Bob Hayden" <[email protected]> wrote in message
news:[email protected]...
>
I am evaluating the capability of returning and consuming image/fileattachments through
a web service. This is one of our high priority integration requirementsand must
be available somehow through the framework we choose. Other productshave ways
to do this through an IDE... if WorkShop is not going to directly supportthis then
does anyone have any suggestions or examples on how this can be done in away that
is still intuitive for a WorkShop user (in other words without rolling upyour sleeves
and digging into JAX-RPC)? I suppose one could base64 it and add it tothe WorkShop-generated
message as a String using the return XML map, but I would prefer toinvestigate a
more standards-based approach.
Is it just me or does the lack of support for SOAP attachments seem to bea serious
missing piece from WL Workshop?
-Bob
"Raj Alagumalai" <[email protected]> wrote:
Bob,
WebLogic Workshop does not currently support SOAP attachments. However,
please note
that if you are developing your Web services using the APIs and services
provided
by J2EE and WebLogic Server directly, WebLogic Server does support SOAP
attachments.
Please refer to the following document for more Workshop FAQ's
http://dev2dev.bea.com/resourcelibrary/faqdetail.jsp?productType=weblogic+w
orkshop&highlight=faq
>>
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Bob Hayden" <[email protected]> wrote:
Is there any information available on how to work with SOAP attachments?
I am looking
for a feature similar to what is available in other products where youcan
take a
byte[] and map to image/jpg, application/octet-stream, etc... and havethe
tool create
the appropriate message formats. How would I do this using WL Workshop?
I could
not find anything in the docs... is this supported?
Thanks,
Bob -
How to pass SOAP Attachments with JAX-RPC Web Service
I'm confused...
This sample shows how to send/receive SOAP attachments by using the JAX-RPC Handler mechanism. Can somebody confirm if this is the preferred way to do this. I've seen an example wich does something like:
public interface AttachmentService extends Remote {
public String storeDocumentService(javax.activation.DataHandler dh, String filename) throws RemoteException;
}and then uses JAX-RPC utilities to create wsdl, stubs and stuff. Does this have the same result, as what the OTN example shows (from an architecture perspective?
Thx,
Jan.Well, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method. -
I have to implement a File Transfer Service from one application to the other application. Initially I thought to do it with socket programming. In that case I have to take care of all the details. Then I decided to use SOAP-attachments to transfer the files. I want to send the files as the attachments to a SOAP message, so that I need not do the low level stuff. But, I am not sure which is the best solution. The files which I send are very big like 10MB or 20MB. Is it good to send them as an attachments to SOAPMessage(Using JAXM) or to go for socket programming. Does JAXM support transfer of big files? Or, if you know any other better solution for transfer of files from application to application please suggest me.
Seenu.Hi, did you ever get a response to your question or figure it out on your own? I'm about to decide the same thing and was trying to find information on large attachments to SOAP messages and whether it's a good idea or not. Specifically, I'm wondering if these large files are read completely into memory at any point or if the API is smart enough to cache...
-
Retriving .doc and .rtf files in soap attachments
Please help me
I'm using JAXM to retrive soap attachments
When i retrive txt files (.txt) it retrivs the content of the document
without any problem but when i try to retrive .doc or rtf
it gives content as
java.io.FileInputStream@587c94
(retrive attached files which are recived from client)
how do i get the content from word or rtf document
this is the way i tried to get the content
while (it.hasNext()) {
AttachmentPart ap = (AttachmentPart)it.next();
contentType = ap.getContentType();
content =(String)ap.getContent();
p.println("content---->"+content);//wrriting to text file
System.out.println("*** attachment content: " + content);
thanks namsHere is the code I used to send and receive a PDF file as a SOAP attachment. Note that if the sender uses a DataHandler for the attachment's content, there's no need to set the MIME type explicitly because the DataHandler does it for you.
* Sender
// create the data source and data handler
DataSource source = new FileDataSource("form.pdf");
DataHandler handler = new DataHandler(source);
// create attachment for message
AttachmentPart attachment = message.createAttachmentPart(handler);
// set content id (optional)
attachment.setContentId("enrollment_form");
// add attachment to message
message.addAttachmentPart(attachment);
// send message
providerConnection.send(message);
* Recipient
public class Receiver extends JAXMServlet implements OnewayListener {
public void onMessage(SOAPMessage message) {
// get attachment
Iterator it = message.getAttachments();
AttachmentPart attachment = (AttachmentPart) it.next();
if (attachment.getContentType().equals("application/pdf")) {
// read contents into byte buffer
ByteArrayInputStream contentStream =
(ByteArrayInputStream)attachment.getContent();
// use standard Java I/O methods to save in file
int bytesToRead = contentStream.available();
byte[] buffer = new byte[bytesToRead];
contentStream.read(buffer);
// write buffer to new file
FileOutputStream file = new FileOutputStream("form.pdf");
file.write(buffer);
file.close();
log("Attachment " + attachment.getContentId() + " with type "
+ attachment.getContentType() + " written to form.pdf");
else {
log("attachment content has MIME type " + attachment.getContentType()
+ ", Java type " + attachment.getContent().getClass());
} -
R3 (rfc-sender) - XI - Webservice ( soap-receiver)
Hi,
I am getting below error whenever webservice(target system) is unavailable.
HTTP 404 Not Found
Then RFC got failed in R3, due to this error in XI
R3 (rfc-sender) <-> XI <-> Webservice ( soap-receiver) Synch
User will enter the request data in R3 and waiting for the response, but webservice is down(i.e not available)
Request is reached to XI box and XI is trying to send data when webservice is down( i,e not available), RFC is waiting for the response from XI box.
how we will handle this kind of situation,how should i give response back to RFC( because RFC sent the request and waiting for the response, XI could not send any response back as Webservce is down, Please advice me how should XI inform to the end user r R3 abt webservice.
I am getting this error to my mail box as i have configured ALERTS. i do not want to change existing RFC.
is there any chance to send response to R3 even webservice is down, please can any one suggest.
Thanks,
SIva
Edited by: Siva Grandhi on Jun 18, 2008 1:12 PMHi siva,
check this blog on HTTP errors.
/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
May be the URL you have given in SOAP at receiver adapter is wrong.Check that once.
Error: 404 Not Found
Description: The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
Possible Tips:- for HTTP_RESP_STATUS_CODE_NOT_OK 404
u2022 404 is an HTTP response code that indicates that the resource in question couldn't be found. Usually this is due to an incorrect URL, so it is better to cross check all URLs. Check pipeline URL in the SLD in the business system of the Integration Server For this go to SLD->Business System-><yourIntegrtaion Server>->Pipeline URL: It should be like this http://<host>:<port>/sap/xi/engine?type=entry Where host is the host name of the Integration Server and port is the HTTP(8xxx) port. To verify this in Integration Server you can do like this. Go to SXMB_ADM->Integration Engine Configuration->Choose Edit from Menu -> Change Global Configuration Data to switch to change mode. Then select System Landscape - Load Configuration. (This is not required always)
u2022 Check that the port really is the ICM HTTP Port and not the J2EE port i.e SMICM then menu GOTO --> SERVICES and check the port number for HTTP. It should be HTTP port
u2022 If the error is Page cannot be displayed, cannot find server in https configurations Check and correct the SSL configuration for the ABAP and the J2EE side of the system
u2022 If the error is because of integration server when using Proxy communications then check these. i.e SXMB_ADM->Integration Engine Configuration->Corresponding Integration Server enrty should be dest://<Http Integration server-Destination> Where < Http Integration server -Destination > is the RFC destination (SM59) of type HTTP connection (type H) to the Integration Server. In this case, host name, port, and path prefix are saved in the RFC destination.
Thanks,
Vijaya. -
R3 (rfc-sender) - XI - Webservice ( soap-recever) Synch : error handlng
R3 (rfc-sender) <-> XI <-> Webservice ( soap-receiver) Synch
User will enter the request data in R3 and waiting for the response, but webservice is down(i.e not available)
Request is reached to XI box and XI is trying to send data when webservice is down( i,e not available), RFC is waiting for the response from XI box.
how we will handle this kind of situation,how should i give response back to RFC( because RFC sent the request and waiting for the response, XI could not send any response back as Webservce is down, Please advice me how should XI inform to the end user r R3 abt webservice down.
Pleae help me out on this.
Thanks,
Dhanush.Hi,
Normally, the Web service should provide a fault message back to XI and the RFC should also have an exception defined that will trigger a fault message mapping and that way the application error is sent back to R3.
But if the web service does not provide u with a fault message then XI will trigger the System Error back to R3.
The functionality of checking the DB status and propagating meaningful errors to XI as fault messages should lie with the web service.
Thanks
Vikranth -
i have writen a code to send soap attachments from client to server
In the code below i 'm sending txt file and xml file from client to server
when i see the value of msg.countAttachments();it 's value is 2 that mean two attachments are reciving with ut no problem
now i want to save both attachments in servermachine c:/ directory how do i di that
i tried to access the attachment like this
java.util.Iterator it = msg.getAttachments();
while (it.hasNext()) {
AttachmentPart attachment = (AttachmentPart)it.next();
Object content = attachment.getContent();
for more clear below -client code attaching part
FileDataSource fds = new FileDataSource(m_attachment);
DataHandler dh = new DataHandler(fds);
AttachmentPart ap1 = msg.createAttachmentPart(dh);
msg.addAttachmentPart(ap1);
AttachmentPart ap2 = msg.createAttachmentPart("Another Part","text/plain; charset=ISO-8859-1");
msg.addAttachmentPart(ap2);
msg.saveChanges();
//create the endpoint and send the message
URL endpoint = new URL("http://localhost:8080/jaxm-coffee-supplier/getPriceList");
SOAPMessage response = con.call(msg, endpoint);
ThanksHello!
I'm sure you already solved the problem you had and I hope you can help me out with my little problem. I want to create a file upload with a web service. I copied the code from sun's tutorial (and now from your post), but I constantly get the NullPointerException on the call:
AttachmentPart attachment = msg.createAttachmentPart()
(or AttachmentPart attachment = msg.createAttachmentPart(dataHandler);)
Can you please tell me what's wrong with my code?
Thnx in advanced, D
(BTW here is my code:)
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPMessage;
public class client01 {
public static void main(String args[]) throws Exception, MalformedURLException {
MessageFactory factory = MessageFactory.newInstance();
Message msg = factory.createMessage();
ConnectionFactory soapConnectionFactory = ConnectionFactory.newInstance();
Connection con = soapConnectionFactory.createConnection();
FileDataSource fds = new
FileDataSource("C:"+File.separator+"image"+File.separator+"test01.jpg");
DataHandler dh = new DataHandler(fds);
AttachmentPart attachment = msg.createAttachmentPart(dh);
(Here I get the Fatal server Error => NullPointerException)
attachment.setContentId("attached_image");
msg.addAttachmentPart(attachment);
msg.saveChanges();
URL endpoint = new
URL("http://localhost:9090/RKO/services/zmogljivost?method=stevilo&str=test");
SOAPMessage response = con.call(msg, endpoint);
con.close(); -
Hi,
late but hopefully not to late i do my first steps into the world of webservices.
Since we use JDEV 9.0.4 in prodution i started with this version of JDEV.
There it is possible to generate two kind of Webservices, soap and j2ee.
In version 10.1.3 there is only one left.
May someone could explain the reason to me please (and perhaps the differences)?
Thanks and regards,
ChrisIn 10.1.3 we use the standard J2EE way of working with Web Services (JAX-RPC) in older versions of JDeveloper we also supported an Oracle specific way - which was there before the industry standard appeared.
Maybe you are looking for
-
My 13inch Macbook Pro 2012 model randomly forced me to restart (OS X Lion). Is this something to be concerned about?
-
View of Cheque format n Payment advice Note
HI, Is there any t.code to see the payment advice note and Cheque format in APP Configuration . Other than OBVU from where actually the forms are selected in APP Config. For Payment method for Company Code Transaction. Becoz Abaper is asking where ex
-
Service contracts expiry notification !
Hi all, need to know whether any setups has to be made for notifcation of contracts (when the contracts are 10 days ahead ) to expire the notification shld start firing for multiple contacts say contract manager , contract approver & ceo of the compa
-
Best file formats for graphics and photos for iWeb
What is the best format to transfer files from PDF's, JPEGS, Illustrator CS3 & InDesign for best resolution display in iWeb
-
Cannot create MIGO - Error message No. ME573
Dear Expert, I cannot create good receipt for material import , there is an error mesage "transaction cannot be posted due to errors in price determination For [x] error during maintain of delivery cost in master condition. delivery cost conditions