Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using MTOM with Web services
#1
Not Solved
hi ,

I am getting the following error message when i am requesting for a web service using MTOM as attachment.

The importTemplate operation call failed.
The .NET Framework 2.0 WSE 3.0 toolkit returned the following error:
Exception from: Net2ProxyBase
WSE839: An HTTP response was received that used the following content type: text/xml;charset=UTF-8. The following content type was expected: multipart/related; type=application/xop+xml.

Line (13):
Code:
"Set importTemplate = WebService("TemplateService").importTemplate(XMLWarehouse("ImportTemplate"))".

I am using the following lines of code:

Code:
' OCMConnectionService Web service object steps
connect = WebService("OCMConnectionService").connect("<domain name>","uid","pwd")
'WebService("OCMConnectionService").Check CheckPoint("connect")
environment.Value("token") = connect



' TemplateService Web service object steps
Webservice("TemplateService").Attachments.SetType micMTOM
webservice("TemplateService").attachments.add "C:\qtp\QtpWs.zip"


Set importTemplate = WebService("TemplateService").importTemplate(XMLWarehouse("ImportTemplate"))


Can some one provide me help regarding this
Reply
#2
Not Solved
Hi,
Can you please check if import method is available for the webservice that you are using.
You can do so by going through the web service URL and accessing available methods.
Reply
#3
Not Solved
Yes ,Tarik it is very much there
the method name is importtemplate and it expects a zip file as an attachment
using MTOM in web services for attachments. however this is nto working some how .

I am really confused and have wasted couple of days on this


yes it is
Reply
#4
Not Solved
think your service is set to use MTOM encoding,MTOM is set to Always. and the client is set to Optional. Since it is the client that makes the first request it does not optionally turns on the MTOM encoding but your
service method requires it. You need to programatically set MTOM enconding to On
when you access method.

i.e. if the response is non-MTOM like a SOAP fault, tell the proxy
we don't really need MTOM.
Reply
#5
Not Solved
I think what you are saying is correct , but what is the work around or code that i need to write to achieve this.
How do i disable MTOM ? Do u have any clue, can i chat on gtalk?
my gmail id is pantrah@gmail.com
Reply
#6
Not Solved
Does anyone have any solution for this.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Services Testing Elvira 0 1,537 05-08-2015, 03:48 PM
Last Post: Elvira
  web services testing using QTP tester_rahul 0 1,898 07-16-2012, 03:25 PM
Last Post: tester_rahul
  Private web services testing using QTP tool rajeswari.g 1 3,332 12-10-2010, 05:38 PM
Last Post: Saket
  web services add-ins qtpguru 1 3,149 11-11-2009, 10:30 AM
Last Post: Tarik Sheth
  Qtp Web Services Testing avanishdharamjoshi 0 2,248 09-17-2009, 11:21 PM
Last Post: avanishdharamjoshi

Forum Jump:


Users browsing this thread: 1 Guest(s)