• Post Reply Bookmark Topic Watch Topic
  • New Topic

Testing an SOAPHandler  RSS feed

 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(sorry if this is better in testing, but my question is more about constructing soap messages then testing)

Hi all,

I have implemented a SOAPHandler, and I am trying to unit test it, with JUnit.

All I want to do is with construct fake SOAPMessages or else mock them out using easyMock (I guess using the class extension).

Problem is I dont seem to be able to construct a fake SOAPMessage, not does easyMock seem to want to create one.

I have tried creating a SOAPMessage thus:


Where WS_SECURITY_XSD is a url to the wss-security schema and I have tried without the schema, and with both ways I get:


I know I probably dont want to, or should manual create a soapMessage I just cant think of a better way to unti test the handleMessage method.

Is there a way, have a missed something basic?

Thanks

Gavin
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Feeling even more dumb now.
I forgot to include the Saaj Implementation.jar.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!