Geeks With Blogs

News This is the *old* blog. The new one is at blog.sixeyed.com
Elton Stoneman
This is the *old* blog. The new one is at blog.sixeyed.com

[Source: http://geekswithblogs.net/EltonStoneman]

Using LoadGen 2007 to submit messages with a complex SOAP header, I had a strange issue with the standard SOAP transport. The SOAP transport has two parameters for wrapping the input file into a SOAP envelope:

<Parameters>

<URL>http://x/ESB.ItineraryServices.Response/ProcessItinerary.asmx</URL>

<SOAPHeader>SOAPAction: "http://microsoft.practices.esb/Process/SubmitRequestResponse"</SOAPHeader>

<SOAPPrefixEnv>&lt;?xml version=&quot;1.0&quot; …</SOAPPrefixEnv>

<SOAPPostfixEnv>&lt;/Root&gt;&lt;/SubmitRequestResponse&gt…</SOAPPostfixEnv>

<IsUseIntegratedAuth>False</IsUseIntegratedAuth>

<LatencyFileName></LatencyFileName>

<ResponseMsgPath></ResponseMsgPath>

<DstEncoding>utf-8</DstEncoding>

</Parameters>

 

- note the ellipses above are for brevity and are not in the actual LoadGen config file.

When the transport gets called, it opens an HTTP request and sends the SOAP envelope by writing three sets of byte arrays to the request stream: the value of SOAPEnvPrefix, the contents of the input file, then the value of SOAPEnvPostfix. All the byte arrays are encoded to the value specified by DstEncoding. When I used this configuration to send a message it was being rejected by the endpoint as a bad request. Trapping the request with Wireshark, it looked like this:

It looks as though LoadGen has injected an ellipsis before each part of the message it built – the envelope prefix, the input file contents and the envelope postfix all start with an ellipsis in which is not in the original. The request is malformed and rejected by the service.

Initially I thought this was something strange in how Wireshark was showing the results and wasn't actually part of the message, so I checked further and found that the XML escapes weren't set correctly. The SOAP header is an ESB Guidance itinerary which contains escaped XML for CDATA sections – to enter it as the SOAPEnvPrefix parameter meant escaping the escapes, so &lt;!CDATA[]&gt; becomes &amp;lt;!CDATA[]&amp;gt; in the parameter and is rendered correctly. But the issue remained, and so did the ellipses. Copying the full request into Web Service Studio produced the same result, but cutting out the ellipses meant it processed correctly.

With time accumulating on what should have been a simple task, I checked out the SOAPTransport code and could see nothing that was causing this. Debugging the call didn't show any ellipsis characters being written, and modifying it to produce a single string of the header, body and footer before encoding made no difference. In the end I created a modified transport which takes a full SOAP envelope as the input file, doing away with the envelope parameters altogether.

This worked fine, didn't render any ellipses – although the code is very similar to LoadGen's SOAPTransport class – and was happily processed. It has the advantage that you can capture a full message with Wireshark, save it and use it in LoadGen without having to extract the header. It's on the MSDN Code Gallery here: Sixeyed.Samples (Sixeyed.Samples.LoadGen.Transports.AlternativeSOAPTransport).

Configuration is very similar to the standard transport, just specify the assembly and remove the SOAP envelope parameters:

<Transport Name="SOAP">

<Assembly>Sixeyed.Samples.dll/Sixeyed.Samples.LoadGen.Transports.AlternativeSOAPTransport</Assembly>

</Transport>

<Parameters>

<URL>http://x/ESB.ItineraryServices.Response/ProcessItinerary.asmx</URL>

<SOAPHeader>SOAPAction: "http://microsoft.practices.esb/Process/SubmitRequestResponse"</SOAPHeader>

<IsUseIntegratedAuth>False</IsUseIntegratedAuth>

<LatencyFileName></LatencyFileName>

<ResponseMsgPath></ResponseMsgPath>

<DstEncoding>utf-8</DstEncoding>

</Parameters>

 

But I'm still puzzled about those ellipses from the standard SOAP transport.

Posted on Tuesday, February 24, 2009 6:33 PM LoadGen 2007 , Code Gallery | Back to top


Comments on this post: Alternative SOAP Transport for LoadGen

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Byte order mark is causing the ellipses.

http://en.wikipedia.org/wiki/Byte_order_mark
Left by Joe Mikolajczyk on Dec 15, 2009 2:57 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Byte order mark is causing the ellipses.Data Recovery Software|Guard Process
Left by david on Mar 04, 2010 3:16 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Byte order mark is causing the ellipses.good!Restore Deleted Files|进程保护
Left by Robin on Mar 04, 2010 3:17 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
hehesohbet
Left by MuratCan on Mar 24, 2010 9:19 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
great article, I love this blogs

part time jobs search engine
Left by mp3 song free download on Apr 06, 2010 6:48 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Hi, your website's design is first-class and i like it. Your articles are totally amazing. Please continue this great work.Keep it up.
Left by ipad scrapbook app on Apr 27, 2010 8:21 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
It sounds really interesting. Useful information about Alternative SOAP Transport for LoadGen. Thanks a lot for sharing.
Left by affitto sardegna on May 12, 2010 5:53 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
This one is the blog which I like most,I would like to thanks that master brain who make all this for the readers like me.keep up writing good.
Left by case vacanza sardegna on May 29, 2010 5:58 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Its nice to read a useful article for beginner like me.Some of points from this article are very helpful for me as I haven’t considered them yet.I would like to say thank you for sharing this cool article.
Left by Residence isola d'Elba on May 29, 2010 6:44 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
It is very interesting article and quite impressive too.The way in which you have described all the things are great.Thanks a lot.Keep blogging.
Left by residence Toscana mare on May 29, 2010 9:51 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
This is the most comprehensive guide I have come across.Thanks.It's really very well written…Some great information to be absorbed in this post. Keep up the good works.
Left by case vacanza elba on May 30, 2010 5:44 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Thanks bro, Now you make it easy for me to understand and implement. Thanks for sharing with me.
Left by noleggio con conducente roma on May 30, 2010 6:42 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Very interesting post .Really you pointed out a lot of valuable things about T4 templates here .Keep sharing.....
Left by Last Minute Jesolo on May 30, 2010 6:51 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
One of the most inspiring bits of news in a long time.I am very much interesting in this topic.. Keep on elaborating much more on it in future posts.!

Left by Urlaub in Jesolo on May 30, 2010 8:42 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
I haven't any word to appreciate this post..Really i am impressed from this post.Thanks for sharing your ideas.Keep it up.
Left by tuscany farm holidays on May 31, 2010 4:40 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
These are nice coding. These code helps a lot. Keep sharing such type of informative post.
Left by dormire a lucca on May 31, 2010 5:03 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Interesting post. Hoping that you will continue posting an article having a useful information. Thanks a lot!
Left by data backup solutions on Jun 12, 2010 3:54 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
I am happy to find much useful information in the post, writing sequence is awesome, I always look for quality content, thanks for sharing.
Left by utah uterine fibroids treatment on Jun 12, 2010 6:48 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
That's a great post and I must say it's not only a simple but also a entertaining one.Thanks a lot for sharing.Looking forward to reading your next post.
Left by pain doctors on Jun 12, 2010 8:13 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
I am following your blog regularly and got great information.Each & every tips of your post are awesome.Thanks a lot.Keep blogging.
Left by platinum protection-63 on Jun 13, 2010 7:40 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
We have our my film favorites, and while critiquing my list, I happened to notice that Mr brad pitt was in a number of of them.
Left by cash advance instant approval on Jun 17, 2010 12:56 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
I didn't realize how simple the code for the template is. You did a good job with this. Looking forward to reading your next post. Keep blogging.
Left by virtual hosting on Jun 21, 2010 6:43 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Interesting post and thanks for sharing. Some things in here I have not thought about before.Keep blogging.
Left by digital scrapbook68 on Jun 24, 2010 7:53 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
It is good to see posts that give truly quality information.I agree with most of what you are saying here.Thanks a lot for sharing.Keep blogging.
Left by home security systems-595 on Jul 26, 2010 8:17 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Interesting post and thanks for sharing. Some things in here I have not thought about before.Thanks a lot.Keep blogging.
Left by weight-loss489 on Jul 28, 2010 6:07 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
So beautiful article. I visit this site. It gives me lots of pleasure and interest. It’s a most important post. Thanks for sharing this post with us. Keep blogging.
Left by Civitavecchia excursion on Jul 29, 2010 7:00 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
As a Newbie to the internet, I am always searching online for stuff that can help me. Thank you for your help.
Left by Ferienhaus Apulien on Aug 02, 2010 2:49 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
The Microsoft BizTalk LoadGen 2007 Tool is intended for developers and IT professionals to simulate load on a BizTalk Server.It generates message transmission loads to run performance and stress tests for your Microsoft BizTalk Server applications. This tool should be used in a test environment only, and should not be used in a production environment.
Left by medieval times coupons on Jan 07, 2011 1:34 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
The Microsoft BizTalk LoadGen 2007 Tool is intended for developers and IT professionals to simulate load on a BizTalk Server. This tool should be used in a test environment only, and should not be used in a production environment.
Left by term life insurance on Apr 01, 2011 10:07 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
I feel the strange thing too with the LoadGen. But I try another way to prove that LoadGen didn't do something strange.
Left by engineering degree online on May 19, 2011 7:23 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Been looking for this article for long time ago and finally found here. thanks for sharing this post. appreciate!
Left by driving lessons Birmingham on Jun 17, 2011 3:55 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Nice post, great work. I have recently started my own blog so its handy to pickup tips from what you have going here. Many Thanks.
Left by px90 on Jun 29, 2011 3:57 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Great post..thanks!
Left by Joe on Aug 17, 2011 12:12 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Great post keep up the good work
Left by Driving instructor Bristol on Sep 18, 2011 5:02 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
It is a very nice place for getting knowledge... It is a great pleasure that I read you blog... I really like this blog...
Left by latest news today on Nov 02, 2011 6:40 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
This is truly a perfect guide.

Left by cases ipad 2 on Mar 01, 2012 1:55 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Great blog keep it up
Left by life insurance on Apr 10, 2012 10:34 AM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Driving school in the Bristol area
Left by Driving Schools Portishead on Apr 16, 2012 4:16 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Driving lessons in the Bristol area
Left by Driving Schools Bristol on Apr 16, 2012 4:17 PM

# re: Alternative SOAP Transport for LoadGen
Requesting Gravatar...
Thanks for sharing, this really got me out of a jam.
Left by Sorian Thompson on Feb 07, 2013 9:19 AM

Your comment:
 (will show your gravatar)


Copyright © Elton Stoneman | Powered by: GeeksWithBlogs.net