KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > saaj > MessageFactoryImpl


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis2.saaj;
17
18 import javax.xml.soap.MessageFactory JavaDoc;
19 import javax.xml.soap.MimeHeaders JavaDoc;
20 import javax.xml.soap.SOAPException JavaDoc;
21 import javax.xml.soap.SOAPMessage JavaDoc;
22 import java.io.IOException JavaDoc;
23 import java.io.InputStream JavaDoc;
24
25 /**
26  * @author Ashutosh Shahi ashutosh.shahi@gmail.com
27  *
28  * TODO To change the template for this generated type comment go to
29  * Window - Preferences - Java - Code Style - Code Templates
30  */

31 public class MessageFactoryImpl extends MessageFactory JavaDoc {
32
33     /* (non-Javadoc)
34      * @see javax.xml.soap.MessageFactory#createMessage()
35      */

36     public SOAPMessage JavaDoc createMessage() throws SOAPException JavaDoc {
37         SOAPEnvelopeImpl env = new SOAPEnvelopeImpl();
38         SOAPMessageImpl message = new SOAPMessageImpl(env);
39         return message;
40     }
41
42     /* (non-Javadoc)
43      * @see javax.xml.soap.MessageFactory#createMessage(javax.xml.soap.MimeHeaders, java.io.InputStream)
44      */

45     public SOAPMessage JavaDoc createMessage(MimeHeaders mimeheaders,
46             InputStream JavaDoc inputstream) throws IOException JavaDoc, SOAPException JavaDoc {
47         // TODO Auto-generated method stub
48
SOAPMessageImpl message = new SOAPMessageImpl(inputstream, false,mimeheaders);
49         return message;
50     }
51
52 }
53
Popular Tags