Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 82412 invoked from network); 19 Mar 2008 15:45:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2008 15:45:31 -0000 Received: (qmail 59711 invoked by uid 500); 19 Mar 2008 15:45:21 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 59688 invoked by uid 500); 19 Mar 2008 15:45:20 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 59677 invoked by uid 99); 19 Mar 2008 15:45:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 08:45:20 -0700 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 15:44:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Jc0TD-0002sx-LC for axis-user@ws.apache.org; Wed, 19 Mar 2008 08:44:51 -0700 Message-ID: <16145139.post@talk.nabble.com> Date: Wed, 19 Mar 2008 08:44:51 -0700 (PDT) From: Amo23 To: axis-user@ws.apache.org Subject: Re: Interop problems with .Net and Axis 2 using MTOM In-Reply-To: <16097043.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: armaghan23@hotmail.com References: <16097043.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Thilina, Thanks for the response to the post. I'll clarify my post a bit more. The service is written by our client in C#. I used WSDL2Java to convert the C# WSDL to java code.Once i had the auto generated files, i created a client to connect to it. The client uses the methods from the autogenerated files to set up everything. The snippet is the error log that i get everytime i try to connect to it using the Client i created. Thanks once again for looking into it. I really apprecite your help. Amo23 wrote: > > I used Axis 2 to create an MTOM enabled client and a service that sends a > PDF as a byte[]. > > I then took the clients C# WSDL and generated the necessary files using > WSDL2Java and created a client just like i did in Java. > > I keep getting the following error. > > The client code has been added after the error. > > Can someone point out what im doing wrong here or guide me as to what i > have to do ? > > Thanks, > > > _______________________________________________________________________________ > Exception in thread "main" org.apache.axis2.AxisFault > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > at > org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:89) > at > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326) > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) > at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > at > com.myceridianprototype.StorePDFforArchivingStub.UploadDocument(StorePDFforArchivingStub.java:196) > at com.myceridianprototype.LocalClient.main(LocalClient.java:47) > Caused by: java.lang.NullPointerException > at > org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:156) > at > org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111) > at > org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87) > ... 6 more > ________________________________________________________________________________ > import javax.activation.FileDataSource; > import org.apache.axiom.om.OMAbstractFactory; > import org.apache.axiom.om.OMElement; > import org.apache.axiom.om.OMFactory; > import org.apache.axiom.om.OMNamespace; > import org.apache.axiom.om.OMText; > import org.apache.axis2.Constants; > > import com.amo.service.TestServiceStub; > import com.amo.service.TestServiceStub.WritetoFileSystem; > > public class ExihibitAClient { > > private static final String EPR = > "http://localhost/services/TestService/Test.asmx"; > > private static final String INPUT_FILE = "C:\\HOLD\\small.pdf"; > > public static void main(String[] args) throws Exception > > { > System.out.println("In the TestClient Main Method"); > System.out.println("EPR: "+EPR); > System.out.println("Input File Name: "+INPUT_FILE); > TestServiceStub stub = new TestServiceStub(EPR); > > stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM, > Constants.VALUE_TRUE); > stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10000); > > > javax.activation.DataHandler dataHandler = new > javax.activation.DataHandler(new FileDataSource(INPUT_FILE)); > > WritetoFileSystem write = new WritetoFileSystem(); > write.setFilename("outputfile.pdf"); > write.setArray(dataHandler); > > stub.writetoFileSystem(write); > System.out.println("done calling service..."); > > } > > > > } > _______________________________________________________________________________ > -- View this message in context: http://www.nabble.com/Interop-problems-with-.Net-and-Axis-2-using-MTOM-tp16097043p16145139.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org