Help needed with webservice WinHTTPrequest!

Author Message
sneakybastard

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 11/10/2010
  • Status: offline
Help needed with webservice WinHTTPrequest! Wednesday, November 10, 2010 10:04 PM (permalink)
0
Hi!
 
I'm new on this forum and also new in the area of Webservices testing. I managed to build a function with the WinnHTTP object to send a request to a webservice. I was able to send different messages to different public webservices and to get a valid response.
 
Now however I am trying to send a more complex request to a webservice. It is a multipart request. I get the following response:
Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl
 
 I don't know how to implement the 'multiparts' into a valid request. I use oWinnhttp.setrequestheader to add headers to the request. Can anyone help me on this one?
This is the RAW XML request of how the request SHOULD look like (catched' with Fiddler a HTTP debugging tool with which requests can be monitored):
 
POST /hadig-service/webservice HTTP/1.1
Accept: */*
Accept-Language: de-DE
Referer: .......................webaddres
x-flash-version: 10,1,85,3
Content-Type: multipart/related; type="text/xml"; boundary="----=MIME_boundary"
Content-Length: 14437
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DPAG; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: hadig-a9001.tcb.deutschepost.de
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: GUEST_LANGUAGE_ID=de_DE; COOKIE_SUPPORT=true; LOGIN=4d61784b6175666d616e6e; SCREEN_NAME=586a3050724a6a48516a6a7a4c4a61736569484155513d3d; JSESSIONID=4CB2CAE6926224C4EC87234AA04D3936.3tcb; hadig_cookie=1; COMPANY_ID=10113; ID=6164354b353566795662633d; PASSWORD=3565636233386334363533643834383461353430373766613130313864343262; s_cc=true; s_sq=sdfwsdfandev%2Csdfglobaldev%3D%2526pid%253DALLNA%25253Astartseite%25253Ade_DE%2526pidt%253D1%2526oid%253Dhttps%25253A//hadig-a9001.tcb.sdfsdf.de/web/hadig/dfdfdf%2526ot%253DA%2526oi%253D158
------=MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hadig="http://mms-dresden.de/liferay/hadig/schemas">
<soapenv:header>
<hadig:SessionId>4CB2CAE6926224C4EC87234AA04D3936.3tcb</hadig:SessionId>
</soapenv:header>
<soapenv:Body>
<hadig:ImageCreateRequest>
<hadig:UserId>1266964</hadig:UserId>
<hadig:Type>bannerPreview</hadig:Type>
<hadig:Title/>
</hadig:ImageCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
------=MIME_boundary
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
 


 

x�x��������������------------etc etc etc ( 
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9