Simon,

I got this working just yesterday. You will need to compile Axis2 from
latest SVN.

Have u set up the hands on lab sample? 
http://www.microsoft.com/downloads/details.aspx?familyid=0E5491C1-8BDE-4FFF-88C4-8E3DC102FAD6&displaylang=en

If you did, i have an example that works with Part3\after sample. 

Step #1: Basically start with adding another method in
CS\Part3\after\StockServiceLibrary\StockService.cs

        [WebMethod]
        public byte[] echoAttachment(byte[] bytes) {
                        return bytes;
        }

Step #2: Run .NET's wsdl.exe (NOT wsewsdl3.exe) against the dynamic
wsdl, add a main and test the method.

    public static void Main(string[] args) {
                StockService service = new StockService();
                byte[] bytes = null;
                service.RequireMtom = true;
        using (FileStream fs = new FileStream("gears.gif",
FileMode.Open, FileAccess.Read, FileShare.Read))
        {
            byte[] buffer = new byte[fs.Length];
            fs.Read(buffer, 0, (int)fs.Length);
            bytes = service.echoAttachment(buffer);
        }
    }

Step #3: compile the attached java code and run it.

Thanks,
dims

PS: check my blogs for 2 lists of bugs in WSE 3.0 CTP
(http://blogs.cocoondev.org/dims/)

On 7/15/05, Simon Guest <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> I'm working on an MTOM interop sample between Axis 2 0.9 and WSE 3.0 CTP. 
> When I try to run WSDL2Java in the Axis 2 installation, I get the following
> exception: 
> 
>   
> 
> C:\axis2-0.9-bin>wsdl2java -uri c:\temp\MTOM.wsdl 
> 
> Exception in thread "main" java.lang.NullPointerException 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> 
> iguration.java:79) 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenConfiguration.<init>(CodeGenConf
> 
> iguration.java:72) 
> 
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> 
> ionEngine.java:61) 
> 
>         at
> org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) 
> 
>         at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22) 
> 
>   
> 
> This problem doesn't seem related to the WSDL (I tried with one in the Axis
> 2 samples directory).  I've also tried this on both JDK 1.4.2 and 1.5 – same
> issue. 
> 
>   
> 
> Any ideas? 
> 
>   
> 
> Thanks, 
> 
> -Simon 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/

Attachment: StockService.java
Description: Binary data

Reply via email to