« Return to Thread: Cannot consume .NET Web Service with Axis2 Plugin

Cannot consume .NET Web Service with Axis2 Plugin

by Binh Le Thanh :: Rate this Message:

Reply to Author | View in Thread

Dear all,

I am using Grails 1.0.5 + Axis2 0.6.1 plugin to consume a web service written in .NET and deployed on IIS 6.0. 

Firstly, I use wsdl2java to generate ws client code and unit test with pure java then it run fine.

Secondly, I copy source code to Grails project and invoke it then I got AxisFault from IIS Server: Unsupported Media Type.

Thirdly, I use wireshark to capture the http packet then I got the following:

----------- Using Pure java Unit Test  ------------------
POST /VnpSrv.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="http://www.XXXX.vn/abc/abc"
User-Agent: Axis2
Host: 210.245.12.XXX:1122
Transfer-Encoding: chunked

---------- Using Grails + Axis2 Plugin --------------------
POST /VnpSrv.asmx HTTP/1.1
Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D44A27D3AB199F6F3C1246526414121; type="application/soap+xml"; start="<0.urn%3Auuid%3AD44A27D3AB199F6F3C1246526414122@...>"; action="http://www.XXXX.vn/abc/abc"
User-Agent: Axis2
Host: 210.245.12.XXX:1122
Transfer-Encoding: chunked

I guess the error is caused by using "Content-Type: multipart/related; boundary=..." and IIS server does not support this content-type.

So how can I change this setting of  Axis2 Plugin so that the header become that of when I use Pure java unit test.

Regards,
Binh Le

 « Return to Thread: Cannot consume .NET Web Service with Axis2 Plugin