SOAP - PI - SOAP with Attachments
Hello Experts
I have a scenario, where I send a DocumentName in a request to PI. PI makes a webservice call, retrieves the document (.pdf) and sends it back to requester. I just wanted to confirm, if I should be using Java Mapping anywhere to read the .pdf file before sending it to requester?
Also, would using a HTTP GET or a REST adapter be a good idea?
Any pointers would be greatly appreciated.
Thanks
Jaya
Hello,
>>PI makes a webservice call, retrieves the document (.pdf) and sends it back to requester
How WS is sending pdf file? as an attachment?
>>I just wanted to confirm, if I should be using Java Mapping anywhere to read the .pdf file before sending it to requester?
I think while sending response to sender system either using JM or UDF u can read that pdf attachment (coming from receiver system) and set the same in ur response (never tried in sync scenarios but i think it will work).
@Hareesh,
I don't think Jaya can use ur approach, becoz Michal's bog clearly mentioned that this kind of approach will be helpful in case of u have static request and i believe document number is dynamic. In addition to that, i am not sure how above approach can be implemented on a receiver side?
Thanks
Amit Srivastava
Similar Messages
-
SOAP Receiver adapter with attachments not working
Hello,
I have a simple synchronous scenario like this; ABAP proxy with attachments to SOAP with attachments.
The SOAP receiver adapter has been configured with the parameters 'Do not Use SOAP envelope' and 'Keep attachments'. We create our own SOAP envelope with custom SOAP headers, so that's the reason for the 'Do not use SOAP envelope' setting.
When we test the scenario with an attachment then we get a timeout from PI. However, when we test the same scenario without any attachment then no errors occur.
The external webservice has also been tested with SOAP UI and it works fine.
Do you have any clues what the problem can be? What are we still missing in the configuration?
We did try with the adapter modules such as PayloadSwapBean and the Message TransformBean, so far without success...
Many thanks.
RobertoHi Stefan,
The attachments are not really big, around 150KB.
According to the other party (Oracle Service Bus) no messages with attachments have been received. In fact it seems like those messages never leave the PI server. SOAP requests without attachments are processed successfully.
Thanks
Roberto -
How to create Inbound SOAP With Attachments
Hi All,
Does someone know how to create an Inbound SOAP Message (from SAP XI to a Business System) with attachments?
We get an Idoc from a SAP R/3 system and transform this Idoc to an other XML format messages, but we want this message as an attachment and not as the payload in the SOAP Envelope.
We tried the PayloadSwapBean module, but we don't have an attachment to swap with, but maybe we used the wrong paramaters.
Thanks,
FrankHi Stefan,
Does this quick response mean I challenged you?
Our scenario is that we send an IDoc (ORDERS05) from our R/3-backend-system to XI (3.0/SP15). In an integration process (A/S-bridge) we transform this IDoc to an UBL-Order XML-message, and we want to send this XML-message as an attachment to a (synchronous) SOAP-call to a vendor. Like I said, despite the SAPHelp-content, we don't get this working. Whatever we try, the UBL-Ordermessage is contained in the SOAP-body.
What makes it even more strange, is that XI itself is based on the SOAP-with-attachments-standard...
So, any help is much appreciated!
Regards, Fred -
How to send a SOAP message with attachments
How to send a SOAP message with attachments thru webservice using axis-1_3 can any one sujjest.............................
Please refer
http://www.javaworld.com/javaworld/jw-09-2003/jw-0912-webservices.html
http://xml.sys-con.com/read/40315.htm -
How to send SOAP Message with attachments?
Hi All,
I am working on a SOAP to RFC Scenario With specific requirement of handling the attachment(Mainly Excel Attachments) at the Sender SOAP Adapter.
Kindly Suggest.
I found lot of theoritical stuff but no practical scenario.
Regards,
SachiHi Sachi,
To handle attachment in SOAP sender adapter first of all you will have to use the AXIS message protocol.
Then by using MessageTransformBean you can handle the attachment.
1) Check this link for the module processing sequence used to get the attachment from SOAP
SOAP Axis sender with CSV file attachment
2) Check this blog which will help you on the usage of MessageTransformBean
Solve Key Field Problem using StructPlain2XML in MessageTransformationBean!!
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
using MessageTransformBean you can handle only the text file attachments like comma separated file, pipe separated, fixed lengths etc. But if you are looking to handle a excel file you will have to use a java mapping to get the data from excel attached file. for this have a look at this following blog by Shabarish:
Excel Files - How to handle them in SAP XI/PI (The Alternatives)
Do remember to use SOAP Axis adapter and to tick the keep attachment option.
Hope this helps.
Regards,
Aravind -
Binary Attachments - MTOM vs. SOAP with Attachments
Hello everybody,
i am kind of stuck by implementing a soap to proxy scenario! I wanted to use MTOM to transfer the messages together with the attachments, but until now i couldn't find out if this is possible at all using the ws-adapter with backend proxy (version 701)!
I have seen this already:
http://help.sap.com/saphelp_nwpi711/helpdata/de/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
unfortunately im not a abap coder, but i can see using attachments in proxys should work!
But how? Am i forced to used soap with attachments on sending webservice? If yes, have you got an example for me?
I would appreciate any help!
Thanks in advance,
MarkusHi Amar,
thanks for your reply, i know the mtom theory, but i don't know how to do it with sap pi on proxy side!
(By the way, your link throws a 404!)
Using soap adapter with enabled "keep Attachments" option, the MTOM-Attachment is getting processed, but on proxy side, using soap adapter (keeping attachments) to call proxy, it crashes on the backend side (version 701).
I tried to make a webservice out of the proxy in soamanager, but i didn't get this working, as i have never done this. Also i didn't find an option for mtom in soamanager. I am also wondering why mtom is only supported in ws-adapter 7.10 but not in 7.11, why is this? And is it possible to use soap-adapter on OB-side and WS-Adapter on IB-side, or can i only use ws-adapter for direct communication?
Lot's of questions i am facing ;-)...
Kind regards,
Markus -
SOAP with attachments, attachment streaming
Hello all,
We are currently in the process of designing an integration service that uses web services (SOAP) as the means of communication.
There are very large binary attachments included with these SOAP messages. MTOM ja SAAJ are to be used (propably CXF).
However, as these attachments are very large (100MB), I would like to stream the attachments "through" the integration server.
Is this possible? Can I somehow stream the SOAP attachment from the source system directly into the target without saving it as a whole into the integrating server application?
Thank you for all your help! All solution suggestions are apprechiated :-)Hi Aalap,
In version 1 of WebLogic Workshop SOAP attachments are not supported.
Attachments will be supported in the next version. If support for SOAP
attachment is an important requirement for you application, you can use
WebLogic Web Services which supports SOAP Attachments.
Please refer to the following document for more information on this
http://e-docs.bea.com/wls/docs70/webserv/index.html
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Aalap" <[email protected]> wrote in message
news:3da1ebc4$[email protected]..
>
>
Hi,
Does Workshop support SOAP with Attachments? I am writing a web servicewhich
serves files (like MS-Word documents etc) to clients upon receiving theirrequest.
So what are the various options for sending the file to the client?
Please help.
Thanks in advance.
Regards,
Aalap Parikh. -
Web Service with attachments (SOAP with attachments) without PI
Hi,
Is it possible to send across file(say PDF) using ABAP web services. I know it can be done with Java using SOAP with attachments. Is something similar available for ABAP ? since if we transfer raw binary data as type string / xstring it may have a performance impact.
I could not see any option for attachments when using web service wizard from SE37 / soamanager
Note I am not using PI, this Web service would be consumed by a 3rd party tool. There is very little material available on transferring files using web service with SOAP attachments.
Regards,
AdityaHi thanks for your input, but did you have to encode your binary data stream in say Base64 / utf-8 ? Also if you are transferring files in bulk(say 10 -100 files) how does your web service indicate end of one file or what is the best way so as to avoid performance problems.
Regards,
Aditya -
Streaming soap with attachments
dear all
this might be a piece of cake for some of you out there but it is causing me a lot of stress given the fact that there is not enogh documentation out there regarding this topic
I am writing a web service that uses soap with attachments to send a large streaming data,
The concept works quite well but when I started to test it I got this problem.
When my client program calls a method that should return a real time data the streaming starts after 10 seconds
How can I avoid the fact that the message calls waits that long before the data starts streaming in?
To be more specific
I have a method that returns a streaming data in 10 seconds [getSteamingData(long seconds)]
I would like to test if I already get some data steaming in after one second of it starts.
To do so I started a thread that checks the OutputSteam size every 1 second and then compare the result with the previous size say a second ago, there should be an increase in size each second!!!
But when I start the thread? the streaming does not start right away instead, it starts after 10 seconds causing the thread to return null size
In real life with real large streaming data that 10 seconds could be 10 hours or God forbidden 10 years
Is there a way around or is that not possible in SwA?
Anybody have any idea
thanks in advanceHi Aalap,
In version 1 of WebLogic Workshop SOAP attachments are not supported.
Attachments will be supported in the next version. If support for SOAP
attachment is an important requirement for you application, you can use
WebLogic Web Services which supports SOAP Attachments.
Please refer to the following document for more information on this
http://e-docs.bea.com/wls/docs70/webserv/index.html
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Aalap" <[email protected]> wrote in message
news:3da1ebc4$[email protected]..
>
>
Hi,
Does Workshop support SOAP with Attachments? I am writing a web servicewhich
serves files (like MS-Word documents etc) to clients upon receiving theirrequest.
So what are the various options for sending the file to the client?
Please help.
Thanks in advance.
Regards,
Aalap Parikh. -
Can Oracle BPEL handle Doc/Lit SOAP with Attachments?
I have successfully followed the instructions for using Oracle BPEL 10.1.3.4 to handle SOAP With Attachments with an RPC-style WSDL, detailed here:
http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/manipdoc.htm#sthref955
I have a simple Echo service that receives and attachment and responds with the same attachment.
I actually would like to accomplish the same thing using a Doc/Literal Wrapped WSDL. My initial testing shows that BPEL can indeed receive the attachment ( I can see it in the dehydration store), but it is not added to the response.
Is this possible using Doc/Lit with SwA in BPEL 10.1.3.4?As I've investigated the issue some more, I've found that the real issue is receiving an attachment on the SOAP response from the BPEL process. Using a Doc/Lit-Wrapped WSDL, I can receive a request with an attachment, and add it to outgoing requests successfully. But when I do a straight copy from the request message to the response message (Echo Service), the response contains the correct "href" attribute but there is no attachment, and moreover, no MIME multipart message is returned.
NOTE: I was successful in using an RPC/Literal WSDL to accomplish the successful echo of the attachment.
Also, when looking in the OPMN logs, I see the following line for the RPC-based BPEL process, but not for the Doc/Lit:
<2009-11-23 13:43:35,684> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc2
<2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine.data> <ConnectionFactory::getConnection> GOT CONNECTION 1 Autocommit = false
<2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc1
and the "binary location" value corresponds with the "href" attribute seen in the BPEL audit logs. -
HTTPS or SOAP with attachments as text files
Hi ,
I it possible to receive or send text files using SOAP with attachments or HTTPS with attachments?
Best Regards,
Harleen Kaur ChadhaHello Harleen,
Check the following links, where you can send the text files as attachments.
Sending Text file without mapping using SOAP
/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
Regards..
Krishna.. -
BPEL 11g SOAP with Attachments
Does anyone have any examples utilizing SOAP with Attachments with BPEL 11g?
I have previously worked with SwA in BPEL 10g, but I have not been able to successfully port my BPEL projects to 11g. I am able to send in an attachment without error, but the outgoing requests and/or responses do not contain the attachment as they should.
Note: I am trying to use traditional SOAP with Attachments (hrefs) and not MTOMHi ,
Even we too have same requirement where soap with attachment (swa) has to pass through bpel process(11g).You hava mentioned that ur able to attach file to req..please can u share your sample for reference.
Thanks for suggestions. -
Query on SOAP with attachments with Weblogic
Hi all,
I'm new to webservice and workshop, and I have to develop a webservice using bea workshop to be able to process multiple files and store it on a document server. I suppose that the webservice clients will be able to formulate their request in the form of SOAP messages with attachments(documents to be stored), but I'm not sure whether this is the best method and weblogic(8.1) supports it.
Currently I have created a jws file which has successfully connected and been authenticated by the Document server, so for my next step, I'm trying to create a new file in the document server but I'm stuck at trying to write code to get attachment from the SOAP message in the jws file. Can anyone enlighten me?
Thanks!Hi
WebLogic Workshop web services can exchange one or more SOAP attachments.
There is a sample and information on how to do that under the link
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/getstarted/conUsingSOAPAttachments.html
Thanks
Vimala -
Does Workshop deal with SOAP Messages with Attachments
I try to send back an image from my web service. Is there a way to make a SOAP Messages
with Attachments using BEA Workshop?
Thanks,
Jerome.Hi Jerome,
I'm pretty sure that Workshop doesn't support SwA (SOAP with Attachments) yet. The
product manager says that it is being considered for a future version, though :-)
In the meantime, I don't see any reason why you can't just use a Java class that
uses the JavaMail API to construct a Multipart MIME message. The MimeMultipart class
(the one that acts as a container for a multipart/related document) has a writeTo()
method that you can use to populate a ByteArrayOutputStream. Afterwards, you should
be able to use the toByteArray() method on this ByteArrayOutputStream, to create
the byte[] that maps to a xsd:base64Binary data type. The nice thing about this,
is that the target web service has complete access to the SOAP message (in the first
Body part), and all the attachments :-)
Just a thought...
Mike Wooten
"Jerome Sonnet" <[email protected]> wrote:
>
I try to send back an image from my web service. Is there a way to make
a SOAP Messages
with Attachments using BEA Workshop?
Thanks,
Jerome. -
Webservice for soap with attachments
HI
I am try to develop webservice for soap with attachments for the sending images like jpg,tiff,gif.
it works fine when I statically attach the file
but when i pass dynamically the file name it will give me error for the call.invoke() method
Following is the code and the error details
I am using eclipse wtp2.0 and using weblogic appserver 8.1 and axis-1.4
that is my configuration details.
// This is my service code
import java.io.File;
import java.io.IOException;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.mail.MessagingException;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.message.SOAPEnvelope;
//import org.apache.axis.soap.MessageFactoryImpl;
import com.sun.corba.se.spi.activation.Repository;
public class AttachmentServer1
SOAPMessage msg = null;
Message response= null;
FileDataSource fileSource;
DataHandler dataHandler = null;
MessageContext context = null;
public void sendImage(String fileName) throws MessagingException, IOException{
try {
//java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
java.lang.System.setProperty("javax.xml.soap.MessageFactory","org.apache.axis.soap.MessageFactoryImpl");
MessageFactory fac = MessageFactory.newInstance();
msg = fac.createMessage();
context = MessageContext.getCurrentContext();
response = context.getRequestMessage();
if(msg != null){
System.out.println("From inside if statement");
//File f = new File("D:/1.png");
File f = new File(fileName);
fileSource = new FileDataSource(f);
dataHandler =new DataHandler(fileSource);
System.out.println("From inside if statement 1");
AttachmentPart part = msg.createAttachmentPart(dataHandler);
System.out.println("From inside if statement part");
//part.setContentType("image/jpeg");
//part.setMimeHeader("Content-Type", "image/jpg");
//part.setContent(dataHandler, "image/jpg");
SOAPPart soapPart = msg.getSOAPPart();
javax.xml.soap.SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPBodyElement bodyElement = body.addBodyElement(envelope.createName("attach"));
SOAPElement element = bodyElement.addChildElement(envelope.createName("parent"));
System.out.println("From inside if statement 2");
part.setContentId("axis");
msg.addAttachmentPart(part);
element.addAttribute(envelope.createName("href"), part.getContentId());
System.out.println("From inside if statement 3");
msg.saveChanges();
System.out.println("From inside if statement 4");
System.out.println(part.getContentId());
}else
try {
throw new Exception("Responce message is null");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SOAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// This is the client code
import java.io.File;
import java.io.FileOutputStream;
import java.util.Iterator;
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPException;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPEnvelope;
public class AttachmentClient {
public static void getImage(){
try{
String endPoint = "http://localhost:7001/Test/services/AttchmentServer";
Service service = new Service();
Call call = (Call)service.createCall();
call.setOperationName(new QName("sendImage"));
call.setTargetEndpointAddress(endPoint);
call.setUseSOAPAction(true);
call.invoke(new Object[] {});
MessageContext context = call.getMessageContext();
Message msg = context.getCurrentMessage();
Iterator obj = msg.getAttachments();
while(obj.hasNext()){
try{
AttachmentPart part = (AttachmentPart) obj.next();
File graphFile = new File("test.jpg");
FileOutputStream outputStream = new FileOutputStream(graphFile);
DataHandler dataHandler = part.getDataHandler();
if(dataHandler != null){
dataHandler.writeTo(outputStream);
outputStream.flush();
System.out.println("File Saved at:"+graphFile.getAbsolutePath());
}else{
System.out.println("null");
}catch(Exception e){
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
public static void main(String args[]) throws SOAPException
getImage();
// The error is something like that
- Exception:
java.lang.RuntimeException: javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:122)
at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:93)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:499)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at AttachmentClient2.getImage(AttachmentClient2.java:27)
at AttachmentClient2.main(AttachmentClient2.java:58)
{http://xml.apache.org/axis/}hostname:solusoft18
javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:609)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at AttachmentClient2.getImage(AttachmentClient2.java:27)
at AttachmentClient2.main(AttachmentClient2.java:58)
Caused by: javax.mail.MessagingException: Error in input stream;Hi David,
The "covert byte[] to a base64 encoded string" solution, is probably your best
bet given the scenario you described.
Regards,
Mike Wooten
"David Ruana" <[email protected]> wrote:
>
Weblogic 6.1 (SP2) does not support SOAP with attachments. In the meanwhile,
what
is the best approach in order to send a SOAP message which has binary
data?
My EJB is currently receiving a byte[] and returning also a byte[]. The
only solution
I can think of right now is to convert the byte[] into a String in base64
format.
Would you recommend that?
Thanks in advance. -
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.
Maybe you are looking for
-
Hi, I have programmed some signal processing project libraries in LabVIEW and would like to use them in a VC++ program. When building the DLL under LV 8.0, I get this error 1 message: Error 1 occurred at ABAPI Dist Define VI Prototype.vi -> ABAPI Di
-
A few weeks ago I bought a new laptop (Asus) as my old had crashed and I have no way of accessing any of the files that are on my old machine. I reinstalled Itunes on my new laptop but this machine runs with Windows 7 whereas my old one ran with Wind
-
Pricing Net Value error in Billing Document
Hi, I have to make only items in delivery to get copied into the billing document. I am able to get the header and item quantity, but I can't seem to copy the net value field at all. Can someone please help me with this?
-
Dear Team, our Warehouse run the Physical inventory Count using LX26. I can understand that before executing LX26,we need to execute MIBC(ABC Analysis for Cyclic Counting). Our System is Configured for A- 60% (to be counted 3 Times) ,B- 30% (to be co
-
MRP Areas on storage location Basis
Hi, I created some MRP areas for different storage locations, and assigned those MRP Areas to material(MRP 1 View). Every thing looks fine as of now. 1)Now when I have seen some forums, I seen Convert planning file entries (SE38 program RMDBVM00), I