String type = reqMessage.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0];
MimeHeaders headers = new MimeHeaders();
headers.addHeader(MimeConstants.CONTENT_TYPE, type);
SOAPMessageImpl msg2 = (SOAPMessageImpl)new MessageFactoryImpl().createMessage(headers, in);
epInv = binding.unbindRequestMessage(opMetaData, msg2);
assertEquals(epInv.getRequestParamValue(new QName("String_1")).toString(), "Hello World!");
assertEquals(epInv.getRequestParamValue(new QName("foo")).toString(), "hi");
epInv.setReturnValue("test");
SOAPMessage responseMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
stream = new ByteArrayOutputStream();
responseMessage.writeTo(stream);
in = new ByteArrayInputStream(stream.toByteArray());
type = responseMessage.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0];
headers = new MimeHeaders();
headers.addHeader(MimeConstants.CONTENT_TYPE, type);
SOAPMessageImpl msg3 = (SOAPMessageImpl)new MessageFactoryImpl().createMessage(headers, in);
binding.unbindResponseMessage(opMetaData, msg3, epInv, null);
assertEquals("test", epInv.getReturnValue());
}