Hi,
I'm a little bit confused.. Can you clarify a bit more..  Please have a look
at the inlined questions..

I used Axis 2 to create an MTOM enabled client and a service that sends a
> PDF
> as a byte[].

Did you use an already existing WSDL or did you deploy your service as a
POJO?


> I then took the clients C# WSDL and generated the necessary files using
> WSDL2Java and created a client just like i did in Java.
>
Did you mean you took the wsdl of the Axis2 service you wrote?..  But
looking at the stack trace you seems have used a Axis2 client...


> I keep getting the following error.

In what combinations you get the error?.. Axis2 client & .net service??

>
>
> 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 ?

It will be easier to help you if you tell what you are trying to do...

thanks,
Thilina

>
>
> 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-tp16097043p16097043.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thilina Gunarathne - http://thilinag.blogspot.com

Reply via email to